OssoABookAccount

OssoABookAccount — Account

Synopsis




            OssoABookAccount;
void        (*OssoABookAccountAvailableCb)  (OssoABookAccount *account,
                                             GalagoAccount *galago,
                                             gpointer user_data);
enum        OssoABookAccountTypeFlags;
OssoABookAccount* osso_abook_account_get    (const char *vcard_field,
                                             const char *bound,
                                             const char *user_name);
const char* osso_abook_account_get_vcard_field
                                            (OssoABookAccount *account);
const char* osso_abook_account_get_bound    (OssoABookAccount *account);
const char* osso_abook_account_get_username (OssoABookAccount *account);
void        osso_abook_account_get_async    (const char *vcard_field,
                                             const char *bound,
                                             const char *user_name,
                                             OssoABookAccountAvailableCb cb,
                                             gpointer user_data);
OssoABookAccount* osso_abook_account_get_from_vcard
                                            (EVCardAttribute *attr);
GalagoAccount* osso_abook_account_get_galago_account
                                            (OssoABookAccount *account);


Object Hierarchy


  GObject
   +----OssoABookAccount

Properties


  "bound"                gchararray            : Read / Write / Construct Only
  "user-name"            gchararray            : Read / Write / Construct Only
  "vcard-field"          gchararray            : Read / Write / Construct Only

Signal Prototypes


"galago-account-available"
            void        user_function      (OssoABookAccount *account,
                                            GalagoAccount *galago_account,
                                            gpointer user_data);
"galago-account-unavailable"
            void        user_function      (OssoABookAccount *account,
                                            gpointer user_data);

Description

OssoABookAccount is an object that links username and services together.

Details

OssoABookAccount

typedef struct _OssoABookAccount OssoABookAccount;

OssoABookAccount has no public members.


OssoABookAccountAvailableCb ()

void        (*OssoABookAccountAvailableCb)  (OssoABookAccount *account,
                                             GalagoAccount *galago,
                                             gpointer user_data);

This is the callback that is called when osso_abook_account_get_async has completed.

account : The OssoABookAccount that called the callback
galago : The Galago account
user_data : The userdata passde into osso_abook_account_get_async

enum OssoABookAccountTypeFlags

typedef enum {
        OSSO_ABOOK_ACCOUNT_TYPE_CHAT  = 1 << 0,
        OSSO_ABOOK_ACCOUNT_TYPE_VOIP  = 1 << 1,
        OSSO_ABOOK_ACCOUNT_TYPE_EMAIL = 1 << 2,

        OSSO_ABOOK_ACCOUNT_TYPE_ALL   = (OSSO_ABOOK_ACCOUNT_TYPE_CHAT |
                                         OSSO_ABOOK_ACCOUNT_TYPE_VOIP |
                                         OSSO_ABOOK_ACCOUNT_TYPE_EMAIL)
} OssoABookAccountTypeFlags; 

Bitmask that specifies what type of features accounts should have

OSSO_ABOOK_ACCOUNT_TYPE_CHAT Accounts that support chat
OSSO_ABOOK_ACCOUNT_TYPE_VOIP Accounts that support VoIP
OSSO_ABOOK_ACCOUNT_TYPE_EMAIL Accounts that support email
OSSO_ABOOK_ACCOUNT_TYPE_ALL Accounts that support everything

osso_abook_account_get ()

OssoABookAccount* osso_abook_account_get    (const char *vcard_field,
                                             const char *bound,
                                             const char *user_name);

Retrieves the OssoABookAccount object for user_name on bound on vcard_field.

vcard_field : The service ID
bound : The bound account's user name
user_name : The user name
Returns : An OssoABookAccount object. g_object_unref() when done.

osso_abook_account_get_vcard_field ()

const char* osso_abook_account_get_vcard_field
                                            (OssoABookAccount *account);

Retrieves the vCard field ID for account.

account : An OssoABookAccount
Returns : The vCard field ID. This string is owned by libosso-abook and should not be freed.

osso_abook_account_get_bound ()

const char* osso_abook_account_get_bound    (OssoABookAccount *account);

Retrieves the bound account's username for account, or NULL if unknown.

account : An OssoABookAccount
Returns : The bound account's username. This string is owned by libosso-abook and should not be freed.

osso_abook_account_get_username ()

const char* osso_abook_account_get_username (OssoABookAccount *account);

Retrieves the user name for account.

account : An OssoABookAccount
Returns : The user name. This string is owned by libosso-abook and should not be freed.

osso_abook_account_get_async ()

void        osso_abook_account_get_async    (const char *vcard_field,
                                             const char *bound,
                                             const char *user_name,
                                             OssoABookAccountAvailableCb cb,
                                             gpointer user_data);

Retrieves asynchronously the OssoABookAccount object for user_name on bound on vcard_field.

vcard_field : The service ID
bound : The bound account's user name
user_name : The user name
cb : The callback that will receive the OssoABookAccount
user_data : User data to pass to the callback

osso_abook_account_get_from_vcard ()

OssoABookAccount* osso_abook_account_get_from_vcard
                                            (EVCardAttribute *attr);

Retrieves the OssoABookAccount object for the IM account specified in the attr. This is a convenience wrapper around osso_abook_account_get.

attr : a EVCardAttribute
Returns : An OssoABookAccount object. g_object_unref() when done.

osso_abook_account_get_galago_account ()

GalagoAccount* osso_abook_account_get_galago_account
                                            (OssoABookAccount *account);

Retrieves the equivalent GalagoAccount of account, if any.

account : An OssoABookAccount
Returns : The equivalent GalagoAccount, or NULL. Do not g_object_unref() the returned GalagoAccount.

Properties

The "bound" property

  "bound"                gchararray            : Read / Write / Construct Only

The bound account's user name.

Default value: NULL


The "user-name" property

  "user-name"            gchararray            : Read / Write / Construct Only

The user name.

Default value: NULL


The "vcard-field" property

  "vcard-field"          gchararray            : Read / Write / Construct Only

The vCard field ID.

Default value: NULL

Signals

The "galago-account-available" signal

void        user_function                  (OssoABookAccount *account,
                                            GalagoAccount *galago_account,
                                            gpointer user_data);

Signal emitted whenever a GalagoService gets a new GalagoAccount.

account : OssoABookAccount that emitted the signal.
galago_account : GalagoAccount that is available.
user_data : user data set when the signal handler was connected.

The "galago-account-unavailable" signal

void        user_function                  (OssoABookAccount *account,
                                            gpointer user_data);

Signal emitted whenever a GalagoService has an account removed.

account : OssoABookAccount that emitted the signal.
user_data : user data set when the signal handler was connected.