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 TnyAccount, TnyFolderStore 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;

A account that contains folders

free-function: g_object_unref


TnyStoreAccountIface

typedef struct {
	GTypeInterface parent;

	/* Signals */
	void (*subscription_changed) (TnyStoreAccount *self, TnyFolder *folder);

	/* Methods */
	void (*subscribe) (TnyStoreAccount *self, TnyFolder *folder);
	void (*unsubscribe) (TnyStoreAccount *self, TnyFolder *folder);
	TnyFolder * (*find_folder) (TnyStoreAccount *self, const gchar *url_string, GError **err);
	void (*delete_cache) (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

folder :

a TnyFolder to subscribe

Since 1.0 audience: application-developer


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

folder :

a TnyFolder to unsubscribe

Since 1.0 audience: application-developer


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.

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

url_string :

the url-string of the folder to find

err :

(null-ok): a GError or NULL

Returns :

(null-ok) (caller-owns): the found account or NULL.

Since 1.0 audience: application-developer


tny_store_account_delete_cache ()

void                tny_store_account_delete_cache      (TnyStoreAccount *self);

Delete the cache of a store account. After this operation becomes self an unusable instance. You must finalise it as soon as possible (use g_object_unref and/or take it out of your models).

self :

a TnyStoreAccount

Since 1.0 audience: application-developer

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 :

(null-ok): user data set when the signal handler was connected

user_data :

user data set when the signal handler was connected.

Since 1.0 audience: application-developer

See Also

TnyFolderStore, TnyAccount