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