TnyStoreAccount

TnyStoreAccount — A type for getting folders and E-mails of an account

Synopsis




#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);

Object Hierarchy


  GInterface
   +----TnyStoreAccount

Prerequisites

TnyStoreAccount requires TnyFolderStore, TnyAccount and GObject.

Known Implementations

TnyStoreAccount is implemented by TnyCamelNNTPStoreAccount, TnyCamelIMAPStoreAccount, TnyCamelStoreAccount, TnyCombinedAccount and TnyCamelPOPStoreAccount.

Signals


  "subscription-changed"                           : Run First

Description

A store account contains the folders of an E-mail service and handles the authentication with the service.

Details

TNY_TYPE_STORE_ACCOUNT_SIGNAL

#define TNY_TYPE_STORE_ACCOUNT_SIGNAL (tny_store_account_signal_get_type ())


TnyStoreAccount

typedef struct _TnyStoreAccount TnyStoreAccount;


TnyStoreAccountIface

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;


tny_store_account_subscribe ()

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

tny_store_account_unsubscribe ()

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

tny_store_account_find_folder ()

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.

tny_store_account_delete_cache ()

void                tny_store_account_delete_cache      (TnyStoreAccount *self);

Delete the cache of a store account

self : a TnyStoreAccount object

Signal Details

The "subscription-changed" signal

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.

See Also

TnyFolderStore, TnyAccount