AccountsList

AccountsList — List of account items.

Synopsis

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

Object Hierarchy

  GInterface
   +----AccountsList

Prerequisites

AccountsList requires GObject.

Signals

  "add-item"                                       : Run First / Action
  "remove-item"                                    : Run First / Action

Description

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.

Details

AccountsListIface

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;


AccountsList

typedef struct _AccountsList AccountsList;


accounts_list_add ()

void                accounts_list_add                   (AccountsList *accounts_list,
                                                         AccountItem *account_item);

Adds account_item to accounts_list.

accounts_list : the AccountsList.
account_item : an AccountItem.

accounts_list_remove ()

void                accounts_list_remove                (AccountsList *accounts_list,
                                                         AccountItem *account_item);

Removes account_item from accounts_list.

accounts_list : the AccountsList.
account_item : an AccountItem.

accounts_list_get_all ()

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.

Signal Details

The "add-item" signal

void                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.

The "remove-item" signal

void                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.