pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

status.h File Reference
#include "account.h"
#include "blist.h"
#include "conversation.h"
#include "value.h"
Include dependency graph for status.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _PurpleMood
 

Macros

#define PURPLE_TUNE_ARTIST   "tune_artist"
 
#define PURPLE_TUNE_TITLE   "tune_title"
 
#define PURPLE_TUNE_ALBUM   "tune_album"
 
#define PURPLE_TUNE_GENRE   "tune_genre"
 
#define PURPLE_TUNE_COMMENT   "tune_comment"
 
#define PURPLE_TUNE_TRACK   "tune_track"
 
#define PURPLE_TUNE_TIME   "tune_time"
 
#define PURPLE_TUNE_YEAR   "tune_year"
 
#define PURPLE_TUNE_URL   "tune_url"
 
#define PURPLE_TUNE_FULL   "tune_full"
 
#define PURPLE_MOOD_NAME   "mood"
 
#define PURPLE_MOOD_COMMENT   "moodtext"
 

Typedefs

typedef struct _PurpleStatusType PurpleStatusType
 
typedef struct _PurpleStatusAttr PurpleStatusAttr
 
typedef struct _PurplePresence PurplePresence
 
typedef struct _PurpleStatus PurpleStatus
 
typedef struct _PurpleMood PurpleMood
 

Enumerations

enum  PurplePresenceContext { PURPLE_PRESENCE_CONTEXT_UNSET = 0, PURPLE_PRESENCE_CONTEXT_ACCOUNT, PURPLE_PRESENCE_CONTEXT_CONV, PURPLE_PRESENCE_CONTEXT_BUDDY }
 
enum  PurpleStatusPrimitive {
  PURPLE_STATUS_UNSET = 0, PURPLE_STATUS_OFFLINE, PURPLE_STATUS_AVAILABLE, PURPLE_STATUS_UNAVAILABLE,
  PURPLE_STATUS_INVISIBLE, PURPLE_STATUS_AWAY, PURPLE_STATUS_EXTENDED_AWAY, PURPLE_STATUS_MOBILE,
  PURPLE_STATUS_TUNE, PURPLE_STATUS_MOOD, PURPLE_STATUS_NUM_PRIMITIVES
}
 

Functions

PurpleStatusPrimitive API
const char * purple_primitive_get_id_from_type (PurpleStatusPrimitive type)
 
const char * purple_primitive_get_name_from_type (PurpleStatusPrimitive type)
 
PurpleStatusPrimitive purple_primitive_get_type_from_id (const char *id)
 
PurpleStatusType API
PurpleStatusTypepurple_status_type_new_full (PurpleStatusPrimitive primitive, const char *id, const char *name, gboolean saveable, gboolean user_settable, gboolean independent)
 
PurpleStatusTypepurple_status_type_new (PurpleStatusPrimitive primitive, const char *id, const char *name, gboolean user_settable)
 
PurpleStatusTypepurple_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
 
void purple_status_type_destroy (PurpleStatusType *status_type)
 
void purple_status_type_set_primary_attr (PurpleStatusType *status_type, const char *attr_id)
 
void purple_status_type_add_attr (PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value)
 
void purple_status_type_add_attrs (PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value,...) G_GNUC_NULL_TERMINATED
 
void purple_status_type_add_attrs_vargs (PurpleStatusType *status_type, va_list args)
 
PurpleStatusPrimitive purple_status_type_get_primitive (const PurpleStatusType *status_type)
 
const char * purple_status_type_get_id (const PurpleStatusType *status_type)
 
const char * purple_status_type_get_name (const PurpleStatusType *status_type)
 
gboolean purple_status_type_is_saveable (const PurpleStatusType *status_type)
 
gboolean purple_status_type_is_user_settable (const PurpleStatusType *status_type)
 
gboolean purple_status_type_is_independent (const PurpleStatusType *status_type)
 
gboolean purple_status_type_is_exclusive (const PurpleStatusType *status_type)
 
gboolean purple_status_type_is_available (const PurpleStatusType *status_type)
 
const char * purple_status_type_get_primary_attr (const PurpleStatusType *type)
 
PurpleStatusAttrpurple_status_type_get_attr (const PurpleStatusType *status_type, const char *id)
 
GList * purple_status_type_get_attrs (const PurpleStatusType *status_type)
 
const PurpleStatusTypepurple_status_type_find_with_id (GList *status_types, const char *id)
 
PurpleStatusAttr API
PurpleStatusAttrpurple_status_attr_new (const char *id, const char *name, PurpleValue *value_type)
 
void purple_status_attr_destroy (PurpleStatusAttr *attr)
 
const char * purple_status_attr_get_id (const PurpleStatusAttr *attr)
 
const char * purple_status_attr_get_name (const PurpleStatusAttr *attr)
 
PurpleValuepurple_status_attr_get_value (const PurpleStatusAttr *attr)
 
PurpleStatus API
PurpleStatuspurple_status_new (PurpleStatusType *status_type, PurplePresence *presence)
 
void purple_status_destroy (PurpleStatus *status)
 
void purple_status_set_active (PurpleStatus *status, gboolean active)
 
void purple_status_set_active_with_attrs (PurpleStatus *status, gboolean active, va_list args)
 
void purple_status_set_active_with_attrs_list (PurpleStatus *status, gboolean active, GList *attrs)
 
void purple_status_set_attr_boolean (PurpleStatus *status, const char *id, gboolean value)
 
void purple_status_set_attr_int (PurpleStatus *status, const char *id, int value)
 
void purple_status_set_attr_string (PurpleStatus *status, const char *id, const char *value)
 
PurpleStatusTypepurple_status_get_type (const PurpleStatus *status)
 
PurplePresencepurple_status_get_presence (const PurpleStatus *status)
 
const char * purple_status_get_id (const PurpleStatus *status)
 
const char * purple_status_get_name (const PurpleStatus *status)
 
gboolean purple_status_is_independent (const PurpleStatus *status)
 
gboolean purple_status_is_exclusive (const PurpleStatus *status)
 
gboolean purple_status_is_available (const PurpleStatus *status)
 
gboolean purple_status_is_active (const PurpleStatus *status)
 
gboolean purple_status_is_online (const PurpleStatus *status)
 
PurpleValuepurple_status_get_attr_value (const PurpleStatus *status, const char *id)
 
gboolean purple_status_get_attr_boolean (const PurpleStatus *status, const char *id)
 
int purple_status_get_attr_int (const PurpleStatus *status, const char *id)
 
const char * purple_status_get_attr_string (const PurpleStatus *status, const char *id)
 
gint purple_status_compare (const PurpleStatus *status1, const PurpleStatus *status2)
 
PurplePresence API
PurplePresencepurple_presence_new (PurplePresenceContext context)
 
PurplePresencepurple_presence_new_for_account (PurpleAccount *account)
 
PurplePresencepurple_presence_new_for_conv (PurpleConversation *conv)
 
