GalagoStatus

GalagoStatus — Status type in a presence.

Functions

Properties

gboolean exclusive Read / Write
gchar * id Read / Write / Construct Only
gchar * name Read / Write / Construct Only
GalagoPresence * presence Read / Write
GalagoStatusType primitive Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GalagoObject
        ╰── GalagoStatus

Description

GalagoStatus represents a single status in a GalagoPresence. A status is something like "available" or "away." They may hold attributes, such as an away message.

Some statuses are exclusive. "available" and "away" would be exclusive statuses. Some are not exclusive, such as "invisible." These status types are dependent on the server that they are on.

Functions

galago_status_new ()

GalagoStatus *
galago_status_new (GalagoStatusType type,
                   const char *id,
                   const char *name,
                   gboolean exclusive);

Creates a new status.

If exclusive is TRUE, the status will be exclusive. Only one exclusive status can be set at a time. If another exclusive status is set, the previously set exclusive status will be removed.

If exclusive is FALSE, the status will not be removed unless manually removed.

Parameters

type

The type of status.

 

id

The status ID.

 

name

The name of the status.

 

exclusive

TRUE if the status is exclusive.

 

Returns

The status.


galago_status_duplicate ()

GalagoStatus *
galago_status_duplicate (const GalagoStatus *status);

Duplicates a status.

Parameters

status

The status to duplicate.

 

Returns

The duplicate status.


galago_status_set_presence ()

void
galago_status_set_presence (GalagoStatus *status,
                            GalagoPresence *presence);

Sets the parent presence of a status.

This is intended for internal use only.

Parameters

status

The status.

 

presence

The presence.

 

galago_status_get_presence ()

GalagoPresence *
galago_status_get_presence (const GalagoStatus *status);

Returns the parent presence of a status.

Parameters

status

The status.

 

Returns

The presence.


galago_status_get_primitive ()

GalagoStatusType
galago_status_get_primitive (const GalagoStatus *status);

Returns the primitive type of a status.

Parameters

status

The status.

 

Returns

The status's primitive type.


galago_status_get_id ()

const char *
galago_status_get_id (const GalagoStatus *status);

Returns the status's ID.

Parameters

status

The status.

 

Returns

The status's ID.


galago_status_get_name ()

const char *
galago_status_get_name (const GalagoStatus *status);

Returns the status's name.

Parameters

status

The status.

 

Returns

The status's name.


galago_status_is_exclusive ()

gboolean
galago_status_is_exclusive (const GalagoStatus *status);

Returns whether or not a status is exclusive.

Parameters

status

The status.

 

Returns

TRUE if the status is exclusive, or FALSE.


galago_status_is_available ()

gboolean
galago_status_is_available (const GalagoStatus *status);

Returns whether or not a status is considered available.

Parameters

status

The status.

 

Returns

TRUE if the status is available, or FALSE.

Types and Values

enum GalagoStatusType

A type of status primitive. These are the most common ways to describe a status, and are used for availability determination and calculations.

Members

GALAGO_STATUS_UNSET

Unset. This is never set and only used as an error return type.

 

GALAGO_STATUS_OFFLINE

Offline.

 

GALAGO_STATUS_AVAILABLE

Available.

 

GALAGO_STATUS_AWAY

Away from the computer.

 

GALAGO_STATUS_EXTENDED_AWAY

Away for a long period of time.

 

GALAGO_STATUS_HIDDEN

Hidden from view from others.

 

GALAGO_STATUS_PENDING

Status information is pending.

 

GALAGO_STATUS_ID_AVAILABLE

#define GALAGO_STATUS_ID_AVAILABLE       "available"

Available.


GALAGO_STATUS_ID_AWAY

#define GALAGO_STATUS_ID_AWAY            "away"

Away from the computer.


GALAGO_STATUS_ID_BRB

#define GALAGO_STATUS_ID_BRB             "brb"

Be right back.


GALAGO_STATUS_ID_BUSY

#define GALAGO_STATUS_ID_BUSY            "busy"

Busy.


GALAGO_STATUS_ID_DND

#define GALAGO_STATUS_ID_DND             "dnd"

Do not disturb.


GALAGO_STATUS_ID_EXTENDED_AWAY

#define GALAGO_STATUS_ID_EXTENDED_AWAY   "xa"

Away for a longer period of time.


GALAGO_STATUS_ID_HIDDEN

#define GALAGO_STATUS_ID_HIDDEN          "hidden"

Hidden from others.


GALAGO_STATUS_ID_OFFLINE

#define GALAGO_STATUS_ID_OFFLINE         "offline"

Offline.


GALAGO_STATUS_ATTR_MESSAGE

#define GALAGO_STATUS_ATTR_MESSAGE "message"

Message status attribute. This is used for away and available message text.


struct GalagoStatus

struct GalagoStatus;

This is an opaque structure representing a status. This should not be used directly. Use the accessor functions below.

Property Details

The “exclusive” property

  “exclusive”                gboolean

The status's exclusive state.

Flags: Read / Write

Default value: FALSE


The “id” property

  “id”                       gchar *

The status's ID.

Flags: Read / Write / Construct Only

Default value: NULL


The “name” property

  “name”                     gchar *

The status's descriptive name.

Flags: Read / Write / Construct Only

Default value: NULL


The “presence” property

  “presence”                 GalagoPresence *

The presence object that this status belongs to.

Flags: Read / Write


The “primitive” property

  “primitive”                GalagoStatusType

The primitive type this status is based on.

Flags: Read / Write / Construct Only

Default value: GALAGO_STATUS_UNSET

See Also

GalagoPresence