X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-account-mgr-helpers.h;h=e649d04e1304c7e4f88ab846150de5470b7f51da;hb=af22975e59fa7288ce28e7cf089eb12f7f2e07b8;hp=093c4d633cece40db54278ac4610cc2deeb9b000;hpb=b7f38bb7c72c7ec821ce2a556c59d1e88d226f37;p=modest diff --git a/src/modest-account-mgr-helpers.h b/src/modest-account-mgr-helpers.h index 093c4d6..e649d04 100644 --- a/src/modest-account-mgr-helpers.h +++ b/src/modest-account-mgr-helpers.h @@ -34,23 +34,30 @@ #include #include +#include +#include +#include + G_BEGIN_DECLS typedef struct { - gchar *account_name; - gchar *hostname; - gchar *username; - ModestProtocol proto; - gchar *password; - GSList *options; + gchar *account_name; + gchar *hostname; + gchar *username; + gchar *uri; + ModestProtocol proto; /*< The store or transport. Not ORed. */ + gchar *password; + time_t last_updated; + GSList *options; } ModestServerAccountData; typedef struct { - gchar *account_name; - gchar *display_name; - gchar *fullname; - gchar *email; - gboolean enabled; + gchar *account_name; + gchar *display_name; + gchar *fullname; + gchar *email; + gboolean is_enabled; + gboolean is_default; ModestServerAccountData *transport_account; ModestServerAccountData *store_account; } ModestAccountData; @@ -105,10 +112,8 @@ gboolean modest_account_mgr_set_default_account (ModestAccountMgr *self, void modest_account_mgr_free_account_data (ModestAccountMgr *self, ModestAccountData *data); - - /** - * modest_account_mgr_account_set_enabled + * modest_account_mgr_set_enabled * @self: a ModestAccountMgr instance * @name: the account name * @enabled: if TRUE, the account will be enabled, if FALSE, it will be disabled @@ -117,11 +122,11 @@ void modest_account_mgr_free_account_data (ModestAccountMgr *self, * * Returns: TRUE if it worked, FALSE otherwise */ -gboolean modest_account_mgr_account_set_enabled (ModestAccountMgr *self, const gchar* name, - gboolean enabled); +gboolean modest_account_mgr_set_enabled (ModestAccountMgr *self, const gchar* name, + gboolean enabled); /** - * modest_account_mgr_account_get_enabled: + * modest_account_mgr_get_enabled: * @self: a ModestAccountMgr instance * @name: the account name to check * @@ -129,7 +134,19 @@ gboolean modest_account_mgr_account_set_enabled (ModestAccountMgr *self, const g * * Returns: TRUE if it is enabled, FALSE otherwise */ -gboolean modest_account_mgr_account_get_enabled (ModestAccountMgr *self, const gchar* name); +gboolean modest_account_mgr_get_enabled (ModestAccountMgr *self, const gchar* name); + + +/** + * modest_account_mgr_get_from_string + * @self: a #ModestAccountMgr instance + * @name: the account name + * + * get the From: string for some account; ie. "Foo Bar" " + * + * Returns: the newly allocated from-string, or NULL in case of error + */ +gchar * modest_account_mgr_get_from_string (ModestAccountMgr *self, const gchar* name); G_END_DECLS