PurplePresencepurple_presence_new_for_buddy (PurpleBuddy *buddy)
 
void purple_presence_destroy (PurplePresence *presence)
 
void purple_presence_add_status (PurplePresence *presence, PurpleStatus *status)
 
void purple_presence_add_list (PurplePresence *presence, GList *source_list)
 
void purple_presence_set_status_active (PurplePresence *presence, const char *status_id, gboolean active)
 
void purple_presence_switch_status (PurplePresence *presence, const char *status_id)
 
void purple_presence_set_idle (PurplePresence *presence, gboolean idle, time_t idle_time)
 
void purple_presence_set_login_time (PurplePresence *presence, time_t login_time)
 
PurplePresenceContext purple_presence_get_context (const PurplePresence *presence)
 
PurpleAccountpurple_presence_get_account (const PurplePresence *presence)
 
PurpleConversationpurple_presence_get_conversation (const PurplePresence *presence)
 
const char * purple_presence_get_chat_user (const PurplePresence *presence)
 
PurpleBuddypurple_presence_get_buddy (const PurplePresence *presence)
 
GList * purple_presence_get_statuses (const PurplePresence *presence)
 
PurpleStatuspurple_presence_get_status (const PurplePresence *presence, const char *status_id)
 
PurpleStatuspurple_presence_get_active_status (const PurplePresence *presence)
 
gboolean purple_presence_is_available (const PurplePresence *presence)
 
gboolean purple_presence_is_online (const PurplePresence *presence)
 
gboolean purple_presence_is_status_active (const PurplePresence *presence, const char *status_id)
 
gboolean purple_presence_is_status_primitive_active (const PurplePresence *presence, PurpleStatusPrimitive primitive)
 
gboolean purple_presence_is_idle (const PurplePresence *presence)
 
time_t purple_presence_get_idle_time (const PurplePresence *presence)
 
time_t purple_presence_get_login_time (const PurplePresence *presence)
 
gint purple_presence_compare (const PurplePresence *presence1, const PurplePresence *presence2)
 
Status subsystem
voidpurple_status_get_handle (void)
 
void purple_status_init (void)
 
void purple_status_uninit (void)
 

Detailed Description

Status API

A brief explanation of the status API:

PurpleStatusType's are created by each PRPL. They outline the available statuses of the protocol. AIM, for example, supports an available state with an optional available message, an away state with a mandatory message, and an invisible state (which is technically "independent" of the other two, but we'll get into that later). PurpleStatusTypes are very permanent. They are hardcoded in each PRPL and will not change often. And because they are hardcoded, they do not need to be saved to any XML file.

A PurpleStatus can be thought of as an "instance" of a PurpleStatusType. If you're familiar with object-oriented programming languages then this should be immediately clear. Say, for example, that one of your AIM buddies has set himself as "away." You have a PurpleBuddy node for this person in your buddy list. Purple wants to mark this buddy as "away," so it creates a new PurpleStatus. The PurpleStatus has its PurpleStatusType set to the "away" state for the oscar PRPL. The PurpleStatus also contains the buddy's away message. PurpleStatuses are sometimes saved, depending on the context. The current PurpleStatuses associated with each of your accounts are saved so that the next time you start Purple, your accounts will be set to their last known statuses. There is also a list of saved statuses that are written to the status.xml file. Also, each PurpleStatus has a "saveable" boolean. If "saveable" is set to FALSE then the status is NEVER saved. All PurpleStatuses should be inside a PurplePresence.

A PurpleStatus is either "independent" or "exclusive." Independent statuses can be active or inactive and they don't affect anything else. However, you can only have one exclusive status per PurplePresence. If you activate one exclusive status, then the previous exclusive status is automatically deactivated.

A PurplePresence is like a collection of PurpleStatuses (plus some other random info). For any buddy, or for any one of your accounts, or for any person with which you're chatting, you may know various amounts of information. This information is all contained in one PurplePresence. If one of your buddies is away and idle, then the presence contains the PurpleStatus for their awayness, and it contains their current idle time. PurplePresences are never saved to disk. The information they contain is only relevant for the current PurpleSession.

Definition in file status.h.

Macro Definition Documentation

◆ PURPLE_MOOD_COMMENT

#define PURPLE_MOOD_COMMENT   "moodtext"

Definition at line 149 of file status.h.

◆ PURPLE_MOOD_NAME

#define PURPLE_MOOD_NAME   "mood"

Definition at line 148 of file status.h.

◆ PURPLE_TUNE_ALBUM

#define PURPLE_TUNE_ALBUM   "tune_album"

Definition at line 139 of file status.h.

◆ PURPLE_TUNE_ARTIST

#define PURPLE_TUNE_ARTIST   "tune_artist"

Definition at line 137 of file status.h.

◆ PURPLE_TUNE_COMMENT

#define PURPLE_TUNE_COMMENT   "tune_comment"

Definition at line 141 of file status.h.

◆ PURPLE_TUNE_FULL

#define PURPLE_TUNE_FULL   "tune_full"

Definition at line 146 of file status.h.

◆ PURPLE_TUNE_GENRE

#define PURPLE_TUNE_GENRE   "tune_genre"

Definition at line 140 of file status.h.

◆ PURPLE_TUNE_TIME

#define PURPLE_TUNE_TIME   "tune_time"

Definition at line 143 of file status.h.

◆ PURPLE_TUNE_TITLE

#define PURPLE_TUNE_TITLE   "tune_title"

Definition at line 138 of file status.h.

◆ PURPLE_TUNE_TRACK

#define PURPLE_TUNE_TRACK   "tune_track"

Definition at line 142 of file status.h.

◆ PURPLE_TUNE_URL

#define PURPLE_TUNE_URL   "tune_url"

Definition at line 145 of file status.h.

◆ PURPLE_TUNE_YEAR

#define PURPLE_TUNE_YEAR   "tune_year"

Definition at line 144 of file status.h.

Typedef Documentation

◆ PurpleMood

typedef struct _PurpleMood PurpleMood

◆ PurplePresence

Definition at line 87 of file status.h.

◆ PurpleStatus

typedef struct _PurpleStatus PurpleStatus

Definition at line 88 of file status.h.

◆ PurpleStatusAttr

Definition at line 86 of file status.h.

◆ PurpleStatusType

PurpleStatusType's are created by each PRPL. They outline the available statuses of the protocol. AIM, for example, supports an available state with an optional available message, an away state with a mandatory message, and an invisible state (which is technically "independent" of the other two, but we'll get into that later). PurpleStatusTypes are very permanent. They are hardcoded in each PRPL and will not change often. And because they are hardcoded, they do not need to be saved to any XML file.

Definition at line 85 of file status.h.

Enumeration Type Documentation

◆ PurplePresenceContext

A context for a presence.

The context indicates to what the presence applies.

Enumerator
PURPLE_PRESENCE_CONTEXT_UNSET 
PURPLE_PRESENCE_CONTEXT_ACCOUNT 
PURPLE_PRESENCE_CONTEXT_CONV 
PURPLE_PRESENCE_CONTEXT_BUDDY 

