22#ifndef _PURPLE_STATUS_H_ 
   23#define _PURPLE_STATUS_H_ 
   86typedef struct _PurpleStatusAttr      PurpleStatusAttr;
 
   87typedef struct _PurplePresence        PurplePresence;
 
   88typedef struct _PurpleStatus          PurpleStatus;
 
   92    const char *description;
 
 
  103    PURPLE_PRESENCE_CONTEXT_UNSET   = 0,
 
  104    PURPLE_PRESENCE_CONTEXT_ACCOUNT,
 
  105    PURPLE_PRESENCE_CONTEXT_CONV,
 
  106    PURPLE_PRESENCE_CONTEXT_BUDDY
 
 
  119    PURPLE_STATUS_UNSET = 0,
 
  120    PURPLE_STATUS_OFFLINE,
 
  121    PURPLE_STATUS_AVAILABLE,
 
  122    PURPLE_STATUS_UNAVAILABLE,
 
  123    PURPLE_STATUS_INVISIBLE,
 
  125    PURPLE_STATUS_EXTENDED_AWAY,
 
  126    PURPLE_STATUS_MOBILE,
 
  129    PURPLE_STATUS_NUM_PRIMITIVES
 
 
  137#define PURPLE_TUNE_ARTIST  "tune_artist" 
  138#define PURPLE_TUNE_TITLE   "tune_title" 
  139#define PURPLE_TUNE_ALBUM   "tune_album" 
  140#define PURPLE_TUNE_GENRE   "tune_genre" 
  141#define PURPLE_TUNE_COMMENT "tune_comment" 
  142#define PURPLE_TUNE_TRACK   "tune_track" 
  143#define PURPLE_TUNE_TIME    "tune_time" 
  144#define PURPLE_TUNE_YEAR    "tune_year" 
  145#define PURPLE_TUNE_URL     "tune_url" 
  146#define PURPLE_TUNE_FULL    "tune_full" 
  148#define PURPLE_MOOD_NAME    "mood" 
  149#define PURPLE_MOOD_COMMENT "moodtext" 
  215                                          const char *
id, 
const char *name,
 
  217                                          gboolean user_settable,
 
  218                                          gboolean independent);
 
  234                                     const char *
id, 
const char *name,
 
  235                                     gboolean user_settable);
 
  261                                                gboolean user_settable,
 
  262                                                gboolean independent,
 
  264                                                const char *attr_name,
 
  265                                                PurpleValue *attr_value, ...) G_GNUC_NULL_TERMINATED;
 
  274#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  288                                       const char *attr_id);
 
  291#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  308#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  323                                const char *name, 
PurpleValue *value, ...) G_GNUC_NULL_TERMINATED;
 
  326#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  422#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  536                            PurplePresence *presence);
 
  585#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  600#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  615#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  836#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  849#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) 
  874                                     const char *status_id, gboolean active);
 
  886                                 const char *status_id);
 
  973                                     const char *status_id);
 
 1015                                        const char *status_id);
 
 1071                           const PurplePresence *presence2);
 
void purple_status_destroy(PurpleStatus *status)
Destroys a status.
 
PurplePresence * purple_presence_new_for_conv(PurpleConversation *conv)
Creates a presence for a conversation.
 
int purple_status_get_attr_int(const PurpleStatus *status, const char *id)
Returns the integer value of an attribute in a status with the specified ID.
 
const PurpleStatusType * purple_status_type_find_with_id(GList *status_types, const char *id)
Find the PurpleStatusType with the given id.
 
gboolean purple_status_is_independent(const PurpleStatus *status)
Returns whether or not a status is independent.
 
PurplePresence * purple_presence_new_for_account(PurpleAccount *account)
Creates a presence for an account.
 
const char * purple_primitive_get_name_from_type(PurpleStatusPrimitive type)
Lookup the name of a primitive status type based on the type.
 
PurpleAccount * purple_presence_get_account(const PurplePresence *presence)
Returns a presence's account.
 
gboolean purple_status_is_active(const PurpleStatus *status)
Returns the active state of a status.
 
const char * purple_status_type_get_name(const PurpleStatusType *status_type)
Returns the name of a status type.
 
PurplePresenceContext
A context for a presence.
 
void purple_status_type_add_attrs_vargs(PurpleStatusType *status_type, va_list args)
Adds multiple attributes to a status type using a va_list.
 
