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)
4  *
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.
8  *
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.
13  *
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/>.
16  *
17  * Authors: Chris Lahey <clahey@ximian.com>
18  */
19 
20 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
21 #error "Only <libedataserver/libedataserver.h> should be included directly."
22 #endif
23 
24 #ifndef EDS_DISABLE_DEPRECATED
25 
26 /* Do not generate bindings. */
27 #ifndef __GI_SCANNER__
28 
29 #ifndef E_ITERATOR_H
30 #define E_ITERATOR_H
31 
32 #include <stdio.h>
33 #include <time.h>
34 #include <glib-object.h>
35 
36 /* Standard GObject macros */
37 #define E_TYPE_ITERATOR \
38 	(e_iterator_get_type ())
39 #define E_ITERATOR(obj) \
40 	(G_TYPE_CHECK_INSTANCE_CAST \
41 	((obj), E_TYPE_ITERATOR, EIterator))
42 #define E_ITERATOR_CLASS(cls) \
43 	(G_TYPE_CHECK_CLASS_CAST \
44 	((cls), E_TYPE_ITERATOR, EIteratorClass))
45 #define E_IS_ITERATOR(obj) \
46 	(G_TYPE_CHECK_INSTANCE_TYPE \
47 	((obj), E_TYPE_ITERATOR))
48 #define E_IS_ITERATOR_CLASS(cls) \
49 	(G_TYPE_CHECK_CLASS_TYPE \
50 	((cls), E_TYPE_ITERATOR))
51 #define E_ITERATOR_GET_CLASS(obj) \
52 	(G_TYPE_INSTANCE_GET_CLASS \
53 	((obj), E_TYPE_ITERATOR, EIteratorClass))
54 
55 G_BEGIN_DECLS
56 
57 typedef struct _EIterator EIterator;
58 typedef struct _EIteratorClass EIteratorClass;
59 
60 /**
61  * EIterator:
62  *
63  * Contains only private data that should be read and manipulated using the
64  * functions below.
65  **/
66 struct _EIterator {
67 	/*< private >*/
68 	GObject parent;
69 };
70 
71 struct _EIteratorClass {
72 	GObjectClass parent_class;
73 
74 	/* Signals */
75 	void		(*invalidate)		(EIterator *iterator);
76 
77 	/* Methods */
78 	gconstpointer	(*get)			(EIterator *iterator);
79 	void		(*reset)		(EIterator *iterator);
80 	void		(*last)			(EIterator *iterator);
81 	gboolean	(*next)			(EIterator *iterator);
82 	gboolean	(*prev)			(EIterator *iterator);
83 	void		(*remove)		(EIterator *iterator);
84 	void		(*insert)		(EIterator *iterator,
85 						 gconstpointer object,
86 						 gboolean before);
87 	void		(*set)			(EIterator *iterator,
88 						 gconstpointer object);
89 	gboolean	(*is_valid)		(EIterator *iterator);
90 };
91 
92 GType		e_iterator_get_type		(void) G_GNUC_CONST;
93 gconstpointer	e_iterator_get			(EIterator *iterator);
94 void		e_iterator_reset		(EIterator *iterator);
95 void		e_iterator_last			(EIterator *iterator);
96 gboolean	e_iterator_next			(EIterator *iterator);
97 gboolean	e_iterator_prev			(EIterator *iterator);
98 void		e_iterator_delete		(EIterator *iterator);
99 void		e_iterator_insert		(EIterator *iterator,
100 						 gconstpointer object,
101 						 gboolean before);
102 void		e_iterator_set			(EIterator *iterator,
103 						 gconstpointer object);
104 gboolean	e_iterator_is_valid		(EIterator *iterator);
105 void		e_iterator_invalidate		(EIterator *iterator);
106 
107 G_END_DECLS
108 
109 #endif /* E_ITERATOR_H */
110 
111 #endif /* __GI_SCANNER__ */
112 
113 #endif /* EDS_DISABLE_DEPRECATED */
114 
115