Definition at line 101 of file status.h.

◆ PurpleStatusPrimitive

A primitive defining the basic structure of a status type.

Enumerator
PURPLE_STATUS_UNSET 
PURPLE_STATUS_OFFLINE 
PURPLE_STATUS_AVAILABLE 
PURPLE_STATUS_UNAVAILABLE 
PURPLE_STATUS_INVISIBLE 
PURPLE_STATUS_AWAY 
PURPLE_STATUS_EXTENDED_AWAY 
PURPLE_STATUS_MOBILE 
PURPLE_STATUS_TUNE 
PURPLE_STATUS_MOOD 
PURPLE_STATUS_NUM_PRIMITIVES 

Definition at line 117 of file status.h.

Function Documentation

◆ purple_presence_add_list()

void purple_presence_add_list ( PurplePresence presence,
GList *  source_list 
)

Adds a list of statuses to the presence.

Parameters
presenceThe presence.
source_listThe source list of statuses to add, which is not modified or freed by this function.
Deprecated:
This function isn't used and should be removed in 3.0.0.

Definition at line 1199 of file status.c.

References NULL, and purple_presence_add_status().

◆ purple_presence_add_status()

void purple_presence_add_status ( PurplePresence presence,
PurpleStatus status 
)

Adds a status to a presence.

Parameters
presenceThe presence.
statusThe status to add.
Deprecated:
This function is only used by purple_presence_add_list, and both should be removed in 3.0.0.

Definition at line 1187 of file status.c.

References NULL, purple_status_get_id(), status, _PurplePresence::status_table, and _PurplePresence::statuses.

Referenced by purple_presence_add_list().

Here is the caller graph for this function:

◆ purple_presence_compare()

gint purple_presence_compare ( const PurplePresence presence1,
const PurplePresence presence2 
)

Compares two presences for availability.

Parameters
presence1The first presence.
presence2The second presence.
Returns
-1 if presence1 is more available than presence2. 0 if presence1 is equal to presence2. 1 if presence1 is less available than presence2.

Definition at line 1598 of file status.c.

References NULL, primitive_scores, purple_presence_compute_score(), purple_presence_get_idle_time(), purple_presence_is_online(), SCORE_IDLE_TIME, and time().

Referenced by blist_node_compare_status(), blist_node_compare_text(), purple_contact_compute_priority_buddy(), and sort_method_status().

Here is the caller graph for this function:

◆ purple_presence_destroy()

void purple_presence_destroy ( PurplePresence presence)

Destroys a presence.

All statuses added to this list will be destroyed along with the presence.

Parameters
presenceThe presence to destroy.

Definition at line 1164 of file status.c.

References _PurplePresence::buddy, _PurplePresence::chat, _PurpleBuddy::name, NULL, PURPLE_DBUS_UNREGISTER_POINTER, PURPLE_PRESENCE_CONTEXT_BUDDY, PURPLE_PRESENCE_CONTEXT_CONV, purple_presence_get_context(), purple_status_destroy(), _PurplePresence::status_table, _PurplePresence::statuses, and _PurplePresence::u.

Referenced by purple_account_destroy(), and purple_buddy_destroy().

Here is the caller graph for this function:

◆ purple_presence_get_account()

PurpleAccount* purple_presence_get_account ( const PurplePresence presence)

Returns a presence's account.

Parameters
presenceThe presence.
Returns
The presence's account.

Definition at line 1395 of file status.c.

References _PurplePresence::account, context, NULL, PURPLE_PRESENCE_CONTEXT_ACCOUNT, PURPLE_PRESENCE_CONTEXT_BUDDY, purple_presence_get_context(), and _PurplePresence::u.