PurpleValue * purple_status_attr_get_value(const PurpleStatusAttr *attr)
Returns the value of a status attribute.
 
const char * purple_status_get_name(const PurpleStatus *status)
Returns the status's name.
 
gboolean purple_presence_is_idle(const PurplePresence *presence)
Returns whether or not a presence is idle.
 
PurpleStatusPrimitive purple_primitive_get_type_from_id(const char *id)
Lookup the value of a primitive status type based on the id.
 
gboolean purple_status_type_is_user_settable(const PurpleStatusType *status_type)
Returns whether or not the status type can be set or modified by the user.
 
gboolean purple_status_is_online(const PurpleStatus *status)
Returns whether or not a status is considered 'online'.
 
struct _PurpleStatusType PurpleStatusType
PurpleStatusType's are created by each PRPL.
 
const char * purple_status_attr_get_name(const PurpleStatusAttr *attr)
Returns the name of a status attribute.
 
void purple_status_type_set_primary_attr(PurpleStatusType *status_type, const char *attr_id)
Sets a status type's primary attribute.
 
PurpleValue * purple_status_get_attr_value(const PurpleStatus *status, const char *id)
Returns the value of an attribute in a status with the specified ID.
 
gboolean purple_presence_is_online(const PurplePresence *presence)
Returns whether or not a presence is online.
 
void purple_presence_set_idle(PurplePresence *presence, gboolean idle, time_t idle_time)
Sets the idle state and time on a presence.
 
void purple_status_init(void)
Initializes the status subsystem.
 
PurpleStatus * purple_presence_get_active_status(const PurplePresence *presence)
Returns the active exclusive status from a presence.
 
void purple_status_set_attr_boolean(PurpleStatus *status, const char *id, gboolean value)
Sets the boolean value of an attribute in a status with the specified ID.
 
const char * purple_status_attr_get_id(const PurpleStatusAttr *attr)
Returns the ID of a status attribute.
 
void purple_status_uninit(void)
Uninitializes the status subsystem.
 
void purple_presence_add_status(PurplePresence *presence, PurpleStatus *status)
Adds a status to a presence.
 
void purple_status_type_add_attr(PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value)
Adds an attribute to a status type.
 
PurpleBuddy * purple_presence_get_buddy(const PurplePresence *presence)
Returns the presence's buddy.
 
GList * purple_status_type_get_attrs(const PurpleStatusType *status_type)
Returns a list of all attributes in a status type.
 
const char * purple_primitive_get_id_from_type(PurpleStatusPrimitive type)
Lookup the id of a primitive status type based on the type.
 
void purple_presence_switch_status(PurplePresence *presence, const char *status_id)
Switches the active status in a presence.
 
const char * purple_status_get_attr_string(const PurpleStatus *status, const char *id)
Returns the string value of an attribute in a status with the specified ID.
 
gboolean purple_presence_is_status_active(const PurplePresence *presence, const char *status_id)
Returns whether or not a status in a presence is active.
 
gboolean purple_status_type_is_independent(const PurpleStatusType *status_type)
Returns whether or not the status type is independent.
 
GList * purple_presence_get_statuses(const PurplePresence *presence)
Returns all the statuses in a presence.
 
void purple_status_set_active(PurpleStatus *status, gboolean active)
Sets whether or not a status is active.
 
const char * purple_presence_get_chat_user(const PurplePresence *presence)
Returns a presence's chat user.
 
gboolean purple_presence_is_status_primitive_active(const PurplePresence *presence, PurpleStatusPrimitive primitive)
Returns whether or not a status with the specified primitive type in a presence is active.
 
void purple_presence_destroy(PurplePresence *presence)
Destroys a presence.
 
PurpleStatusType * purple_status_type_new_full(PurpleStatusPrimitive primitive, const char *id, const char *name, gboolean saveable, gboolean user_settable, gboolean independent)
Creates a new status type.
 
PurplePresenceContext purple_presence_get_context(const PurplePresence *presence)
Returns the presence's context.
 
gboolean purple_status_type_is_saveable(const PurpleStatusType *status_type)
Returns whether or not the status type is saveable.
 
PurpleStatusType * purple_status_type_new(PurpleStatusPrimitive primitive, const char *id, const char *name, gboolean user_settable)
Creates a new status type with some default values ( saveable and not independent).
 
