![]() |
![]() |
![]() |
libgalago Reference Manual | ![]() |
---|---|---|---|---|
enum GalagoStatusType; #define GALAGO_STATUS_ID_AVAILABLE #define GALAGO_STATUS_ID_AWAY #define GALAGO_STATUS_ID_BRB #define GALAGO_STATUS_ID_BUSY #define GALAGO_STATUS_ID_DND #define GALAGO_STATUS_ID_EXTENDED_AWAY #define GALAGO_STATUS_ID_HIDDEN #define GALAGO_STATUS_ID_OFFLINE #define GALAGO_STATUS_ATTR_MESSAGE GalagoStatus; GalagoStatus* galago_status_new (GalagoStatusType type, const char *id, const char *name, gboolean exclusive); GalagoStatus* galago_status_duplicate (const GalagoStatus *status); void galago_status_set_presence (GalagoStatus *status, GalagoPresence *presence); GalagoPresence* galago_status_get_presence (const GalagoStatus *status); GalagoStatusType galago_status_get_primitive (const GalagoStatus *status); const char* galago_status_get_id (const GalagoStatus *status); const char* galago_status_get_name (const GalagoStatus *status); gboolean galago_status_is_exclusive (const GalagoStatus *status); gboolean galago_status_is_available (const GalagoStatus *status);
"exclusive" gboolean : Read / Write "id" gchararray : Read / Write / Construct Only "name" gchararray : Read / Write / Construct Only "presence" GalagoPresence : Read / Write "primitive" GalagoStatusType : Read / Write / Construct Only
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.
typedef enum { GALAGO_STATUS_UNSET = 0, GALAGO_STATUS_OFFLINE, GALAGO_STATUS_AVAILABLE, GALAGO_STATUS_AWAY, GALAGO_STATUS_EXTENDED_AWAY, GALAGO_STATUS_HIDDEN, GALAGO_STATUS_PENDING } GalagoStatusType;
A type of status primitive. These are the most common ways to describe a status, and are used for availability determination and calculations.
#define GALAGO_STATUS_ID_EXTENDED_AWAY
Away for a longer period of time.
#define GALAGO_STATUS_ATTR_MESSAGE
Message status attribute. This is used for away and available message text.
typedef struct _GalagoStatus GalagoStatus;
This is an opaque structure representing a status. This should not be used directly. Use the accessor functions below.
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.
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. |
GalagoStatus* galago_status_duplicate (const GalagoStatus *status);
Duplicates a status.
status : |
The status to duplicate. |
Returns : | The duplicate status. |
void galago_status_set_presence (GalagoStatus *status, GalagoPresence *presence);
Sets the parent presence of a status.
This is intended for internal use only.
status : |
The status. |
presence : |
The presence. |
GalagoPresence* galago_status_get_presence (const GalagoStatus *status);
Returns the parent presence of a status.
status : |
The status. |
Returns : | The presence. |
GalagoStatusType galago_status_get_primitive (const GalagoStatus *status);
Returns the primitive type of a status.
status : |
The status. |
Returns : | The status's primitive type. |
const char* galago_status_get_id (const GalagoStatus *status);
Returns the status's ID.
status : |
The status. |
Returns : | The status's ID. |
const char* galago_status_get_name (const GalagoStatus *status);
Returns the status's name.
status : |
The status. |
Returns : | The status's name. |
gboolean galago_status_is_exclusive (const GalagoStatus *status);
Returns whether or not a status is exclusive.
status : |
The status. |
Returns : | TRUE if the status is exclusive, or FALSE. |
gboolean galago_status_is_available (const GalagoStatus *status);
Returns whether or not a status is considered available.
status : |
The status. |
Returns : | TRUE if the status is available, or FALSE. |
exclusive
" property"exclusive" gboolean : Read / Write
The status's exclusive state.
Default value: FALSE
id
" property"id" gchararray : Read / Write / Construct Only
The status's ID.
Default value: NULL
name
" property"name" gchararray : Read / Write / Construct Only
The status's descriptive name.
Default value: NULL
presence
" property"presence" GalagoPresence : Read / Write
The presence object that this status belongs to.
primitive
" property"primitive" GalagoStatusType : Read / Write / Construct Only
The primitive type this status is based on.
Default value: GALAGO_STATUS_UNSET