Add new ESource classes.
[platform/upstream/evolution-data-server.git] / libedataserver / e-source-camel.h
1 /*
2  * e-source-camel.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_CAMEL_H
20 #define E_SOURCE_CAMEL_H
21
22 #include <camel/camel.h>
23 #include <libedataserver/e-source-extension.h>
24
25 /* Standard GObject macros */
26 #define E_TYPE_SOURCE_CAMEL \
27         (e_source_camel_get_type ())
28 #define E_SOURCE_CAMEL(obj) \
29         (G_TYPE_CHECK_INSTANCE_CAST \
30         ((obj), E_TYPE_SOURCE_CAMEL, ESourceCamel))
31 #define E_SOURCE_CAMEL_CLASS(cls) \
32         (G_TYPE_CHECK_CLASS_CAST \
33         ((cls), E_TYPE_SOURCE_CAMEL, ESourceCamelClass))
34 #define E_IS_SOURCE_CAMEL(obj) \
35         (G_TYPE_CHECK_INSTANCE_TYPE \
36         ((obj), E_TYPE_SOURCE_CAMEL))
37 #define E_IS_SOURCE_CAMEL_CLASS(cls) \
38         (G_TYPE_CHECK_CLASS_TYPE \
39         ((cls), E_TYPE_SOURCE_CAMEL))
40 #define E_SOURCE_CAMEL_GET_CLASS(obj) \
41         (G_TYPE_INSTANCE_GET_CLASS \
42         ((obj), E_TYPE_SOURCE_CAMEL, ESourceCamelClass))
43
44 G_BEGIN_DECLS
45
46 typedef struct _ESourceCamel ESourceCamel;
47 typedef struct _ESourceCamelClass ESourceCamelClass;
48 typedef struct _ESourceCamelPrivate ESourceCamelPrivate;
49
50 /**
51  * ESourceCamel:
52  *
53  * Contains only private data that should be read and manipulated using the
54  * functions below.
55  *
56  * Since: 3.6
57  **/
58 struct _ESourceCamel {
59         ESourceExtension parent;
60         ESourceCamelPrivate *priv;
61 };
62
63 struct _ESourceCamelClass {
64         ESourceExtensionClass parent_class;
65
66         /* Same idea as in CamelServiceClass. */
67         GType settings_type;
68 };
69
70 GType           e_source_camel_get_type         (void) G_GNUC_CONST;
71 void            e_source_camel_register_types   (void);
72 GType           e_source_camel_generate_subtype (const gchar *protocol,
73                                                  GType settings_type);
74 CamelSettings * e_source_camel_get_settings     (ESourceCamel *extension);
75 const gchar *   e_source_camel_get_type_name    (const gchar *protocol);
76 const gchar *   e_source_camel_get_extension_name
77                                                 (const gchar *protocol);
78 void            e_source_camel_configure_service
79                                                 (ESource *source,
80                                                  CamelService *service);
81
82 G_END_DECLS
83
84 #endif /* E_SOURCE_CAMEL_H */