* Move marshallers to external files generated by glib-genmarshal.
[modest] / src / modest-tny-account-store.h
1 /* modest-tny-account-store.h */
2 /* insert (c)/licensing information) */
3
4 #ifndef __MODEST_TNY_ACCOUNT_STORE_H__
5 #define __MODEST_TNY_ACCOUNT_STORE_H__
6
7 #include <glib-object.h>
8 #include <tny-account-store.h>
9 #include <tny-session-camel.h>
10
11 /* other include files */
12
13 G_BEGIN_DECLS
14
15 /* convenience macros */
16 #define MODEST_TYPE_TNY_ACCOUNT_STORE             (modest_tny_account_store_get_type())
17 #define MODEST_TNY_ACCOUNT_STORE(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_TNY_ACCOUNT_STORE,ModestTnyAccountStore))
18 #define MODEST_TNY_ACCOUNT_STORE_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass),MODEST_TYPE_TNY_ACCOUNT_STORE,ModestTnyAccountStoreClass))
19 #define MODEST_IS_TNY_ACCOUNT_STORE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),MODEST_TYPE_TNY_ACCOUNT_STORE))
20 #define MODEST_IS_TNY_ACCOUNT_STORE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass),MODEST_TYPE_TNY_ACCOUNT_STORE))
21 #define MODEST_TNY_ACCOUNT_STORE_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj),MODEST_TYPE_TNY_ACCOUNT_STORE,ModestTnyAccountStoreClass))
22
23 typedef struct _ModestTnyAccountStore      ModestTnyAccountStore;
24 typedef struct _ModestTnyAccountStoreClass ModestTnyAccountStoreClass;
25
26 struct _ModestTnyAccountStore {
27         GObject parent;
28 };
29
30 struct _ModestTnyAccountStoreClass {
31         GObjectClass parent_class;
32
33         void (*password_requested) (ModestTnyAccountStore *self,
34                                     const gchar *account_name,
35                                     gpointer user_data);
36 };
37
38 /* member functions */
39
40 /**
41  * modest_tny_account_store_get_type:
42  *
43  * Returns: GType of account store
44  */
45 GType        modest_tny_account_store_get_type    (void) G_GNUC_CONST;
46
47 /**
48  * modest_tny_account_store_new:
49  * @modest_acc_mgr: account manager to use for new account store
50  *
51  * creates new (tinymail) account store for account manager modest_acc_mgr
52  *
53  * Returns: GObject of newly created account store
54  */
55 GObject*    modest_tny_account_store_new         (ModestAccountMgr *modest_acc_mgr);
56
57 /**
58  * modest_tny_account_store_get_account_mgr:
59  * @self: a TnyAccountStore instance
60  *
61  * retrieve the account manager associated with this account store.
62  *
63  * Returns: the account manager for @self.
64  */
65 ModestAccountMgr *modest_tny_account_store_get_accout_mgr(ModestTnyAccountStore *self);
66
67 /**
68  * tny_account_store_get_session:
69  * @self: a TnyAccountStore instance
70  *
71  * retrieve current tinymail camel session
72  *
73  * Returns: current tinymail camel session
74  */
75 TnySessionCamel* tny_account_store_get_session (TnyAccountStore *self);
76
77
78 G_END_DECLS
79
80 #endif /* __MODEST_TNY_ACCOUNT_STORE_H__ */
81