Referenced by notify_status_update(), purple_presence_compute_score(), purple_presence_set_idle(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_get_active_status()

◆ purple_presence_get_buddy()

PurpleBuddy* purple_presence_get_buddy ( const PurplePresence presence)

Returns the presence's buddy.

Parameters
presenceThe presence.
Returns
The presence's buddy.

Definition at line 1430 of file status.c.

References _PurplePresence::buddy, NULL, PURPLE_PRESENCE_CONTEXT_BUDDY, purple_presence_get_context(), and _PurplePresence::u.

Referenced by compare_buddy_presence(), generate_send_to_items(), generate_send_to_menu(), notify_status_update(), purple_presence_compute_score(), and purple_presence_set_idle().

Here is the caller graph for this function:

◆ purple_presence_get_chat_user()

const char* purple_presence_get_chat_user ( const PurplePresence presence)

Returns a presence's chat user.

Parameters
presenceThe presence.
Returns
The chat's user.

Definition at line 1420 of file status.c.

References _PurplePresence::chat, NULL, PURPLE_PRESENCE_CONTEXT_CONV, purple_presence_get_context(), and _PurplePresence::u.

Referenced by tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_get_context()

PurplePresenceContext purple_presence_get_context ( const PurplePresence presence)

Returns the presence's context.

Parameters
presenceThe presence.
Returns
The presence's context.

Definition at line 1387 of file status.c.

References _PurplePresence::context, NULL, and PURPLE_PRESENCE_CONTEXT_UNSET.

Referenced by notify_status_update(), purple_presence_destroy(), purple_presence_get_account(), purple_presence_get_buddy(), purple_presence_get_chat_user(), purple_presence_get_conversation(), purple_presence_set_idle(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_get_conversation()

PurpleConversation* purple_presence_get_conversation ( const PurplePresence presence)

Returns a presence's conversation.

Parameters
presenceThe presence.
Returns
The presence's conversation.

Definition at line 1410 of file status.c.

References _PurplePresence::chat, NULL, PURPLE_PRESENCE_CONTEXT_CONV, purple_presence_get_context(), and _PurplePresence::u.

Referenced by tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_get_idle_time()

time_t purple_presence_get_idle_time ( const PurplePresence presence)

Returns the presence's idle time.

Parameters
presenceThe presence.
Returns
The presence's idle time.

Definition at line 1557 of file status.c.

References _PurplePresence::idle_time, and NULL.

Referenced by buddy_node(), jabber_presence_fake_to_self(), jabber_stream_new(), pidgin_blist_get_name_markup(), pidgin_get_tooltip_text(), purple_bosrights(), purple_presence_compare(), tcl_cmd_presence(), and tooltip_for_buddy().

Here is the caller graph for this function:

◆ purple_presence_get_login_time()

time_t purple_presence_get_login_time ( const PurplePresence presence)

Returns the presence's login time.

Parameters
presenceThe presence.
Returns
The presence's login time.

Definition at line 1565 of file status.c.

References _PurplePresence::login_time, NULL, and purple_presence_is_online().

Referenced by pidgin_get_tooltip_text(), purple_account_get_log(), purple_connection_set_state(), purple_prpl_got_user_login_time(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_get_status()

◆ purple_presence_get_statuses()

GList* purple_presence_get_statuses ( const PurplePresence presence)

Returns all the statuses in a presence.

Parameters
presenceThe presence.

@constreturn The statuses.

Definition at line 1440 of file status.c.

References NULL, and _PurplePresence::statuses.

Referenced by purple_presence_compute_score(), purple_presence_get_status(), purple_presence_is_status_primitive_active(), statuses_to_xmlnode(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_is_available()

gboolean purple_presence_is_available ( const PurplePresence presence)

Returns whether or not a presence is available.

Available presences are online and possibly invisible, but not away or idle.

Parameters
presenceThe presence.
Returns
TRUE if the presence is available, or FALSE otherwise.

Definition at line 1487 of file status.c.

References FALSE, NULL, purple_presence_get_active_status(), purple_presence_is_idle(), purple_status_is_available(), and status.

Referenced by bonjour_login(), bonjour_set_status(), bonjour_tooltip_text(), finch_pounce_editor_show(), get_display_color(), iconify_windows(), pidgin_blist_get_name_markup(), pidgin_pounce_editor_show(), purple_pounce_execute(), serv_send_im(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_is_idle()

◆ purple_presence_is_online()

gboolean purple_presence_is_online ( const PurplePresence presence)

◆ purple_presence_is_status_active()

gboolean purple_presence_is_status_active ( const PurplePresence presence,
const char *  status_id 
)

Returns whether or not a status in a presence is active.

A status is active if itself or any of its sub-statuses are active.

Parameters
presenceThe presence.
status_idThe ID of the status.
Returns
TRUE if the status is active, or FALSE.

Definition at line 1513 of file status.c.

References FALSE, NULL, purple_presence_get_status(), purple_status_is_active(), status, and status_id.

Referenced by purple_account_is_status_active(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_is_status_primitive_active()

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.

A status is active if itself or any of its sub-statuses are active.

Parameters
presenceThe presence.
primitiveThe status primitive.
Returns
TRUE if the status is active, or FALSE.

Definition at line 1527 of file status.c.

References FALSE, NULL, purple_presence_get_statuses(), purple_status_get_type(), purple_status_is_active(), purple_status_type_get_primitive(), PURPLE_STATUS_UNSET, TRUE, and dbus-analyze-signals::type.

Referenced by buddychange(), get_display_name(), jabber_status_text(), jabber_tooltip_text(), oscar_list_emblem(), pidgin_blist_get_emblem(), pidgin_blist_get_status_icon(), pidgin_conv_get_tab_icons(), serv_got_im(), tcl_cmd_presence(), and tooltip_for_buddy().

Here is the caller graph for this function:

◆ purple_presence_new()

PurplePresence* purple_presence_new ( PurplePresenceContext  context)

Creates a new presence.

Parameters
contextThe presence context.
Returns
A new presence.

Definition at line 1098 of file status.c.

References context, _PurplePresence::context, NULL, PURPLE_DBUS_REGISTER_POINTER, PURPLE_PRESENCE_CONTEXT_UNSET, and _PurplePresence::status_table.

Referenced by purple_presence_new_for_account(), purple_presence_new_for_buddy(), and purple_presence_new_for_conv().

Here is the caller graph for this function:

◆ purple_presence_new_for_account()

PurplePresence* purple_presence_new_for_account ( PurpleAccount account)

Creates a presence for an account.

Parameters
accountThe account.
Returns
The new presence.

Definition at line 1117 of file status.c.

References account, _PurplePresence::account, NULL, PURPLE_PRESENCE_CONTEXT_ACCOUNT, purple_presence_new(), purple_prpl_get_statuses(), _PurplePresence::statuses, and _PurplePresence::u.

Referenced by purple_account_new().

Here is the caller graph for this function:

◆ purple_presence_new_for_buddy()

PurplePresence* purple_presence_new_for_buddy ( PurpleBuddy buddy)

Creates a presence for a buddy.

Parameters
buddyThe buddy.
Returns
The new presence.

Definition at line 1144 of file status.c.

References account, _PurpleBuddy::account, _PurplePresence::buddy, _PurpleBuddy::name, NULL, purple_buddy_get_account(), purple_buddy_get_name(), PURPLE_PRESENCE_CONTEXT_BUDDY, purple_presence_new(), purple_prpl_get_statuses(), _PurplePresence::statuses, and _PurplePresence::u.

Referenced by purple_buddy_new().

Here is the caller graph for this function:

◆ purple_presence_new_for_conv()

PurplePresence* purple_presence_new_for_conv ( PurpleConversation conv)

Creates a presence for a conversation.

Parameters
convThe conversation.
Returns
The new presence.

Definition at line 1130 of file status.c.

References _PurplePresence::chat, NULL, PURPLE_PRESENCE_CONTEXT_CONV, purple_presence_new(), and _PurplePresence::u.

◆ purple_presence_set_idle()

void purple_presence_set_idle ( PurplePresence presence,
gboolean  idle,
time_t  idle_time 
)

◆ purple_presence_set_login_time()

void purple_presence_set_login_time ( PurplePresence presence,
time_t  login_time 
)

Sets the login time on a presence.

Parameters
presenceThe presence.
login_timeThe login time.

Definition at line 1376 of file status.c.

References _PurplePresence::login_time, and NULL.

Referenced by purple_connection_set_state(), purple_prpl_got_account_login_time(), purple_prpl_got_user_login_time(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_presence_set_status_active()

void purple_presence_set_status_active ( PurplePresence presence,
const char *  status_id,
gboolean  active 
)

Sets the active state of a status in a presence.

Only independent statuses can be set unactive. Normal statuses can only be set active, so if you wish to disable a status, set another non-independent status to active, or use purple_presence_switch_status().

Parameters
presenceThe presence.
status_idThe ID of the status.
activeThe active state.

Definition at line 1211 of file status.c.

References NULL, purple_debug_warning(), purple_presence_get_status(), purple_status_is_exclusive(), purple_status_set_active(), status, and status_id.

Referenced by purple_account_new(), purple_blist_remove_account(), purple_buddy_new(), and purple_presence_switch_status().

Here is the caller graph for this function:

◆ purple_presence_switch_status()

void purple_presence_switch_status ( PurplePresence presence,
const char *  status_id 
)

Switches the active status in a presence.

This is similar to purple_presence_set_status_active(), except it won't activate independent statuses.

Parameters
presenceThe presence.
status_idThe status ID to switch to.

Definition at line 1242 of file status.c.

References purple_presence_set_status_active(), status_id, and TRUE.

◆ purple_primitive_get_id_from_type()

const char* purple_primitive_get_id_from_type ( PurpleStatusPrimitive  type)

Lookup the id of a primitive status type based on the type. This ID is a unique plain-text name of the status, without spaces.

Parameters
typeA primitive status type.
Returns
The unique ID for this type.

Definition at line 174 of file status.c.

References PurpleStatusPrimitiveMap::id, PURPLE_STATUS_NUM_PRIMITIVES, status_primitive_map, and dbus-analyze-signals::type.

Referenced by create_status_type_menu(), ggp_generic_status_handler(), purple_status_type_new_full(), status_to_xmlnode(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_primitive_get_name_from_type()

const char* purple_primitive_get_name_from_type ( PurpleStatusPrimitive  type)

Lookup the name of a primitive status type based on the type. This name is the plain-English name of the status type. It is usually one or two words.

Parameters
typeA primitive status type.
Returns
The name of this type, suitable for users to see.

Definition at line 188 of file status.c.

References _(), name, PURPLE_STATUS_NUM_PRIMITIVES, status_primitive_map, and dbus-analyze-signals::type.

Referenced by add_status_to_saved_status_list(), create_status_type_menu(), finch_savedstatus_edit(), pidgin_status_box_refresh(), pidgin_status_menu_add_primitive(), populate_status_dropdown(), populate_statuses(), purple_savedstatus_get_title(), purple_status_type_new_full(), and save_savedstatus_cb().

Here is the caller graph for this function:

◆ purple_primitive_get_type_from_id()

PurpleStatusPrimitive purple_primitive_get_type_from_id ( const char *  id)

Lookup the value of a primitive status type based on the id. The ID is a unique plain-text name of the status, without spaces.

Parameters
idThe unique ID of a primitive status type.
Returns
The PurpleStatusPrimitive value.

Definition at line 202 of file status.c.

References NULL, PURPLE_STATUS_NUM_PRIMITIVES, PURPLE_STATUS_UNSET, purple_strequal(), status_primitive_map, and PurpleStatusPrimitiveMap::type.

Referenced by parse_status(), tcl_cmd_account(), and tcl_cmd_presence().

Here is the caller graph for this function:

◆ purple_status_attr_destroy()

void purple_status_attr_destroy ( PurpleStatusAttr attr)

Destroys a status attribute.

Parameters
attrThe status attribute to destroy.

Definition at line 517 of file status.c.

References _PurpleStatusAttr::id, _PurpleStatusAttr::name, NULL, PURPLE_DBUS_UNREGISTER_POINTER, purple_value_destroy(), and _PurpleStatusAttr::value_type.

Referenced by purple_status_type_destroy().

Here is the caller graph for this function:

◆ purple_status_attr_get_id()

const char* purple_status_attr_get_id ( const PurpleStatusAttr attr)

Returns the ID of a status attribute.

Parameters
attrThe status attribute.
Returns
The status attribute's ID.

Definition at line 531 of file status.c.

References _PurpleStatusAttr::id, and NULL.

Referenced by purple_status_new(), purple_status_type_get_attr(), status_attr_to_xmlnode(), and tcl_cmd_status_attr().

Here is the caller graph for this function:

◆ purple_status_attr_get_name()

const char* purple_status_attr_get_name ( const PurpleStatusAttr attr)

Returns the name of a status attribute.

Parameters
attrThe status attribute.
Returns
The status attribute's name.

Definition at line 539 of file status.c.

References _PurpleStatusAttr::name, and NULL.

Referenced by tcl_cmd_status_attr().

Here is the caller graph for this function:

◆ purple_status_attr_get_value()

PurpleValue* purple_status_attr_get_value ( const PurpleStatusAttr attr)

Returns the value of a status attribute.

Parameters
attrThe status attribute.
Returns
The status attribute's value.

Definition at line 547 of file status.c.

References NULL, and _PurpleStatusAttr::value_type.

Referenced by purple_status_new(), purple_status_set_active_with_attrs_list(), and status_attr_to_xmlnode().

Here is the caller graph for this function:

◆ purple_status_attr_new()

PurpleStatusAttr* purple_status_attr_new ( const char *  id,
const char *  name,
PurpleValue value_type 
)

Creates a new status attribute.

Parameters
idThe ID of the attribute.
nameThe name presented to the user.
value_typeThe type of data contained in the attribute.
Returns
A new status attribute.

Definition at line 498 of file status.c.

References _PurpleStatusAttr::id, name, _PurpleStatusAttr::name, NULL, PURPLE_DBUS_REGISTER_POINTER, and _PurpleStatusAttr::value_type.

Referenced by purple_status_type_add_attr().

Here is the caller graph for this function:

◆ purple_status_compare()

gint purple_status_compare ( const PurpleStatus status1,
const PurpleStatus status2 
)

Compares two statuses for availability.

Parameters
status1The first status.
status2The second status.
Returns
-1 if status1 is more available than status2. 0 if status1 is equal to status2. 1 if status2 is more available than status1.

Definition at line 1061 of file status.c.

References NULL, primitive_scores, purple_status_get_type(), purple_status_is_active(), and purple_status_type_get_primitive().

◆ purple_status_destroy()

void purple_status_destroy ( PurpleStatus status)

Destroys a status.

Parameters
statusThe status to destroy.

Definition at line 596 of file status.c.

References NULL, PURPLE_DBUS_UNREGISTER_POINTER, and status.

Referenced by purple_presence_destroy().

Here is the caller graph for this function:

◆ purple_status_get_attr_boolean()

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.

Parameters
statusThe status.
idThe attribute ID.
Returns
The boolean value of the attribute.

Definition at line 1013 of file status.c.

References FALSE, NULL, purple_status_get_attr_value(), PURPLE_TYPE_BOOLEAN, purple_value_get_boolean(), purple_value_get_type(), status, and value.

Referenced by jabber_presence_send(), and purple_status_set_active_with_attrs_list().

Here is the caller graph for this function:

◆ purple_status_get_attr_int()

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.

Parameters
statusThe status.
idThe attribute ID.
Returns
The integer value of the attribute.

Definition at line 1029 of file status.c.

References NULL, purple_status_get_attr_value(), PURPLE_TYPE_INT, purple_value_get_int(), purple_value_get_type(), status, and value.

Referenced by jabber_presence_send(), purple_status_set_active_with_attrs_list(), and purple_status_to_jabber().

Here is the caller graph for this function:

◆ purple_status_get_attr_string()

◆ purple_status_get_attr_value()

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.

Parameters
statusThe status.
idThe attribute ID.
Returns
The value of the attribute.

Definition at line 1004 of file status.c.

References NULL, and status.

Referenced by jabber_presence_send(), parse_status_attrs(), purple_status_get_attr_boolean(), purple_status_get_attr_int(), purple_status_get_attr_string(), purple_status_set_active_with_attrs_list(), purple_status_set_attr_boolean(), purple_status_set_attr_int(), purple_status_set_attr_string(), serv_got_im(), status_attr_to_xmlnode(), tcl_cmd_account(), and tcl_cmd_status().

Here is the caller graph for this function:

◆ purple_status_get_handle()

void* purple_status_get_handle ( void  )

Get the handle for the status subsystem.

Returns
the handle to the status subsystem

Definition at line 1654 of file status.c.

References handle.

Referenced by purple_status_init().

Here is the caller graph for this function:

◆ purple_status_get_id()

◆ purple_status_get_name()

const char* purple_status_get_name ( const PurpleStatus status)

Returns the status's name.

This is a convenience method for purple_status_type_get_name(purple_status_get_type(status)).

Parameters
statusThe status.
Returns
The status's name.

Definition at line 951 of file status.c.

References NULL, purple_status_get_type(), purple_status_type_get_name(), and status.

Referenced by account_status_changed(), bonjour_tooltip_text(), ggp_tooltip_text(), icq_relay_xstatus(), mw_prpl_set_status(), notify_buddy_status_update(), nullprpl_set_status(), nullprpl_status_text(), nullprpl_tooltip_text(), oscar_set_status(), oscar_status_text(), oscar_user_info_append_status(), pidgin_status_box_refresh(), status_menu_refresh_iter(), status_text(), and status_to_xmlnode().

Here is the caller graph for this function:

◆ purple_status_get_presence()

PurplePresence* purple_status_get_presence ( const PurpleStatus status)

Returns the status's presence.

Parameters
statusThe status.
Returns
The status's presence.

Definition at line 935 of file status.c.

References NULL, and status.

Referenced by iconify_windows(), novell_set_status(), purple_bosrights(), and status_has_changed().

Here is the caller graph for this function:

◆ purple_status_get_type()

◆ purple_status_init()

◆ purple_status_is_active()

gboolean purple_status_is_active ( const PurpleStatus status)

◆ purple_status_is_available()

gboolean purple_status_is_available ( const PurpleStatus status)

Returns whether or not a status is available.

Available statuses are online and possibly invisible, but not away or idle.

This is a convenience method for purple_status_type_is_available(purple_status_get_type(status)).

Parameters
statusThe status.
Returns
TRUE if the status is available, or FALSE otherwise.

Definition at line 975 of file status.c.

References FALSE, NULL, purple_status_get_type(), purple_status_type_is_available(), and status.

Referenced by account_status_changed_cb(), buddy_status_changed_cb(), buddy_typing_cb(), hide_new_pref_cb(), oscar_status_text(), oscar_user_info_append_status(), purple_bosrights(), purple_parse_oncoming(), purple_presence_is_available(), purple_savedstatus_set_idleaway(), purple_sound_play_required(), and received_im_msg_cb().

Here is the caller graph for this function:

◆ purple_status_is_exclusive()

gboolean purple_status_is_exclusive ( const PurpleStatus status)

Returns whether or not a status is exclusive.

This is a convenience method for purple_status_type_is_exclusive(purple_status_get_type(status)).

Parameters
statusThe status.
Returns
TRUE if the status is exclusive, FALSE otherwise.

Definition at line 967 of file status.c.

References FALSE, NULL, purple_status_get_type(), purple_status_type_is_exclusive(), and status.

Referenced by buddy_status_changed_cb(), jabber_set_status(), purple_presence_set_status_active(), purple_prpl_change_account_status(), purple_status_set_active_with_attrs_list(), and status_has_changed().

Here is the caller graph for this function:

◆ purple_status_is_independent()

gboolean purple_status_is_independent ( const PurpleStatus status)

Returns whether or not a status is independent.

This is a convenience method for purple_status_type_is_independent(purple_status_get_type(status)).

Parameters
statusThe status.
Returns
TRUE if the status is independent, or FALSE otherwise.

Definition at line 959 of file status.c.

References FALSE, NULL, purple_status_get_type(), purple_status_type_is_independent(), and status.

Referenced by oscar_set_status(), and purple_account_set_status_list().

Here is the caller graph for this function:

◆ purple_status_is_online()

gboolean purple_status_is_online ( const PurpleStatus status)

Returns whether or not a status is considered 'online'

Parameters
statusThe status.
Returns
TRUE if the status is considered online, FALSE otherwise

Definition at line 991 of file status.c.

References FALSE, NULL, purple_status_get_type(), PURPLE_STATUS_OFFLINE, purple_status_type_get_primitive(), PURPLE_STATUS_UNSET, and status.

Referenced by do_prpl_change_account_status(), do_signon(), purple_blist_update_buddy_status(), purple_presence_compute_score(), purple_presence_is_online(), purple_prpl_got_user_status(), purple_sound_play_required(), and update_buddy_status_changed().

Here is the caller graph for this function:

◆ purple_status_new()

PurpleStatus* purple_status_new ( PurpleStatusType status_type,
PurplePresence presence 
)

Creates a new status.

Parameters
status_typeThe type of status.
presenceThe parent presence.
Returns
The new status.

Definition at line 559 of file status.c.

References NULL, PURPLE_DBUS_REGISTER_POINTER, purple_status_attr_get_id(), purple_status_attr_get_value(), purple_status_type_get_attrs(), purple_value_destroy(), purple_value_dup(), status, and value.

Referenced by purple_prpl_get_statuses().

Here is the caller graph for this function:

◆ purple_status_set_active()

void purple_status_set_active ( PurpleStatus status,
gboolean  active 
)

Sets whether or not a status is active.

This should only be called by the account, conversation, and buddy APIs.

Parameters
statusThe status.
activeThe active state.

Definition at line 710 of file status.c.

References NULL, purple_status_set_active_with_attrs_list(), and status.

Referenced by purple_presence_set_status_active(), purple_prpl_got_user_status_deactive(), and purple_util_set_current_song().

Here is the caller graph for this function:

◆ purple_status_set_active_with_attrs()

void purple_status_set_active_with_attrs ( PurpleStatus status,
gboolean  active,
va_list  args 
)

Sets whether or not a status is active.

This should only be called by the account, conversation, and buddy APIs.

Parameters
statusThe status.
activeThe active state.
argsA list of attributes to set on the status. This list is composed of key/value pairs, where each key is a valid attribute name for this PurpleStatusType. The list should be NULL terminated.

Definition at line 722 of file status.c.

References dbus-analyze-signals::args, data, NULL, purple_status_set_active_with_attrs_list(), and status.

Referenced by purple_prpl_got_account_status(), purple_prpl_got_user_status(), and set_status_with_attrs().

Here is the caller graph for this function:

◆ purple_status_set_active_with_attrs_list()

void purple_status_set_active_with_attrs_list ( PurpleStatus status,
gboolean  active,
GList *  attrs 
)

Sets whether or not a status is active.

This should only be called by the account, conversation, and buddy APIs.

Parameters
statusThe status.
activeThe active state.
attrsA list of attributes to set on the status. This list is composed of key/value pairs, where each key is a valid attribute name for this PurpleStatusType. The list is not modified or freed by this function.

Definition at line 739 of file status.c.

References FALSE, _PurpleStatusAttr::id, NULL, purple_debug_error(), purple_debug_warning(), purple_status_attr_get_value(), purple_status_get_attr_boolean(), purple_status_get_attr_int(), purple_status_get_attr_string(), purple_status_get_attr_value(), purple_status_get_id(), purple_status_get_type(), purple_status_is_exclusive(), purple_status_set_attr_boolean(), purple_status_set_attr_int(), purple_status_set_attr_string(), purple_status_type_get_attrs(), purple_strequal(), PURPLE_TYPE_BOOLEAN, PURPLE_TYPE_INT, PURPLE_TYPE_STRING, purple_value_get_boolean(), purple_value_get_int(), purple_value_get_string(), status, status_has_changed(), TRUE, PurpleValue::type, and value.

Referenced by purple_account_set_status_list(), purple_status_set_active(), and purple_status_set_active_with_attrs().

Here is the caller graph for this function:

◆ purple_status_set_attr_boolean()

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.

Parameters
statusThe status.
idThe attribute ID.
valueThe boolean value.
Deprecated:
This function is only used by status.c and should be made static in 3.0.0.

Definition at line 865 of file status.c.

References NULL, purple_status_get_attr_value(), PURPLE_TYPE_BOOLEAN, purple_value_get_type(), purple_value_set_boolean(), status, and value.

Referenced by purple_status_set_active_with_attrs_list(), and tcl_cmd_status().

Here is the caller graph for this function:

◆ purple_status_set_attr_int()

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.

Parameters
statusThe status.
idThe attribute ID.
valueThe integer value.
Deprecated:
This function is only used by status.c and should be made static in 3.0.0.

Definition at line 882 of file status.c.

References NULL, purple_status_get_attr_value(), PURPLE_TYPE_INT, purple_value_get_type(), purple_value_set_int(), status, and value.

Referenced by purple_status_set_active_with_attrs_list(), and tcl_cmd_status().

Here is the caller graph for this function:

◆ purple_status_set_attr_string()

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.

Parameters
statusThe status.
idThe attribute ID.
valueThe string value.
Deprecated:
This function is only used by status.c and should be made static in 3.0.0.

Definition at line 898 of file status.c.

References NULL, purple_debug_error(), purple_status_get_attr_value(), purple_status_get_type(), purple_status_type_get_name(), PURPLE_TYPE_STRING, purple_value_get_type(), purple_value_set_string(), status, and value.

Referenced by purple_status_set_active_with_attrs_list(), and tcl_cmd_status().

Here is the caller graph for this function:

◆ purple_status_type_add_attr()

void purple_status_type_add_attr ( PurpleStatusType status_type,
const char *  id,
const char *  name,
PurpleValue value 
)

Adds an attribute to a status type.

Parameters
status_typeThe status type to add the attribute to.
idThe ID of the attribute.
nameThe name presented to the user.
valueThe value type of this attribute.
Deprecated:
This function isn't needed and should be removed in 3.0.0. Status type attributes should be set when the status type is created, in the call to purple_status_type_new_with_attrs.

Definition at line 316 of file status.c.

References _PurpleStatusType::attrs, name, NULL, purple_status_attr_new(), and value.

Referenced by purple_status_type_add_attrs(), purple_status_type_add_attrs_vargs(), and purple_status_type_new_with_attrs().

Here is the caller graph for this function:

◆ purple_status_type_add_attrs()

void purple_status_type_add_attrs ( PurpleStatusType status_type,
const char *  id,
const char *  name,
PurpleValue value,
  ... 
)

Adds multiple attributes to a status type.

Parameters
status_typeThe status type to add the attribute to.
idThe ID of the first attribute.
nameThe description of the first attribute.
valueThe value type of the first attribute attribute.
...Additional attribute information.
Deprecated:
This function isn't needed and should be removed in 3.0.0. Status type attributes should be set when the status type is created, in the call to purple_status_type_new_with_attrs.

Definition at line 352 of file status.c.

References dbus-analyze-signals::args, name, NULL, purple_status_type_add_attr(), purple_status_type_add_attrs_vargs(), and value.

◆ purple_status_type_add_attrs_vargs()

void purple_status_type_add_attrs_vargs ( PurpleStatusType status_type,
va_list  args 
)

Adds multiple attributes to a status type using a va_list.

Parameters
status_typeThe status type to add the attribute to.
argsThe va_list of attributes.
Deprecated:
This function isn't needed and should be removed in 3.0.0. Status type attributes should be set when the status type is created, in the call to purple_status_type_new_with_attrs.

Definition at line 332 of file status.c.

References dbus-analyze-signals::args, name, NULL, purple_status_type_add_attr(), and value.

Referenced by purple_status_type_add_attrs(), and purple_status_type_new_with_attrs().

Here is the caller graph for this function:

◆ purple_status_type_destroy()

void purple_status_type_destroy ( PurpleStatusType status_type)

Destroys a status type.

Parameters
status_typeThe status type to destroy.

Definition at line 291 of file status.c.

References _PurpleStatusType::attrs, _PurpleStatusType::id, _PurpleStatusType::name, NULL, _PurpleStatusType::primary_attr_id, PURPLE_DBUS_UNREGISTER_POINTER, and purple_status_attr_destroy().

Referenced by purple_account_set_status_types().

Here is the caller graph for this function:

◆ purple_status_type_find_with_id()

const PurpleStatusType* purple_status_type_find_with_id ( GList *  status_types,
const char *  id 
)

Find the PurpleStatusType with the given id.

Parameters
status_typesA list of status types. Often account->status_types.
idThe unique ID of the status type you wish to find.
Returns
The status type with the given ID, or NULL if one could not be found.

Definition at line 474 of file status.c.

References _PurpleStatusType::id, NULL, and purple_strequal().

Referenced by parse_substatus(), and update_to_reflect_account_status().

Here is the caller graph for this function:

◆ purple_status_type_get_attr()

PurpleStatusAttr* purple_status_type_get_attr ( const PurpleStatusType status_type,
const char *  id 
)

Returns the attribute with the specified ID.

Parameters
status_typeThe status type containing the attribute.
idThe ID of the desired attribute.
Returns
The attribute, if found. NULL otherwise.

Definition at line 447 of file status.c.

References _PurpleStatusType::attrs, NULL, purple_status_attr_get_id(), and purple_strequal().

Referenced by pidgin_status_box_changed(), purple_savedstatus_activate_for_account(), status_attr_to_xmlnode(), status_editor_set_account(), substatus_editor_ok_cb(), substatus_selection_changed_cb(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_get_attrs()

GList* purple_status_type_get_attrs ( const PurpleStatusType status_type)

Returns a list of all attributes in a status type.

Parameters
status_typeThe status type.

@constreturn The list of attributes.

Definition at line 466 of file status.c.

References _PurpleStatusType::attrs, and NULL.

Referenced by purple_status_new(), purple_status_set_active_with_attrs_list(), status_attrs_to_xmlnode(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_get_id()

const char* purple_status_type_get_id ( const PurpleStatusType status_type)

◆ purple_status_type_get_name()

const char* purple_status_type_get_name ( const PurpleStatusType status_type)

Returns the name of a status type.

Parameters
status_typeThe status type.
Returns
The name of the status type.

Definition at line 387 of file status.c.

References _PurpleStatusType::name, and NULL.

Referenced by add_account_statuses(), add_substatus(), check_active_accounts_for_identical_statuses(), edit_substatus(), popup_substatus(), purple_status_get_name(), purple_status_set_attr_string(), save_substatus_cb(), status_editor_set_account(), substatus_editor_ok_cb(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_get_primary_attr()

const char* purple_status_type_get_primary_attr ( const PurpleStatusType type)

Returns a status type's primary attribute ID.

Parameters
typeThe status type.
Returns
The primary attribute's ID.
Deprecated:
This function isn't used and should be removed in 3.0.0.

Definition at line 439 of file status.c.

References NULL, and _PurpleStatusType::primary_attr_id.

Referenced by tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_get_primitive()

◆ purple_status_type_is_available()

gboolean purple_status_type_is_available ( const PurpleStatusType status_type)

Returns whether or not a status type is available.

Available status types are online and possibly invisible, but not away.

Parameters
status_typeThe status type.
Returns
TRUE if the status is available, or FALSE otherwise.

Definition at line 427 of file status.c.

References FALSE, NULL, PURPLE_STATUS_AVAILABLE, and purple_status_type_get_primitive().

Referenced by purple_status_is_available(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_is_exclusive()

gboolean purple_status_type_is_exclusive ( const PurpleStatusType status_type)

Returns whether the status type is exclusive.

Parameters
status_typeThe status type.
Returns
TRUE if the status type is exclusive, FALSE otherwise.

Definition at line 419 of file status.c.

References FALSE, _PurpleStatusType::independent, and NULL.

Referenced by purple_status_is_exclusive(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_is_independent()

gboolean purple_status_type_is_independent ( const PurpleStatusType status_type)

Returns whether or not the status type is independent.

Independent status types are non-exclusive. If other status types on the same hierarchy level are set, this one will not be affected.

Parameters
status_typeThe status type.
Returns
TRUE if the status type is independent, or FALSE otherwise.

Definition at line 411 of file status.c.

References FALSE, _PurpleStatusType::independent, and NULL.

Referenced by add_account_statuses(), edit_substatus(), find_status_type_by_index(), purple_status_is_independent(), tcl_cmd_status_type(), and update_to_reflect_account_status().

Here is the caller graph for this function:

◆ purple_status_type_is_saveable()

gboolean purple_status_type_is_saveable ( const PurpleStatusType status_type)

Returns whether or not the status type is saveable.

Parameters
status_typeThe status type.
Returns
TRUE if user-defined statuses based off this type are saveable. FALSE otherwise.

Definition at line 395 of file status.c.

References FALSE, NULL, and _PurpleStatusType::saveable.

Referenced by statuses_to_xmlnode(), and tcl_cmd_status_type().

Here is the caller graph for this function:

◆ purple_status_type_is_user_settable()

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.

Parameters
status_typeThe status type.
Returns
TRUE if the status type can be set or modified by the user. FALSE if it's a protocol-set setting.

Definition at line 403 of file status.c.

References FALSE, NULL, and _PurpleStatusType::user_settable.

Referenced by add_account_statuses(), edit_substatus(), find_status_type_by_index(), popup_substatus(), tcl_cmd_status_type(), and update_to_reflect_account_status().

Here is the caller graph for this function:

◆ purple_status_type_new()

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).

Parameters
primitiveThe primitive status type.
idThe ID of the status type, or NULL to use the id of the primitive status type.
nameThe name presented to the user, or NULL to use the name of the primitive status type.
user_settableTRUE if this is a status the user can manually set.
Returns
A new status type.

Definition at line 252 of file status.c.

References FALSE, name, NULL, purple_status_type_new_full(), PURPLE_STATUS_UNSET, and TRUE.

Referenced by irc_status_types(), and zephyr_status_types().

Here is the caller graph for this function:

◆ purple_status_type_new_full()

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.

Parameters
primitiveThe primitive status type.
idThe ID of the status type, or NULL to use the id of the primitive status type.
nameThe name presented to the user, or NULL to use the name of the primitive status type.
saveableTRUE if the information set for this status by the user can be saved for future sessions.
user_settableTRUE if this is a status the user can manually set.
independentTRUE if this is an independent (non-exclusive) status type.
Returns
A new status type.

Definition at line 222 of file status.c.

References _PurpleStatusType::id, _PurpleStatusType::independent, _PurpleStatusType::name, name, NULL, _PurpleStatusType::primitive, PURPLE_DBUS_REGISTER_POINTER, purple_primitive_get_id_from_type(), purple_primitive_get_name_from_type(), PURPLE_STATUS_UNSET, _PurpleStatusType::saveable, and _PurpleStatusType::user_settable.

Referenced by bonjour_status_types(), mw_prpl_status_types(), novell_status_types(), oscar_status_types(), purple_status_type_new(), purple_status_type_new_with_attrs(), silcpurple_away_states(), and simple_status_types().

Here is the caller graph for this function:

◆ purple_status_type_new_with_attrs()

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,
  ... 
)

Creates a new status type with attributes.

Parameters
primitiveThe primitive status type.
idThe ID of the status type, or NULL to use the id of the primitive status type.
nameThe name presented to the user, or NULL to use the name of the primitive status type.
saveableTRUE if the information set for this status by the user can be saved for future sessions.
user_settableTRUE if this is a status the user can manually set.
independentTRUE if this is an independent (non-exclusive) status type.
attr_idThe ID of the first attribute.
attr_nameThe name of the first attribute.
attr_valueThe value type of the first attribute attribute.
...Additional attribute information.
Returns
A new status type.

Definition at line 262 of file status.c.

References dbus-analyze-signals::args, name, NULL, purple_status_type_add_attr(), purple_status_type_add_attrs_vargs(), purple_status_type_new_full(), and PURPLE_STATUS_UNSET.

Referenced by bonjour_status_types(), ggp_status_types(), irc_status_types(), jabber_status_types(), mw_prpl_status_types(), novell_status_types(), nullprpl_status_types(), oscar_status_types(), simple_status_types(), and zephyr_status_types().

Here is the caller graph for this function:

◆ purple_status_type_set_primary_attr()

void purple_status_type_set_primary_attr ( PurpleStatusType status_type,
const char *  attr_id 
)

Sets a status type's primary attribute.

The value for the primary attribute is used as the description for the particular status type. An example is an away message. The message would be the primary attribute.

Parameters
status_typeThe status type.
attr_idThe ID of the primary attribute.
Deprecated:
This function isn't used and should be removed in 3.0.0.

Definition at line 307 of file status.c.

References NULL, and _PurpleStatusType::primary_attr_id.

◆ purple_status_uninit()

void purple_status_uninit ( void  )

Uninitializes the status subsystem.

Definition at line 1715 of file status.c.

References purple_prefs_disconnect_by_handle(), and purple_prefs_get_handle().

Referenced by purple_core_quit().

Here is the caller graph for this function: