libaccounts Reference Manual | ||||
---|---|---|---|---|
AccountsListIface; AccountsList; void accounts_list_add (AccountsList *accounts_list, AccountItem *account_item); void accounts_list_remove (AccountsList *accounts_list, AccountItem *account_item); GList* accounts_list_get_all (AccountsList *accounts_list);
The AccountsList interface consists of a few methods to manipulate a list of AccountItem objects. It is typically implemented by the user interface, which therefore will adjust its view accordingly. Account plugins report to it whenever an AccountItem is created or deleted, and on the other end listen to the "remove-item" signal to know when an account has to be deleted.
typedef struct { GTypeInterface g_iface; /* methods */ void (* add) (AccountsList *accounts_list, AccountItem *item); void (* remove) (AccountsList *accounts_list, AccountItem *item); GList* (* get_all) (AccountsList *accounts_list); } AccountsListIface;
void accounts_list_add (AccountsList *accounts_list, AccountItem *account_item);
Adds account_item
to accounts_list
.
accounts_list : |
the AccountsList. |
account_item : |
an AccountItem. |
void accounts_list_remove (AccountsList *accounts_list, AccountItem *account_item);
Removes account_item
from accounts_list
.
accounts_list : |
the AccountsList. |
account_item : |
an AccountItem. |
GList* accounts_list_get_all (AccountsList *accounts_list);
Lists all accounts registered in accounts_list
.
accounts_list : |
the AccountsList. |
Returns : | a GList of AccountItem objects. |
"add-item"
signalvoid user_function (AccountsList *accounts_list, AccountItem *account_item, gpointer user_data) : Run First / Action
Emitted when an account is added to an AccountList.
accounts_list : |
The AccountsList. |
account_item : |
The AccountItem being added. |
user_data : |
user data set when the signal handler was connected. |
"remove-item"
signalvoid user_function (AccountsList *accounts_list, AccountItem *account_item, gpointer user_data) : Run First / Action
Emitted when an account is removed to an AccountList.
accounts_list : |
The AccountsList. |
account_item : |
The AccountItem being removed. |
user_data : |
user data set when the signal handler was connected. |