1 /*
2  * e-source-collection.h
3  *
4  * This library is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library. If not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17 
18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
19 #error "Only <libedataserver/libedataserver.h> should be included directly."
20 #endif
21 
22 #ifndef E_SOURCE_COLLECTION_H
23 #define E_SOURCE_COLLECTION_H
24 
25 #include <libedataserver/e-source-backend.h>
26 
27 /* Standard GObject macros */
28 #define E_TYPE_SOURCE_COLLECTION \
29 	(e_source_collection_get_type ())
30 #define E_SOURCE_COLLECTION(obj) \
31 	(G_TYPE_CHECK_INSTANCE_CAST \
32 	((obj), E_TYPE_SOURCE_COLLECTION, ESourceCollection))
33 #define E_SOURCE_COLLECTION_CLASS(cls) \
34 	(G_TYPE_CHECK_CLASS_CAST \
35 	((cls), E_TYPE_SOURCE_COLLECTION, ESourceCollectionClass))
36 #define E_IS_SOURCE_COLLECTION(obj) \
37 	(G_TYPE_CHECK_INSTANCE_TYPE \
38 	((obj), E_TYPE_SOURCE_COLLECTION))
39 #define E_IS_SOURCE_COLLECTION_CLASS(cls) \
40 	(G_TYPE_CHECK_CLASS_TYPE \
41 	((cls), E_TYPE_SOURCE_COLLECTION))
42 #define E_SOURCE_COLLECTION_GET_CLASS(obj) \
43 	(G_TYPE_INSTANCE_GET_CLASS \
44 	((obj), E_TYPE_SOURCE_COLLECTION, ESourceCollectionClass))
45 
46 /**
47  * E_SOURCE_EXTENSION_COLLECTION:
48  *
49  * Pass this extension name to e_source_get_extension() to access
50  * #ESourceCollection.  This is also used as a group name in key files.
51  *
52  * Since: 3.6
53  **/
54 #define E_SOURCE_EXTENSION_COLLECTION "Collection"
55 
56 G_BEGIN_DECLS
57 
58 typedef struct _ESourceCollection ESourceCollection;
59 typedef struct _ESourceCollectionClass ESourceCollectionClass;
60 typedef struct _ESourceCollectionPrivate ESourceCollectionPrivate;
61 
62 /**
63  * ESourceCollection:
64  *
65  * Contains only private data that should be read and manipulated using the
66  * functions below.
67  *
68  * Since: 3.6
69  **/
70 struct _ESourceCollection {
71 	/*< private >*/
72 	ESourceBackend parent;
73 	ESourceCollectionPrivate *priv;
74 };
75 
76 struct _ESourceCollectionClass {
77 	ESourceBackendClass parent_class;
78 };
79 
80 GType		e_source_collection_get_type	(void) G_GNUC_CONST;
81 const gchar *	e_source_collection_get_identity
82 						(ESourceCollection *extension);
83 gchar *		e_source_collection_dup_identity
84 						(ESourceCollection *extension);
85 void		e_source_collection_set_identity
86 						(ESourceCollection *extension,
87 						 const gchar *identity);
88 gboolean	e_source_collection_get_calendar_enabled
89 						(ESourceCollection *extension);
90 void		e_source_collection_set_calendar_enabled
91 						(ESourceCollection *extension,
92 						 gboolean calendar_enabled);
93 gboolean	e_source_collection_get_contacts_enabled
94 						(ESourceCollection *extension);
95 void		e_source_collection_set_contacts_enabled
96 						(ESourceCollection *extension,
97 						 gboolean contacts_enabled);
98 gboolean	e_source_collection_get_mail_enabled
99 						(ESourceCollection *extension);
100 void		e_source_collection_set_mail_enabled
101 						(ESourceCollection *extension,
102 						 gboolean mail_enabled);
103 const gchar *	e_source_collection_get_calendar_url
104 						(ESourceCollection *extension);
105 gchar *		e_source_collection_dup_calendar_url
106 						(ESourceCollection *extension);
107 void		e_source_collection_set_calendar_url
108 						(ESourceCollection *extension,
109 						 const gchar *calendar_url);
110 const gchar *	e_source_collection_get_contacts_url
111 						(ESourceCollection *extension);
112 gchar *		e_source_collection_dup_contacts_url
113 						(ESourceCollection *extension);
114 void		e_source_collection_set_contacts_url
115 						(ESourceCollection *extension,
116 						 const gchar *contacts_url);
117 gboolean	e_source_collection_get_allow_sources_rename
118 						(ESourceCollection *extension);
119 void		e_source_collection_set_allow_sources_rename
120 						(ESourceCollection *extension,
121 						 gboolean allow_sources_rename);
122 
123 G_END_DECLS
124 
125 #endif /* E_SOURCE_COLLECTION_H */
126 
127