![]() |
![]() |
![]() |
Reference Manual of the tinymail framework | ![]() |
---|---|---|---|---|
#define TNY_TYPE_STORE_ACCOUNT_SIGNAL TnyStoreAccount; TnyStoreAccountIface; void tny_store_account_subscribe (TnyStoreAccount *self, TnyFolder *folder); void tny_store_account_unsubscribe (TnyStoreAccount *self, TnyFolder *folder); TnyFolder* tny_store_account_find_folder (TnyStoreAccount *self, const gchar *url_string, GError **err); void tny_store_account_delete_cache (TnyStoreAccount *self);
TnyStoreAccount is implemented by TnyCamelNNTPStoreAccount, TnyCamelIMAPStoreAccount, TnyCamelStoreAccount, TnyCombinedAccount and TnyCamelPOPStoreAccount.
A store account contains the folders of an E-mail service and handles the authentication with the service.
#define TNY_TYPE_STORE_ACCOUNT_SIGNAL (tny_store_account_signal_get_type ())
typedef struct { GTypeInterface parent; /* Signals */ void (*subscription_changed) (TnyStoreAccount *self, TnyFolder *folder); /* Methods */ void (*subscribe_func) (TnyStoreAccount *self, TnyFolder *folder); void (*unsubscribe_func) (TnyStoreAccount *self, TnyFolder *folder); TnyFolder * (*find_folder_func) (TnyStoreAccount *self, const gchar *url_string, GError **err); void (*delete_cache_func) (TnyStoreAccount *self); } TnyStoreAccountIface;
void tny_store_account_subscribe (TnyStoreAccount *self, TnyFolder *folder);
API WARNING: This API might change
Subscribe to a folder
self : |
a TnyStoreAccount object |
folder : |
The folder to subscribe to |
void tny_store_account_unsubscribe (TnyStoreAccount *self, TnyFolder *folder);
API WARNING: This API might change
Unsubscribe from a folder
self : |
a TnyStoreAccount object |
folder : |
The folder to unsubscribe from |
TnyFolder* tny_store_account_find_folder (TnyStoreAccount *self, const gchar *url_string, GError **err);
Try to find the folder in self
that corresponds to url_string
. If this
method does not return NULL, the returned value is the found folder and
must be unreferenced after use.
Implementors: when implementing a TnyStoreAccount, you must implement
this method. Let it return the folder that corresponds to url_string
or
let it return NULL.
This method can be used to resolve url-strings to TnyAccount instances.
See tny_folder_get_url_string()
for details of the url
-string syntax.
self : |
a TnyStoreAccount object |
url_string : |
the url-string of the folder to find |
err : |
a GError object |
Returns : | the found account or NULL. |
void tny_store_account_delete_cache (TnyStoreAccount *self);
Delete the cache of a store account
self : |
a TnyStoreAccount object |
void user_function (TnyStoreAccount *self, TnyFolder *arg1, gpointer user_data) : Run First
Emitted when the subscription of a folder change
self : |
the object on which the signal is emitted |
arg1 : |
the TnyFolder of the folder whose subscription has changed |
user_data : |
user data set when the signal handler was connected |
user_data : |
user data set when the signal handler was connected. |