![]() |
![]() |
![]() |
Evolution API Reference: libedataserver, utility library | ![]() |
---|---|---|---|---|
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);
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;
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 |
void e_account_list_construct (EAccountList *account_list, GConfClient *gconf);
account_list : | |
gconf : |
void e_account_list_save (EAccountList *account_list);
Saves account_list to GConf. Signals will be emitted for changes.
account_list : | an EAccountList |
void e_account_list_add (EAccountList *, EAccount *);
Add an account to the account list. Will emit the account-changed event.
Param1 : | |
Param2 : |
void e_account_list_change (EAccountList *, EAccount *);
Signal that the details of an account have changed.
Param1 : | |
Param2 : |
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 : |
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. |
void e_account_list_set_default (EAccountList *, EAccount *);
Set the account account to be the default account.
Param1 : | |
Param2 : |
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. |