I#27 - [IMAPx] Ignore DavMail's CR/LF in BODYSTRUCTURE response
[evolution-data-server.git] / src / libedataserver / e-list.h
blobe0a45891d6ac04a3df81b3fdf32c9e73cb9e93c6
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5 * This library is free software: you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
12 * for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Authors: Chris Lahey <clahey@ximian.com>
20 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
21 #error "Only <libedataserver/libedataserver.h> should be included directly."
22 #endif
24 #ifndef EDS_DISABLE_DEPRECATED
26 /* Do not generate bindings. */
27 #ifndef __GI_SCANNER__
29 #ifndef E_LIST_H
30 #define E_LIST_H
32 #include <stdio.h>
33 #include <time.h>
34 #include <libedataserver/e-iterator.h>
36 /* Standard GObject macros */
37 #define E_TYPE_LIST \
38 (e_list_get_type ())
39 #define E_LIST(obj) \
40 (G_TYPE_CHECK_INSTANCE_CAST \
41 ((obj), E_TYPE_LIST, EList))
42 #define E_LIST_CLASS(cls) \
43 (G_TYPE_CHECK_CLASS_CAST \
44 ((cls), E_TYPE_LIST, EListClass))
45 #define E_IS_LIST(obj) \
46 (G_TYPE_CHECK_INSTANCE_TYPE \
47 ((obj), E_TYPE_LIST))
48 #define E_IS_LIST_CLASS(cls) \
49 (G_TYPE_CHECK_CLASS_TYPE \
50 ((cls), E_TYPE_LIST))
51 #define E_LIST_GET_CLASS(obj) \
52 (G_TYPE_INSTANCE_GET_CLASS \
53 ((obj), E_TYPE_LIST, EListClass))
55 G_BEGIN_DECLS
57 typedef struct _EList EList;
58 typedef struct _EListClass EListClass;
60 typedef gpointer (*EListCopyFunc) (gconstpointer data,
61 gpointer closure);
62 typedef void (*EListFreeFunc) (gpointer data,
63 gpointer closure);
65 struct _EList {
66 GObject parent;
68 GList *list;
69 GList *iterators;
70 EListCopyFunc copy;
71 EListFreeFunc free;
72 gpointer closure;
75 struct _EListClass {
76 GObjectClass parent_class;
79 GType e_list_get_type (void) G_GNUC_CONST;
80 EList * e_list_new (EListCopyFunc copy,
81 EListFreeFunc free,
82 gpointer closure);
83 void e_list_construct (EList *list,
84 EListCopyFunc copy,
85 EListFreeFunc free,
86 gpointer closure);
87 EList * e_list_duplicate (EList *list);
88 EIterator * e_list_get_iterator (EList *list);
89 void e_list_append (EList *list,
90 gconstpointer data);
91 void e_list_remove (EList *list,
92 gconstpointer data);
93 gint e_list_length (EList *list);
95 /* For iterators to call. */
96 void e_list_remove_link (EList *list,
97 GList *link);
98 void e_list_remove_iterator (EList *list,
99 EIterator *iterator);
100 void e_list_invalidate_iterators (EList *list,
101 EIterator *skip);
103 G_END_DECLS
105 #endif /* E_LIST_H */
107 #endif /* __GI_SCANNER__ */
109 #endif /* EDS_DISABLE_DEPRECATED */