pidgin 2.14.14dev
|
Buddy Pounce API. More...
Go to the source code of this file.
Data Structures | |
struct | _PurplePounce |
A buddy pounce structure. More... | |
Typedefs | |
typedef struct _PurplePounce | PurplePounce |
typedef void(* | PurplePounceCb) (PurplePounce *, PurplePounceEvent, void *) |
A pounce callback. | |
Enumerations | |
enum | PurplePounceEvent { PURPLE_POUNCE_NONE = 0x000 , PURPLE_POUNCE_SIGNON = 0x001 , PURPLE_POUNCE_SIGNOFF = 0x002 , PURPLE_POUNCE_AWAY = 0x004 , PURPLE_POUNCE_AWAY_RETURN = 0x008 , PURPLE_POUNCE_IDLE = 0x010 , PURPLE_POUNCE_IDLE_RETURN = 0x020 , PURPLE_POUNCE_TYPING = 0x040 , PURPLE_POUNCE_TYPED = 0x080 , PURPLE_POUNCE_TYPING_STOPPED = 0x100 , PURPLE_POUNCE_MESSAGE_RECEIVED = 0x200 } |
Events that trigger buddy pounces. More... | |
enum | PurplePounceOption { PURPLE_POUNCE_OPTION_NONE = 0x00 , PURPLE_POUNCE_OPTION_AWAY = 0x01 } |
Functions | |
Buddy Pounce API <br> | |
PurplePounce * | purple_pounce_new (const char *ui_type, PurpleAccount *pouncer, const char *pouncee, PurplePounceEvent event, PurplePounceOption option) |
Creates a new buddy pounce. | |
void | purple_pounce_destroy (PurplePounce *pounce) |
Destroys a buddy pounce. | |
void | purple_pounce_destroy_all_by_account (PurpleAccount *account) |
Destroys all buddy pounces for the account. | |
void | purple_pounce_destroy_all_by_buddy (PurpleBuddy *buddy) |
Destroys all buddy pounces for a buddy. | |
void | purple_pounce_set_events (PurplePounce *pounce, PurplePounceEvent events) |
Sets the events a pounce should watch for. | |
void | purple_pounce_set_options (PurplePounce *pounce, PurplePounceOption options) |
Sets the options for a pounce. | |
void | purple_pounce_set_pouncer (PurplePounce *pounce, PurpleAccount *pouncer) |
Sets the account that will do the pouncing. | |
void | purple_pounce_set_pouncee (PurplePounce *pounce, const char *pouncee) |
Sets the buddy a pounce should pounce on. | |
void | purple_pounce_set_save (PurplePounce *pounce, gboolean save) |
Sets whether or not the pounce should be saved after execution. | |
void | purple_pounce_action_register (PurplePounce *pounce, const char *name) |
Registers an action type for the pounce. | |
void | purple_pounce_action_set_enabled (PurplePounce *pounce, const char *action, gboolean enabled) |
Enables or disables an action for a pounce. | |
void | purple_pounce_action_set_attribute (PurplePounce *pounce, const char *action, const char *attr, const char *value) |
Sets a value for an attribute in an action. | |
void | purple_pounce_set_data (PurplePounce *pounce, void *data) |
Sets the pounce-specific data. | |
PurplePounceEvent | purple_pounce_get_events (const PurplePounce *pounce) |
Returns the events a pounce should watch for. | |
PurplePounceOption | purple_pounce_get_options (const PurplePounce *pounce) |
Returns the options for a pounce. | |
PurpleAccount * | purple_pounce_get_pouncer (const PurplePounce *pounce) |
Returns the account that will do the pouncing. | |
const char * | purple_pounce_get_pouncee (const PurplePounce *pounce) |
Returns the buddy a pounce should pounce on. | |
gboolean | purple_pounce_get_save (const PurplePounce *pounce) |
Returns whether or not the pounce should save after execution. | |
gboolean | purple_pounce_action_is_enabled (const PurplePounce *pounce, const char *action) |
Returns whether or not an action is enabled. | |
const char * | purple_pounce_action_get_attribute (const PurplePounce *pounce, const char *action, const char *attr) |
Returns the value for an attribute in an action. | |
void * | purple_pounce_get_data (const PurplePounce *pounce) |
Returns the pounce-specific data. | |
void | purple_pounce_execute (const PurpleAccount *pouncer, const char *pouncee, PurplePounceEvent events) |
Executes a pounce with the specified pouncer, pouncee, and event type. | |
Buddy Pounce Subsystem API <br> | |
PurplePounce * | purple_find_pounce (const PurpleAccount *pouncer, const char *pouncee, PurplePounceEvent events) |
Finds a pounce with the specified event(s) and buddy. | |
gboolean | purple_pounces_load (void) |
Loads the pounces. | |
void | purple_pounces_register_handler (const char *ui, PurplePounceCb cb, void(*new_pounce)(PurplePounce *pounce), void(*free_pounce)(PurplePounce *pounce)) |
Registers a pounce handler for a UI. | |
void | purple_pounces_unregister_handler (const char *ui) |
Unregisters a pounce handle for a UI. | |
GList * | purple_pounces_get_all (void) |
Returns a list of all registered buddy pounces. | |
GList * | purple_pounces_get_all_for_ui (const char *ui) |
Returns a list of registered buddy pounces for the ui-type. | |
void * | purple_pounces_get_handle (void) |
Returns the buddy pounce subsystem handle. | |
void | purple_pounces_init (void) |
Initializes the pounces subsystem. | |
void | purple_pounces_uninit (void) |
Uninitializes the pounces subsystem. | |
Buddy Pounce API.
Definition in file pounce.h.
typedef struct _PurplePounce PurplePounce |
typedef void(* PurplePounceCb) (PurplePounce *, PurplePounceEvent, void *) |
enum PurplePounceEvent |
Events that trigger buddy pounces.
enum PurplePounceOption |
PurplePounce * purple_find_pounce | ( | const PurpleAccount * | pouncer, |
const char * | pouncee, | ||
PurplePounceEvent | events | ||
) |
Finds a pounce with the specified event(s) and buddy.
pouncer | The account to match against. |
pouncee | The buddy to match against. |
events | The event(s) to match against. |
NULL
otherwise. const char * purple_pounce_action_get_attribute | ( | const PurplePounce * | pounce, |
const char * | action, | ||
const char * | attr | ||
) |
Returns the value for an attribute in an action.
pounce | The buddy pounce. |
action | The action name. |
attr | The attribute name. |
NULL
. gboolean purple_pounce_action_is_enabled | ( | const PurplePounce * | pounce, |
const char * | action | ||
) |
Returns whether or not an action is enabled.
pounce | The buddy pounce. |
action | The action name. |
TRUE
if the action is enabled, or FALSE
otherwise. void purple_pounce_action_register | ( | PurplePounce * | pounce, |
const char * | name | ||
) |
Registers an action type for the pounce.
pounce | The buddy pounce. |
name | The action name. |
void purple_pounce_action_set_attribute | ( | PurplePounce * | pounce, |
const char * | action, | ||
const char * | attr, | ||
const char * | value | ||
) |
Sets a value for an attribute in an action.
If value is NULL
, the value will be unset.
pounce | The buddy pounce. |
action | The action name. |
attr | The attribute name. |
value | The value. |
void purple_pounce_action_set_enabled | ( | PurplePounce * | pounce, |
const char * | action, | ||
gboolean | enabled | ||
) |
Enables or disables an action for a pounce.
pounce | The buddy pounce. |
action | The name of the action. |
enabled | The enabled state. |
void purple_pounce_destroy | ( | PurplePounce * | pounce | ) |
Destroys a buddy pounce.
pounce | The buddy pounce. |
void purple_pounce_destroy_all_by_account | ( | PurpleAccount * | account | ) |
Destroys all buddy pounces for the account.
account | The account to remove all pounces from. |
void purple_pounce_destroy_all_by_buddy | ( | PurpleBuddy * | buddy | ) |
Destroys all buddy pounces for a buddy.
buddy | The buddy whose pounces are to be removed |
void purple_pounce_execute | ( | const PurpleAccount * | pouncer, |
const char * | pouncee, | ||
PurplePounceEvent | events | ||
) |
Executes a pounce with the specified pouncer, pouncee, and event type.
pouncer | The account that will do the pouncing. |
pouncee | The buddy that is being pounced. |
events | The events that triggered the pounce. |
void * purple_pounce_get_data | ( | const PurplePounce * | pounce | ) |
Returns the pounce-specific data.
pounce | The buddy pounce. |
PurplePounceEvent purple_pounce_get_events | ( | const PurplePounce * | pounce | ) |
Returns the events a pounce should watch for.
pounce | The buddy pounce. |
PurplePounceOption purple_pounce_get_options | ( | const PurplePounce * | pounce | ) |
Returns the options for a pounce.
pounce | The buddy pounce. |
const char * purple_pounce_get_pouncee | ( | const PurplePounce * | pounce | ) |
Returns the buddy a pounce should pounce on.
pounce | The buddy pounce. |
PurpleAccount * purple_pounce_get_pouncer | ( | const PurplePounce * | pounce | ) |
Returns the account that will do the pouncing.
pounce | The buddy pounce. |
gboolean purple_pounce_get_save | ( | const PurplePounce * | pounce | ) |
Returns whether or not the pounce should save after execution.
pounce | The buddy pounce. |
TRUE
if the pounce should be saved after execution, or FALSE
otherwise. PurplePounce * purple_pounce_new | ( | const char * | ui_type, |
PurpleAccount * | pouncer, | ||
const char * | pouncee, | ||
PurplePounceEvent | event, | ||
PurplePounceOption | option | ||
) |
Creates a new buddy pounce.
ui_type | The type of UI the pounce is for. |
pouncer | The account that will pounce. |
pouncee | The buddy to pounce on. |
event | The event(s) to pounce on. |
option | Pounce options. |
void purple_pounce_set_data | ( | PurplePounce * | pounce, |
void * | data | ||
) |
Sets the pounce-specific data.
pounce | The buddy pounce. |
data | Data specific to the pounce. |
void purple_pounce_set_events | ( | PurplePounce * | pounce, |
PurplePounceEvent | events | ||
) |
Sets the events a pounce should watch for.
pounce | The buddy pounce. |
events | The events to watch for. |
void purple_pounce_set_options | ( | PurplePounce * | pounce, |
PurplePounceOption | options | ||
) |
Sets the options for a pounce.
pounce | The buddy pounce. |
options | The options for the pounce. |
void purple_pounce_set_pouncee | ( | PurplePounce * | pounce, |
const char * | pouncee | ||
) |
Sets the buddy a pounce should pounce on.
pounce | The buddy pounce. |
pouncee | The buddy to pounce on. |
void purple_pounce_set_pouncer | ( | PurplePounce * | pounce, |
PurpleAccount * | pouncer | ||
) |
Sets the account that will do the pouncing.
pounce | The buddy pounce. |
pouncer | The account that will pounce. |
void purple_pounce_set_save | ( | PurplePounce * | pounce, |
gboolean | save | ||
) |
Sets whether or not the pounce should be saved after execution.
pounce | The buddy pounce. |
save | TRUE if the pounce should be saved, or FALSE otherwise. |
GList * purple_pounces_get_all | ( | void | ) |
Returns a list of all registered buddy pounces.
GList * purple_pounces_get_all_for_ui | ( | const char * | ui | ) |
Returns a list of registered buddy pounces for the ui-type.
ui | The ID of the UI using the core. |
void * purple_pounces_get_handle | ( | void | ) |
Returns the buddy pounce subsystem handle.
gboolean purple_pounces_load | ( | void | ) |
Loads the pounces.
TRUE
if the pounces could be loaded. void purple_pounces_register_handler | ( | const char * | ui, |
PurplePounceCb | cb, | ||
void(*)(PurplePounce *pounce) | new_pounce, | ||
void(*)(PurplePounce *pounce) | free_pounce | ||
) |
Registers a pounce handler for a UI.
ui | The UI name. |
cb | The callback function. |
new_pounce | The function called when a pounce is created. |
free_pounce | The function called when a pounce is freed. |
void purple_pounces_unregister_handler | ( | const char * | ui | ) |
Unregisters a pounce handle for a UI.
ui | The UI name. |