26#ifndef _PURPLE_POUNCE_H_
27#define _PURPLE_POUNCE_H_
203 const char *attr,
const char *value);
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.
const char * purple_pounce_get_pouncee(const PurplePounce *pounce)
Returns the buddy a pounce should pounce on.
GList * purple_pounces_get_all(void)
Returns a list of all registered buddy pounces.
void purple_pounce_destroy_all_by_account(PurpleAccount *account)
Destroys all buddy pounces for the account.
void(* PurplePounceCb)(PurplePounce *, PurplePounceEvent, void *)
A pounce callback.
void purple_pounces_uninit(void)
Uninitializes the pounces subsystem.
gboolean purple_pounce_get_save(const PurplePounce *pounce)
Returns whether or not the pounce should save after execution.
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_set_save(PurplePounce *pounce, gboolean save)
Sets whether or not the pounce should be saved after execution.
void purple_pounce_action_set_enabled(PurplePounce *pounce, const char *action, gboolean enabled)
Enables or disables an action for a pounce.
PurplePounceEvent
Events that trigger buddy pounces.
@ PURPLE_POUNCE_NONE
No events.
@ PURPLE_POUNCE_IDLE_RETURN
The buddy is no longer idle.
@ PURPLE_POUNCE_TYPING_STOPPED
The buddy stopped typing.
@ PURPLE_POUNCE_MESSAGE_RECEIVED
The buddy sent a message
@ PURPLE_POUNCE_SIGNON
The buddy signed on.
@ PURPLE_POUNCE_TYPED
The buddy has entered text.
@ PURPLE_POUNCE_AWAY_RETURN
The buddy returned from away.
@ PURPLE_POUNCE_TYPING
The buddy started typing.
@ PURPLE_POUNCE_AWAY
The buddy went away.
@ PURPLE_POUNCE_SIGNOFF
The buddy signed off.
@ PURPLE_POUNCE_IDLE
The buddy became idle.
PurplePounce * purple_find_pounce(const PurpleAccount *pouncer, const char *pouncee, PurplePounceEvent events)
Finds a pounce with the specified event(s) and buddy.
PurplePounceEvent purple_pounce_get_events(const PurplePounce *pounce)
Returns the events a pounce should watch for.
void * purple_pounces_get_handle(void)
Returns the buddy pounce subsystem handle.
void purple_pounce_destroy(PurplePounce *pounce)
Destroys a buddy pounce.
void purple_pounce_action_register(PurplePounce *pounce, const char *name)
Registers an action type for the pounce.
void purple_pounce_set_data(PurplePounce *pounce, void *data)
Sets the pounce-specific data.
void purple_pounces_unregister_handler(const char *ui)
Unregisters a pounce handle for a UI.
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.
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.
GList * purple_pounces_get_all_for_ui(const char *ui)
Returns a list of registered buddy pounces for the ui-type.
void purple_pounce_set_events(PurplePounce *pounce, PurplePounceEvent events)
Sets the events a pounce should watch for.
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.
PurplePounceOption purple_pounce_get_options(const PurplePounce *pounce)
Returns the options for a pounce.
PurplePounce * purple_pounce_new(const char *ui_type, PurpleAccount *pouncer, const char *pouncee, PurplePounceEvent event, PurplePounceOption option)
Creates a new buddy pounce.
gboolean purple_pounces_load(void)
Loads the pounces.
void purple_pounce_set_options(PurplePounce *pounce, PurplePounceOption options)
Sets the options for a pounce.
gboolean purple_pounce_action_is_enabled(const PurplePounce *pounce, const char *action)
Returns whether or not an action is enabled.
void purple_pounces_init(void)
Initializes the pounces subsystem.
void purple_pounce_destroy_all_by_buddy(PurpleBuddy *buddy)
Destroys all buddy pounces for a buddy.
PurpleAccount * purple_pounce_get_pouncer(const PurplePounce *pounce)
Returns the account that will do the pouncing.
@ PURPLE_POUNCE_OPTION_NONE
No Option
@ PURPLE_POUNCE_OPTION_AWAY
Pounce only when away
Structure representing an account.
A buddy pounce structure.
char * ui_type
The type of UI.
PurplePounceEvent events
The event(s) to pounce on.
gboolean save
Whether or not the pounce should be saved after activation.
GHashTable * actions
The registered actions.
PurpleAccount * pouncer
The user who is pouncing.
char * pouncee
The buddy to pounce on.
PurplePounceOption options
The pounce options
void * data
Pounce-specific data.