Add new ESource classes.
[platform/upstream/evolution-data-server.git] / libedataserver / e-source-selectable.h
1 /*
2  * e-source-selectable.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_SELECTABLE_H
20 #define E_SOURCE_SELECTABLE_H
21
22 #include <libedataserver/e-source-backend.h>
23
24 /* Standard GObject macros */
25 #define E_TYPE_SOURCE_SELECTABLE \
26         (e_source_selectable_get_type ())
27 #define E_SOURCE_SELECTABLE(obj) \
28         (G_TYPE_CHECK_INSTANCE_CAST \
29         ((obj), E_TYPE_SOURCE_SELECTABLE, ESourceSelectable))
30 #define E_SOURCE_SELECTABLE_CLASS(cls) \
31         (G_TYPE_CHECK_CLASS_CAST \
32         ((cls), E_TYPE_SOURCE_SELECTABLE, ESourceSelectableClass))
33 #define E_IS_SOURCE_SELECTABLE(obj) \
34         (G_TYPE_CHECK_INSTANCE_TYPE \
35         ((obj), E_TYPE_SOURCE_SELECTABLE))
36 #define E_IS_SOURCE_SELECTABLE_CLASS(cls) \
37         (G_TYPE_CHECK_CLASS_TYPE \
38         ((cls), E_TYPE_SOURCE_SELECTABLE))
39 #define E_SOURCE_SELECTABLE_GET_CLASS(obj) \
40         (G_TYPE_INSTANCE_GET_CLASS \
41         ((obj), E_TYPE_SOURCE_SELECTABLE, ESourceSelectableClass))
42
43 G_BEGIN_DECLS
44
45 typedef struct _ESourceSelectable ESourceSelectable;
46 typedef struct _ESourceSelectableClass ESourceSelectableClass;
47 typedef struct _ESourceSelectablePrivate ESourceSelectablePrivate;
48
49 /**
50  * ESourceSelectable:
51  *
52  * Contains only private data that should be read and manipulated using the
53  * functions below.
54  *
55  * Since: 3.6
56  **/
57 struct _ESourceSelectable {
58         ESourceBackend parent;
59         ESourceSelectablePrivate *priv;
60 };
61
62 struct _ESourceSelectableClass {
63         ESourceBackendClass parent_class;
64 };
65
66 GType           e_source_selectable_get_type    (void) G_GNUC_CONST;
67 const gchar *   e_source_selectable_get_color   (ESourceSelectable *extension);
68 gchar *         e_source_selectable_dup_color   (ESourceSelectable *extension);
69 void            e_source_selectable_set_color   (ESourceSelectable *extension,
70                                                  const gchar *color);
71 gboolean        e_source_selectable_get_selected
72                                                 (ESourceSelectable *extension);
73 void            e_source_selectable_set_selected
74                                                 (ESourceSelectable *extension,
75                                                  gboolean selected);
76
77 G_END_DECLS
78
79 #endif /* E_SOURCE_SELECTABLE_H */