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
  "connected"                gboolean              : Read
  "display-name"             gchar*                : Read / Write
  "enabled"                  gboolean              : Read
  "name"                     gchar*                : Read / Write
  "service"                  AccountService*       : Read / Write / Construct Only
  "service-icon"             GdkPixbuf*            : Read
  "service-name"             gchar*                : 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; to do so, set the AccountItem.enabled member to the desired value and call g_object_notify() on the "enabled" property.

Note

In versions up to 3.73, the "enabled" property was 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 "connected" property

  "connected"                gboolean              : Read

Account connected.

Default value: FALSE


The "display-name" property

  "display-name"             gchar*                : Read / Write

Display name.

Default value: NULL


The "enabled" property

  "enabled"                  gboolean              : Read

Account enabled.

Default value: FALSE


The "name" property

  "name"                     gchar*                : 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"             gchar*                : Read

Service name.

Default value: NULL


The "supports-avatar" property

  "supports-avatar"          gboolean              : Read / Write

Supports avatar.

Default value: FALSE