EAccountList

EAccountList

Synopsis

typedef             EAccountListPrivate;
enum                e_account_find_t;
EAccountList*       e_account_list_new                  (GConfClient *gconf);
void                e_account_list_construct            (EAccountList *account_list,
                                                         GConfClient *gconf);
void                e_account_list_save                 (EAccountList *account_list);
void                e_account_list_add                  (EAccountList *,
                                                         EAccount *);
void                e_account_list_change               (EAccountList *,
                                                         EAccount *);
void                e_account_list_remove               (EAccountList *,
                                                         EAccount *);
const EAccount*     e_account_list_get_default          (EAccountList *);
void                e_account_list_set_default          (EAccountList *,
                                                         EAccount *);
const EAccount*     e_account_list_find                 (EAccountList *,
                                                         e_account_find_t type,
                                                         const char *key);

Description

Details

EAccountListPrivate

typedef struct EAccountListPrivate EAccountListPrivate;


enum e_account_find_t

typedef enum _e_account_find_t {
	E_ACCOUNT_FIND_NAME,
	E_ACCOUNT_FIND_UID,
	E_ACCOUNT_FIND_ID_NAME,
	E_ACCOUNT_FIND_ID_ADDRESS,
	E_ACCOUNT_FIND_PARENT_UID,
} e_account_find_t;


e_account_list_new ()

EAccountList*       e_account_list_new                  (GConfClient *gconf);

Reads the list of accounts from gconf and listens for changes. Will emit account_added, account_changed, and account_removed signals according to notifications from GConf.

You can modify the list using e_list_append(), e_list_remove(), and e_iterator_delete(). After adding, removing, or changing accounts, you must call e_account_list_save() to push the changes back to GConf.

gconf : a GConfClient
Returns : the list of accounts

e_account_list_construct ()

void                e_account_list_construct            (EAccountList *account_list,
                                                         GConfClient *gconf);

account_list :
gconf :

e_account_list_save ()

void                e_account_list_save                 (EAccountList *account_list);

Saves account_list to GConf. Signals will be emitted for changes.

account_list : an EAccountList

e_account_list_add ()

void                e_account_list_add                  (EAccountList *,
                                                         EAccount *);

Add an account to the account list. Will emit the account-changed event.

Param1 :
Param2 :

e_account_list_change ()

void                e_account_list_change               (EAccountList *,
                                                         EAccount *);

Signal that the details of an account have changed.

Param1 :
Param2 :

e_account_list_remove ()

void                e_account_list_remove               (EAccountList *,
                                                         EAccount *);

Remove an account from the account list, and emit the account-removed signal. If the account was the default account, then reset the default to the first account.

Param1 :
Param2 :

e_account_list_get_default ()

const EAccount*     e_account_list_get_default          (EAccountList *);

Get the default account. If no default is specified, or the default has become stale, then the first account is made the default.

Param1 :
Returns : The account or NULL if no accounts are defined.

e_account_list_set_default ()

void                e_account_list_set_default          (EAccountList *,
                                                         EAccount *);

Set the account account to be the default account.

Param1 :
Param2 :

e_account_list_find ()

const EAccount*     e_account_list_find                 (EAccountList *,
                                                         e_account_find_t type,
                                                         const char *key);

Perform a search of the account list on a single key.

type must be set from one of the following search types: E_ACCOUNT_FIND_NAME - Find an account by account name. E_ACCOUNT_FIND_ID_NAME - Find an account by the owner's identity name. E_ACCOUNT_FIND_ID_ADDRESS - Find an account by the owner's identity address.

Param1 :
type : Type of search.
key : Search key.
Returns : The account or NULL if it doesn't exist.