pounce.h File Reference

Buddy Pounce API

gaim. More...

#include <glib.h>
#include "account.h"

Include dependency graph for pounce.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _GaimPounce
 A buddy pounce structure. More...

Buddy Pounce API

GaimPouncegaim_pounce_new (const char *ui_type, GaimAccount *pouncer, const char *pouncee, GaimPounceEvent event)
 Creates a new buddy pounce.
void gaim_pounce_destroy (GaimPounce *pounce)
 Destroys a buddy pounce.
void gaim_pounce_destroy_all_by_account (GaimAccount *account)
 Destroys all buddy pounces for the account.
void gaim_pounce_set_events (GaimPounce *pounce, GaimPounceEvent events)
 Sets the events a pounce should watch for.
void gaim_pounce_set_pouncer (GaimPounce *pounce, GaimAccount *pouncer)
 Sets the account that will do the pouncing.
void gaim_pounce_set_pouncee (GaimPounce *pounce, const char *pouncee)
 Sets the buddy a pounce should pounce on.
void gaim_pounce_set_save (GaimPounce *pounce, gboolean save)
 Sets whether or not the pounce should be saved after execution.
void gaim_pounce_action_register (GaimPounce *pounce, const char *name)
 Registers an action type for the pounce.
void gaim_pounce_action_set_enabled (GaimPounce *pounce, const char *action, gboolean enabled)
 Enables or disables an action for a pounce.
void gaim_pounce_action_set_attribute (GaimPounce *pounce, const char *action, const char *attr, const char *value)
 Sets a value for an attribute in an action.
void gaim_pounce_set_data (GaimPounce *pounce, void *data)
 Sets the pounce-specific data.
GaimPounceEvent gaim_pounce_get_events (const GaimPounce *pounce)
 Returns the events a pounce should watch for.
GaimAccount * gaim_pounce_get_pouncer (const GaimPounce *pounce)
 Returns the account that will do the pouncing.
const char * gaim_pounce_get_pouncee (const GaimPounce *pounce)
 Returns the buddy a pounce should pounce on.
gboolean gaim_pounce_get_save (const GaimPounce *pounce)
 Returns whether or not the pounce should save after execution.
gboolean gaim_pounce_action_is_enabled (const GaimPounce *pounce, const char *action)
 Returns whether or not an action is enabled.
const char * gaim_pounce_action_get_attribute (const GaimPounce *pounce, const char *action, const char *attr)
 Returns the value for an attribute in an action.
void * gaim_pounce_get_data (const GaimPounce *pounce)
 Returns the pounce-specific data.
void gaim_pounce_execute (const GaimAccount *pouncer, const char *pouncee, GaimPounceEvent events)
 Executes a pounce with the specified pouncer, pouncee, and event type.

Buddy Pounce Subsystem API

GaimPouncegaim_find_pounce (const GaimAccount *pouncer, const char *pouncee, GaimPounceEvent events)
 Finds a pounce with the specified event(s) and buddy.
gboolean gaim_pounces_load (void)
 Loads the pounces.
void gaim_pounces_sync (void)
 Force an immediate write of pounces.
void gaim_pounces_register_handler (const char *ui, GaimPounceCb cb, void(*new_pounce)(GaimPounce *pounce), void(*free_pounce)(GaimPounce *pounce))
 Registers a pounce handler for a UI.
void gaim_pounces_unregister_handler (const char *ui)
 Unregisters a pounce handle for a UI.
GList * gaim_pounces_get_all (void)
 Returns a list of all registered buddy pounces.
void * gaim_pounces_get_handle (void)
 Returns the buddy pounce subsystem handle.
void gaim_pounces_init (void)
 Initializes the pounces subsystem.
void gaim_pounces_uninit (void)
 Uninitializes the pounces subsystem.

Typedefs

typedef _GaimPounce GaimPounce
typedef void(*) GaimPounceCb (GaimPounce *, GaimPounceEvent, void *)
 A pounce callback.

Enumerations

enum  GaimPounceEvent {
  GAIM_POUNCE_NONE = 0x00, GAIM_POUNCE_SIGNON = 0x01, GAIM_POUNCE_SIGNOFF = 0x02, GAIM_POUNCE_AWAY = 0x04,
  GAIM_POUNCE_AWAY_RETURN = 0x08, GAIM_POUNCE_IDLE = 0x10, GAIM_POUNCE_IDLE_RETURN = 0x20, GAIM_POUNCE_TYPING = 0x40,
  GAIM_POUNCE_TYPING_STOPPED = 0x80
}
 Events that trigger buddy pounces. More...


Detailed Description

Buddy Pounce API

gaim.

Gaim is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Enumeration Type Documentation

enum GaimPounceEvent

Events that trigger buddy pounces.

Enumerator:
GAIM_POUNCE_NONE  No events.
GAIM_POUNCE_SIGNON  The buddy signed on.
GAIM_POUNCE_SIGNOFF  The buddy signed off.
GAIM_POUNCE_AWAY  The buddy went away.
GAIM_POUNCE_AWAY_RETURN  The buddy returned from away.
GAIM_POUNCE_IDLE  The buddy became idle.
GAIM_POUNCE_IDLE_RETURN  The buddy is no longer idle.
GAIM_POUNCE_TYPING  The buddy started typing.
GAIM_POUNCE_TYPING_STOPPED  The buddy stopped typing.


Function Documentation

GaimPounce* gaim_find_pounce ( const GaimAccount *  pouncer,
const char *  pouncee,
GaimPounceEvent  events 
)

