1 /* modest-account-presets.h */
2 /* insert (c)/licensing information) */
4 #ifndef __MODEST_ACCOUNT_PRESETS_H__
5 #define __MODEST_ACCOUNT_PRESETS_H__
7 #include <glib-object.h>
8 /* other include files */
12 /* convenience macros */
13 #define MODEST_TYPE_ACCOUNT_PRESETS (modest_account_presets_get_type())
14 #define MODEST_ACCOUNT_PRESETS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_ACCOUNT_PRESETS,ModestAccountPresets))
15 #define MODEST_ACCOUNT_PRESETS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_ACCOUNT_PRESETS,GObject))
16 #define MODEST_IS_ACCOUNT_PRESETS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_ACCOUNT_PRESETS))
17 #define MODEST_IS_ACCOUNT_PRESETS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_ACCOUNT_PRESETS))
18 #define MODEST_ACCOUNT_PRESETS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_ACCOUNT_PRESETS,ModestAccountPresetsClass))
20 typedef struct _ModestAccountPresets ModestAccountPresets;
21 typedef struct _ModestAccountPresetsClass ModestAccountPresetsClass;
23 typedef struct _ModestPreset ModestPreset;
25 struct _ModestAccountPresets {
28 gint count; /* number of available presets */
31 struct _ModestAccountPresetsClass {
32 GObjectClass parent_class;
33 GList * (* get_list) (ModestAccountPresets *self);
34 GList * (* get_names) (ModestAccountPresets *self);
35 ModestPreset * (* get_by_name) (ModestAccountPresets *self, const gchar *name);
36 gboolean (* load_file) (ModestAccountPresets *self, const gchar *filename);
39 /* data type to hold an account preset dataset */
40 struct _ModestPreset {
42 gchar *transport_server;
43 gchar *storage_server;
46 /* add security stuff */
50 /* member functions */
51 GType modest_account_presets_get_type (void) G_GNUC_CONST;
53 /* typical parameter-less _new function */
54 GObject* modest_account_presets_new (void);
57 GList *modest_account_presets_get_list (ModestAccountPresets *self);
58 GList *modest_account_presets_get_names (ModestAccountPresets *self);
59 ModestPreset *modest_account_presets_get_by_name (ModestAccountPresets *self, const gchar *name);
60 gboolean modest_account_presets_load_file (ModestAccountPresets *self, const gchar *filename);
65 #endif /* __MODEST_ACCOUNT_PRESETS_H__ */