OssoABookPresence

OssoABookPresence — Base class for presence objects.

Synopsis




            OssoABookPresence;
enum        OssoABookPresenceStatus;
OssoABookPresenceStatus osso_abook_presence_get_status
                                            (OssoABookPresence *presence);
const char* osso_abook_presence_get_icon_name
                                            (OssoABookPresence *presence);
int         osso_abook_presence_compare     (OssoABookPresence *a,
                                             OssoABookPresence *b);


Object Hierarchy


  GObject
   +----OssoABookPresence
         +----OssoABookAccountPresence
         +----OssoABookContactPresence

Properties


  "status"               OssoABookPresenceStatus  : Read

Description

OssoABookPresence is an object that represents the online presence.

Details

OssoABookPresence

typedef struct _OssoABookPresence OssoABookPresence;

There are no public fields in OssoABookPresence.


enum OssoABookPresenceStatus

typedef enum {
        OSSO_ABOOK_PRESENCE_ONLINE  = 0,
        OSSO_ABOOK_PRESENCE_AWAY    = 1,
        OSSO_ABOOK_PRESENCE_OFFLINE = 2,
        OSSO_ABOOK_PRESENCE_PENDING = 3,
        OSSO_ABOOK_PRESENCE_UNKNOWN = 4,
} OssoABookPresenceStatus;

The different statuses a presence can have.

OSSO_ABOOK_PRESENCE_ONLINE Online.
OSSO_ABOOK_PRESENCE_AWAY Away.
OSSO_ABOOK_PRESENCE_OFFLINE Offline.
OSSO_ABOOK_PRESENCE_PENDING Pending
OSSO_ABOOK_PRESENCE_UNKNOWN Unknown.

osso_abook_presence_get_status ()

OssoABookPresenceStatus osso_abook_presence_get_status
                                            (OssoABookPresence *presence);

Retreives the status of presence. Note that the "status" property can be monitored by connecting to the GObject "notify" signal with "status" as detail, i.e. "notify::status".

presence : An OssoABookPresence
Returns : An OssoABookPresenceStatus.

osso_abook_presence_get_icon_name ()

const char* osso_abook_presence_get_icon_name
                                            (OssoABookPresence *presence);

Retrieves the icon name associated with the current status of presence. The icon name can be used to look up the appropriate icon to represent presence until the "status" property changes.

presence : An OssoABookPresence
Returns : The icon name currently associated with presence. This string is owned by libosso-abook and should not be freed.

osso_abook_presence_compare ()

int         osso_abook_presence_compare     (OssoABookPresence *a,
                                             OssoABookPresence *b);

Compares the status of presence a to the status of presence b. See OssoABookPresenceStatus for the weights assigned to different statuses.

a : an OssoABookPresence
b : an OssoABookPresence
Returns : < 0 if presence a compares before presence b, 0 if they compare equal, > 0 if presence a compares after presence b.

Properties

The "status" property

  "status"               OssoABookPresenceStatus  : Read

The presence status.

Default value: OSSO_ABOOK_PRESENCE_UNKNOWN

See Also

OssoABookContactPresence, OssoABookAccountPresence