AccountItem

AccountItem — A representation of an account.

Synopsis




            AccountItem;
gboolean    account_item_set_enabled        (AccountItem *account,
                                             gboolean enabled,
                                             GError **error);
AccountPlugin* account_item_get_plugin      (AccountItem *account);
AccountService* account_item_get_service    (AccountItem *account);

Object Hierarchy


  GObject
   +----AccountItem

Properties


  "avatar"               GdkPixbuf             : Read / Write
  "display-name"         gchararray            : Read / Write
  "enabled"              gboolean              : Read
  "name"                 gchararray            : Read / Write
  "service"              AccountService        : Read / Write / Construct Only
  "service-icon"         GdkPixbuf             : Read
  "service-name"         gchararray            : Read
  "supports-avatar"      gboolean              : Read / Write

Description

An AccountItem is an object which represents an account. It provides a method for enabling/disabling the account and methods for retrieving the AccountService and AccountPlugin it belongs to; the account data are exposed as properties.

Account plugins must subclass of AccountItem and implement the account_item_set_enabled() method.

Details

AccountItem

typedef struct _AccountItem AccountItem;


account_item_set_enabled ()

gboolean    account_item_set_enabled        (AccountItem *account,
                                             gboolean enabled,
                                             GError **error);

Enables or disables account.

This is a virtual method that must be implemented by account plugins by subclassing AccountItem. The method's task is to enable/disable the account; the AccountItem:enabled property will be set automatically, consistently with the method's return value.

account : the AccountItem.
enabled : whether to enable or disable the account.
error : a GError for error reporting, or NULL.
Returns : TRUE if success, FALSE on error.

account_item_get_plugin ()

AccountPlugin* account_item_get_plugin      (AccountItem *account);

Gets the plugin which manages this account item.

account : the AccountItem.
Returns : a AccountPlugin; its reference count is not incremented.

account_item_get_service ()

AccountService* account_item_get_service    (AccountItem *account);

Gets the service which this account item provides.

account : the AccountItem.
Returns : a AccountService; its reference count is not incremented.

Property Details

The "avatar" property

  "avatar"               GdkPixbuf             : Read / Write

Account avatar.


The "display-name" property

  "display-name"         gchararray            : Read / Write

Display name.

Default value: NULL


The "enabled" property

  "enabled"              gboolean              : Read

Account enabled.

Default value: FALSE


The "name" property

  "name"                 gchararray            : Read / Write

Account name.

Default value: NULL


The "service" property

  "service"              AccountService        : Read / Write / Construct Only

Service.


The "service-icon" property

  "service-icon"         GdkPixbuf             : Read

Service icon.


The "service-name" property

  "service-name"         gchararray            : Read

Service name.

Default value: NULL


The "supports-avatar" property

  "supports-avatar"      gboolean              : Read / Write

Supports avatar.

Default value: FALSE