PurpleStatusType * purple_status_type_new_with_attrs(PurpleStatusPrimitive primitive, const char *id, const char *name, gboolean saveable, gboolean user_settable, gboolean independent, const char *attr_id, const char *attr_name, PurpleValue *attr_value,...) G_GNUC_NULL_TERMINATED
Creates a new status type with attributes.
 
PurplePresence * purple_presence_new_for_buddy(PurpleBuddy *buddy)
Creates a presence for a buddy.
 
gboolean purple_status_type_is_available(const PurpleStatusType *status_type)
Returns whether or not a status type is available.
 
void purple_status_type_destroy(PurpleStatusType *status_type)
Destroys a status type.
 
void purple_presence_add_list(PurplePresence *presence, GList *source_list)
Adds a list of statuses to the presence.
 
PurpleStatusPrimitive
A primitive defining the basic structure of a status type.
 
const char * purple_status_type_get_primary_attr(const PurpleStatusType *type)
Returns a status type's primary attribute ID.
 
PurpleStatusPrimitive purple_status_type_get_primitive(const PurpleStatusType *status_type)
Returns the primitive type of a status type.
 
PurpleStatusAttr * purple_status_attr_new(const char *id, const char *name, PurpleValue *value_type)
Creates a new status attribute.
 
gboolean purple_status_is_exclusive(const PurpleStatus *status)
Returns whether or not a status is exclusive.
 
const char * purple_status_type_get_id(const PurpleStatusType *status_type)
Returns the ID of a status type.
 
gboolean purple_presence_is_available(const PurplePresence *presence)
Returns whether or not a presence is available.
 
gint purple_status_compare(const PurpleStatus *status1, const PurpleStatus *status2)
Compares two statuses for availability.
 
void purple_status_type_add_attrs(PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value,...) G_GNUC_NULL_TERMINATED
Adds multiple attributes to a status type.
 
gboolean purple_status_type_is_exclusive(const PurpleStatusType *status_type)
Returns whether the status type is exclusive.
 
const char * purple_status_get_id(const PurpleStatus *status)
Returns the status's type ID.
 
void * purple_status_get_handle(void)
Get the handle for the status subsystem.
 
void purple_status_set_active_with_attrs(PurpleStatus *status, gboolean active, va_list args)
Sets whether or not a status is active.
 
void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active, GList *attrs)
Sets whether or not a status is active.
 
PurpleStatusType * purple_status_get_type(const PurpleStatus *status)
Returns the status's type.
 
void purple_status_set_attr_string(PurpleStatus *status, const char *id, const char *value)
Sets the string value of an attribute in a status with the specified ID.
 
void purple_presence_set_status_active(PurplePresence *presence, const char *status_id, gboolean active)
Sets the active state of a status in a presence.
 
void purple_status_attr_destroy(PurpleStatusAttr *attr)
Destroys a status attribute.
 
PurpleStatusAttr * purple_status_type_get_attr(const PurpleStatusType *status_type, const char *id)
Returns the attribute with the specified ID.
 
gboolean purple_status_is_available(const PurpleStatus *status)
Returns whether or not a status is available.
 
gboolean purple_status_get_attr_boolean(const PurpleStatus *status, const char *id)
Returns the boolean value of an attribute in a status with the specified ID.
 
PurplePresence * purple_presence_new(PurplePresenceContext context)
Creates a new presence.
 
void purple_presence_set_login_time(PurplePresence *presence, time_t login_time)
Sets the login time on a presence.
 
time_t purple_presence_get_idle_time(const PurplePresence *presence)
Returns the presence's idle time.
 
PurpleConversation * purple_presence_get_conversation(const PurplePresence *presence)
Returns a presence's conversation.
 
PurplePresence * purple_status_get_presence(const PurpleStatus *status)
Returns the status's presence.
 
PurpleStatus * purple_presence_get_status(const PurplePresence *presence, const char *status_id)
Returns the status with the specified ID from a presence.
 
time_t purple_presence_get_login_time(const PurplePresence *presence)
Returns the presence's login time.
 
gint purple_presence_compare(const PurplePresence *presence1, const PurplePresence *presence2)
Compares two presences for availability.
 
void purple_status_set_attr_int(PurpleStatus *status, const char *id, int value)
Sets the integer value of an attribute in a status with the specified ID.
 
PurpleStatus * purple_status_new(PurpleStatusType *status_type, PurplePresence *presence)
Creates a new status.
 
A wrapper for a type, subtype, and specific type of value.
 
Structure representing an account.
 
A core representation of a conversation between two or more people.