Finds a pounce with the specified event(s) and buddy.

Parameters:
pouncer The account to match against.
pouncee The buddy to match against.
events The event(s) to match against.
Returns:
The pounce if found, or NULL otherwise.

const char* gaim_pounce_action_get_attribute ( const GaimPounce pounce,
const char *  action,
const char *  attr 
)

Returns the value for an attribute in an action.

Parameters:
pounce The buddy pounce.
action The action name.
attr The attribute name.
Returns:
The attribute value, if it exists, or NULL.

gboolean gaim_pounce_action_is_enabled ( const GaimPounce pounce,
const char *  action 
)

Returns whether or not an action is enabled.

Parameters:
pounce The buddy pounce.
action The action name.
Returns:
TRUE if the action is enabled, or FALSE otherwise.

void gaim_pounce_action_register ( GaimPounce pounce,
const char *  name 
)

Registers an action type for the pounce.

Parameters:
pounce The buddy pounce.
name The action name.

void gaim_pounce_action_set_attribute ( GaimPounce 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.

Parameters:
pounce The buddy pounce.
action The action name.
attr The attribute name.
value The value.

void gaim_pounce_action_set_enabled ( GaimPounce pounce,
const char *  action,
gboolean  enabled 
)

Enables or disables an action for a pounce.

Parameters:
pounce The buddy pounce.
action The name of the action.
enabled The enabled state.

void gaim_pounce_destroy ( GaimPounce pounce  ) 

Destroys a buddy pounce.

Parameters:
pounce The buddy pounce.

void gaim_pounce_destroy_all_by_account ( GaimAccount *  account  ) 

Destroys all buddy pounces for the account.

Parameters:
account The account to remove all pounces from.

void gaim_pounce_execute ( const GaimAccount *  pouncer,
const char *  pouncee,
GaimPounceEvent  events 
)

Executes a pounce with the specified pouncer, pouncee, and event type.

Parameters:
pouncer The account that will do the pouncing.
pouncee The buddy that is being pounced.
events The events that triggered the pounce.

void* gaim_pounce_get_data ( const GaimPounce pounce  ) 

Returns the pounce-specific data.

Parameters:
pounce The buddy pounce.
Returns:
The data specific to a buddy pounce.

GaimPounceEvent gaim_pounce_get_events ( const GaimPounce pounce  ) 

Returns the events a pounce should watch for.

Parameters:
pounce The buddy pounce.
Returns:
The events the pounce is watching for.

const char* gaim_pounce_get_pouncee ( const GaimPounce pounce  ) 

Returns the buddy a pounce should pounce on.

Parameters:
pounce The buddy pounce.
Returns:
The buddy to pounce on.

GaimAccount* gaim_pounce_get_pouncer ( const GaimPounce pounce  ) 

Returns the account that will do the pouncing.

Parameters:
pounce The buddy pounce.
Returns:
The account that will pounce.

gboolean gaim_pounce_get_save ( const GaimPounce pounce  ) 

Returns whether or not the pounce should save after execution.

Parameters:
pounce The buddy pounce.
Returns:
TRUE if the pounce should be saved after execution, or FALSE otherwise.

GaimPounce* gaim_pounce_new ( const char *  ui_type,
GaimAccount *  pouncer,
const char *  pouncee,
GaimPounceEvent  event 
)

Creates a new buddy pounce.

Parameters:
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.
Returns:
The new buddy pounce structure.

void gaim_pounce_set_data ( GaimPounce pounce,
void *  data 
)

Sets the pounce-specific data.

Parameters:
pounce The buddy pounce.
data Data specific to the pounce.

void gaim_pounce_set_events ( GaimPounce pounce,
GaimPounceEvent  events 
)

Sets the events a pounce should watch for.

Parameters:
pounce The buddy pounce.
events The events to watch for.

void gaim_pounce_set_pouncee ( GaimPounce pounce,
const char *  pouncee 
)

Sets the buddy a pounce should pounce on.

Parameters:
pounce The buddy pounce.
pouncee The buddy to pounce on.

void gaim_pounce_set_pouncer ( GaimPounce pounce,
GaimAccount *  pouncer 
)

Sets the account that will do the pouncing.

Parameters:
pounce The buddy pounce.
pouncer The account that will pounce.

void gaim_pounce_set_save ( GaimPounce pounce,
gboolean  save 
)

Sets whether or not the pounce should be saved after execution.

Parameters:
pounce The buddy pounce.
save TRUE if the pounce should be saved, or FALSE otherwise.

GList* gaim_pounces_get_all ( void   ) 

Returns a list of all registered buddy pounces.

Returns:
The list of buddy pounces.

void* gaim_pounces_get_handle ( void   ) 

Returns the buddy pounce subsystem handle.

Returns:
The subsystem handle.

gboolean gaim_pounces_load ( void   ) 

Loads the pounces.

Returns:
TRUE if the pounces could be loaded.

void gaim_pounces_register_handler ( const char *  ui,
GaimPounceCb  cb,
void(*)(GaimPounce *pounce)  new_pounce,
void(*)(GaimPounce *pounce)  free_pounce 
)

Registers a pounce handler for a UI.

Parameters:
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 gaim_pounces_unregister_handler ( const char *  ui  ) 

Unregisters a pounce handle for a UI.

Parameters:
ui The UI name.


Generated on Wed Aug 9 23:40:45 2006 for gaim by  doxygen 1.4.7