Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

blist.h File Reference

Buddy List API. More...

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

Include dependency graph for blist.h:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _GaimBlistNode
 A Buddy list node. More...
struct  _GaimBuddy
 A buddy. More...
struct  _GaimContact
 A contact. More...
struct  _GaimGroup
 A group. More...
struct  _GaimChat
 A chat. More...
struct  _GaimBuddyList
 The Buddy List. More...
struct  _GaimBlistUiOps
 Buddy list UI operations. More...
struct  _GaimBlistNodeAction

Buddy List API

GaimBuddyListgaim_blist_new ()
 Creates a new buddy list.
void gaim_set_blist (GaimBuddyList *blist)
 Sets the main buddy list.
GaimBuddyListgaim_get_blist (void)
 Returns the main buddy list.
void gaim_blist_show ()
 Shows the buddy list, creating a new one if necessary.
void gaim_blist_destroy ()
 Destroys the buddy list window.
void gaim_blist_set_visible (gboolean show)
 Hides or unhides the buddy list.
void gaim_blist_update_buddy_status (GaimBuddy *buddy, int status)
 Updates a buddy's status.
void gaim_blist_update_buddy_presence (GaimBuddy *buddy, gboolean online)
 Updates a buddy's presence.
void gaim_blist_update_buddy_signon (GaimBuddy *buddy, time_t signon)
 Updates a buddy's signon time.
void gaim_blist_update_buddy_idle (GaimBuddy *buddy, int idle)
 Updates a buddy's idle time.
void gaim_blist_update_buddy_evil (GaimBuddy *buddy, int warning)
 Updates a buddy's warning level.
void gaim_blist_update_buddy_icon (GaimBuddy *buddy)
 Updates a buddy's icon.
void gaim_blist_rename_buddy (GaimBuddy *buddy, const char *name)
 Renames a buddy in the buddy list.
void gaim_blist_alias_buddy (GaimBuddy *buddy, const char *alias)
 Aliases a buddy in the buddy list.
void gaim_blist_server_alias_buddy (GaimBuddy *buddy, const char *alias)
 Sets the server-sent alias of a buddy in the buddy list.
void gaim_blist_alias_chat (GaimChat *chat, const char *alias)
 Aliases a chat in the buddy list.
void gaim_blist_rename_group (GaimGroup *group, const char *name)
 Renames a group.
GaimChatgaim_chat_new (GaimAccount *account, const char *alias, GHashTable *components)
 Creates a new chat for the buddy list.
char * gaim_chat_get_display_name (GaimChat *chat)
 Gets the alias of the chat, or the chat name if the alias does not exist.
void gaim_blist_add_chat (GaimChat *chat, GaimGroup *group, GaimBlistNode *node)
 Adds a new chat to the buddy list.
GaimBuddygaim_buddy_new (GaimAccount *account, const char *screenname, const char *alias)
 Creates a new buddy.
void gaim_buddy_set_icon (GaimBuddy *buddy, GaimBuddyIcon *icon)
 Sets a buddy's icon.
GaimBuddyIcon * gaim_buddy_get_icon (const GaimBuddy *buddy)
 Returns a buddy's icon.
GaimContactgaim_buddy_get_contact (GaimBuddy *buddy)
 Returns a buddy's contact.
void gaim_blist_add_buddy (GaimBuddy *buddy, GaimContact *contact, GaimGroup *group, GaimBlistNode *node)
 Adds a new buddy to the buddy list.
GaimGroupgaim_group_new (const char *name)
 Creates a new group.
void gaim_blist_add_group (GaimGroup *group, GaimBlistNode *node)
 Adds a new group to the buddy list.
GaimContactgaim_contact_new ()
 Creates a new contact.
void gaim_blist_add_contact (GaimContact *contact, GaimGroup *group, GaimBlistNode *node)
 Adds a new contact to the buddy list.
void gaim_blist_merge_contact (GaimContact *source, GaimBlistNode *node)
 Merges two contacts.
GaimBuddygaim_contact_get_priority_buddy (GaimContact *contact)
 Returns the highest priority buddy for a given contact.
void gaim_contact_set_alias (GaimContact *contact, const char *alias)
 Sets the alias for a contact.
const char * gaim_contact_get_alias (GaimContact *contact)
 Gets the alias for a contact.
gboolean gaim_contact_on_account (GaimContact *contact, GaimAccount *account)
 Determines whether an account owns any buddies in a given contact.
void gaim_blist_remove_buddy (GaimBuddy *buddy)
 Removes a buddy from the buddy list and frees the memory allocated to it.
void gaim_blist_remove_contact (GaimContact *contact)
 Removes a contact, and any buddies it contains, and frees the memory allocated to it.
void gaim_blist_remove_chat (GaimChat *chat)
 Removes a chat from the buddy list and frees the memory allocated to it.
void gaim_blist_remove_group (GaimGroup *group)
 Removes a group from the buddy list and frees the memory allocated to it and to its children.
const char * gaim_buddy_get_alias_only (GaimBuddy *buddy)
 Returns the alias of a buddy.
const char * gaim_buddy_get_contact_alias (GaimBuddy *buddy)
 Returns the correct name to display for a buddy, taking the contact alias into account.
const char * gaim_buddy_get_alias (GaimBuddy *buddy)
 Returns the correct name to display for a buddy.
const char * gaim_chat_get_name (GaimChat *chat)
 Returns the correct name to display for a blist chat.
GaimBuddygaim_find_buddy (GaimAccount *account, const char *name)
 Finds the buddy struct given a screenname and an account.
GaimBuddygaim_find_buddy_in_group (GaimAccount *account, const char *name, GaimGroup *group)
 Finds the buddy struct given a screenname, an account, and a group.
GSList * gaim_find_buddies (GaimAccount *account, const char *name)
 Finds all GaimBuddy structs given a screenname and an account.
GaimGroupgaim_find_group (const char *name)
 Finds a group by name.
GaimChatgaim_blist_find_chat (GaimAccount *account, const char *name)
 Finds a chat by name.
GaimGroupgaim_chat_get_group (GaimChat *chat)
 Returns the group of which the chat is a member.
GaimGroupgaim_find_buddys_group (GaimBuddy *buddy)
 Returns the group of which the buddy is a member.
GSList * gaim_group_get_accounts (GaimGroup *g)
 Returns a list of accounts that have buddies in this group.
gboolean gaim_group_on_account (GaimGroup *g, GaimAccount *account)
 Determines whether an account owns any buddies in a given group.
void gaim_blist_add_account (GaimAccount *account)
 Called when an account gets signed on.
void gaim_blist_remove_account (GaimAccount *account)
 Called when an account gets signed off.
int gaim_blist_get_group_size (GaimGroup *group, gboolean offline)
 Determines the total size of a group.
int gaim_blist_get_group_online_count (GaimGroup *group)
 Determines the number of online buddies in a group.

Buddy list file management API

void gaim_blist_sync ()
 Force an immediate write of the buddy list.
void gaim_blist_parse_toc_buddy_list (GaimAccount *account, char *config)
 Parses the toc-style buddy list used in older versions of Gaim and for SSI in toc.c.
void gaim_blist_load ()
 Loads the buddy list from ~/.gaim/blist.xml.
void gaim_blist_request_add_buddy (GaimAccount *account, const char *username, const char *group, const char *alias)
 Requests from the user information needed to add a buddy to the buddy list.
void gaim_blist_request_add_chat (GaimAccount *account, GaimGroup *group, const char *alias, const char *name)
 Requests from the user information needed to add a chat to the buddy list.
void gaim_blist_request_add_group (void)
 Requests from the user information needed to add a group to the buddy list.
void gaim_blist_node_set_bool (GaimBlistNode *node, const char *key, gboolean value)
 Associates a boolean with a node in the buddy list.
gboolean gaim_blist_node_get_bool (GaimBlistNode *node, const char *key)
 Retrieves a named boolean setting from a node in the buddy list.
void gaim_blist_node_set_int (GaimBlistNode *node, const char *key, int value)
 Associates an integer with a node in the buddy list.
int gaim_blist_node_get_int (GaimBlistNode *node, const char *key)
 Retrieves a named integer setting from a node in the buddy list.
void gaim_blist_node_set_string (GaimBlistNode *node, const char *key, const char *value)
 Associates a string with a node in the buddy list.
const char * gaim_blist_node_get_string (GaimBlistNode *node, const char *key)
 Retrieves a named string setting from a node in the buddy list.
void gaim_blist_node_remove_setting (GaimBlistNode *node, const char *key)
 Removes a named setting from a blist node.

UI Registration Functions

void gaim_blist_set_ui_ops (GaimBlistUiOps *ops)
 Sets the UI operations structure to be used for the buddy list.
GaimBlistUiOpsgaim_blist_get_ui_ops (void)
 Returns the UI operations structure to be used for the buddy list.

Buddy List Subsystem

void * gaim_blist_get_handle (void)
 Returns the handle for the buddy list subsystem.
void gaim_blist_init (void)
 Initializes the buddy list subsystem.
void gaim_blist_uninit (void)
 Uninitializes the buddy list subsystem.

Defines

#define GAIM_BLIST_NODE_IS_CHAT(n)   ((n)->type == GAIM_BLIST_CHAT_NODE)
#define GAIM_BLIST_NODE_IS_BUDDY(n)   ((n)->type == GAIM_BLIST_BUDDY_NODE)
#define GAIM_BLIST_NODE_IS_CONTACT(n)   ((n)->type == GAIM_BLIST_CONTACT_NODE)
#define GAIM_BLIST_NODE_IS_GROUP(n)   ((n)->type == GAIM_BLIST_GROUP_NODE)
#define GAIM_BUDDY_IS_ONLINE(b)
#define GAIM_BLIST_NODE_HAS_FLAG(b, f)   ((b)->flags & (f))
#define GAIM_BLIST_NODE_SHOULD_SAVE(b)   (! GAIM_BLIST_NODE_HAS_FLAG(b, GAIM_BLIST_NODE_FLAG_NO_SAVE))

Typedefs

typedef _GaimBuddyList GaimBuddyList
typedef _GaimBlistUiOps GaimBlistUiOps
typedef _GaimBlistNode GaimBlistNode
typedef _GaimBlistNodeAction GaimBlistNodeAction
typedef _GaimChat GaimChat
typedef _GaimGroup GaimGroup
typedef _GaimContact GaimContact
typedef _GaimBuddy GaimBuddy

Enumerations

enum  GaimBlistNodeType {
  GAIM_BLIST_GROUP_NODE, GAIM_BLIST_CONTACT_NODE, GAIM_BLIST_BUDDY_NODE, GAIM_BLIST_CHAT_NODE,
  GAIM_BLIST_OTHER_NODE
}
enum  GaimBuddyPresenceState { GAIM_BUDDY_SIGNING_OFF = -1, GAIM_BUDDY_OFFLINE = 0, GAIM_BUDDY_ONLINE, GAIM_BUDDY_SIGNING_ON }
enum  GaimBlistNodeFlags { GAIM_BLIST_NODE_FLAG_NO_SAVE = 1 }

Functions

GList * gaim_blist_node_get_extended_menu (GaimBlistNode *n)
 Retrieves the extended menu items for a buddy list node.
GaimBlistNodeAction * gaim_blist_node_action_new (char *label, void(*callback)(GaimBlistNode *, gpointer), gpointer data)
 Creates a new GaimBlistNodeAction.


Detailed Description

Buddy List 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


Define Documentation

#define GAIM_BUDDY_IS_ONLINE  ) 
 

Value:

((b)->account->gc && \
        ((b)->present == GAIM_BUDDY_ONLINE || \
         (b)->present == GAIM_BUDDY_SIGNING_ON))


Enumeration Type Documentation

enum GaimBlistNodeFlags
 

Enumeration values:
GAIM_BLIST_NODE_FLAG_NO_SAVE  node should not be saved with the buddy list


Function Documentation

void gaim_blist_add_account GaimAccount *  account  ) 
 

Called when an account gets signed on.

Tells the UI to update all the buddies.

Parameters:
account The account

void gaim_blist_add_buddy GaimBuddy buddy,
GaimContact contact,
GaimGroup group,
GaimBlistNode node
 

Adds a new buddy to the buddy list.

The buddy will be inserted right after node or prepended to the group if node is NULL. If both are NULL, the buddy will be added to the "Buddies" group.

Parameters:
buddy The new buddy who gets added
contact The optional contact to place the buddy in.
group The group to add the new buddy to.
node The insertion point

void gaim_blist_add_chat GaimChat chat,
GaimGroup group,
GaimBlistNode node
 

Adds a new chat to the buddy list.

The chat will be inserted right after node or appended to the end of group if node is NULL. If both are NULL, the buddy will be added to the "Chats" group.

Parameters:
chat The new chat who gets added
group The group to add the new chat to.
node The insertion point

void gaim_blist_add_contact GaimContact contact,
GaimGroup group,
GaimBlistNode node
 

Adds a new contact to the buddy list.

The new contact will be inserted after insert or prepended to the list if node is NULL.

Parameters:
contact The contact
group The group to add the contact to
node The insertion point

void gaim_blist_add_group GaimGroup group,
GaimBlistNode node
 

Adds a new group to the buddy list.

The new group will be inserted after insert or prepended to the list if node is NULL.

Parameters:
group The group
node The insertion point

void gaim_blist_alias_buddy GaimBuddy buddy,
const char *  alias
 

Aliases a buddy in the buddy list.

Parameters:
buddy The buddy whose alias will be changed.
alias The buddy's alias.

void gaim_blist_alias_chat GaimChat chat,
const char *  alias
 

Aliases a chat in the buddy list.

Parameters:
chat The chat whose alias will be changed.
alias The chat's new alias.

GaimChat* gaim_blist_find_chat GaimAccount *  account,
const char *  name
 

Finds a chat by name.

Parameters:
account The chat's account.
name The chat's name.
Returns:
The chat, or NULL if the chat does not exist.

int gaim_blist_get_group_online_count GaimGroup group  ) 
 

Determines the number of online buddies in a group.

Parameters:
group The group
Returns:
The number of online buddies in the group, or 0 if the group is NULL

int gaim_blist_get_group_size GaimGroup group,
gboolean  offline
 

Determines the total size of a group.

Parameters:
group The group
offline Count buddies in offline accounts
Returns:
The number of buddies in the group

void* gaim_blist_get_handle void   ) 
 

Returns the handle for the buddy list subsystem.

Returns:
The buddy list subsystem handle.

GaimBlistUiOps* gaim_blist_get_ui_ops void   ) 
 

Returns the UI operations structure to be used for the buddy list.

Returns:
The UI operations structure.

void gaim_blist_merge_contact GaimContact source,
GaimBlistNode node
 

Merges two contacts.

All of the buddies from source will be moved to target

Parameters:
source The contact to merge
node The place to merge to (a buddy or contact)

GaimBlistNodeAction* gaim_blist_node_action_new char *  label,
void(*)(GaimBlistNode *, gpointer)  callback,
gpointer  data
 

Creates a new GaimBlistNodeAction.

Parameters:
label The text label to display for this action.
callback The function to be called when the action is used on a selected GaimBlistNode.
data Additional data, to be passed to the callback

gboolean gaim_blist_node_get_bool GaimBlistNode node,
const char *  key
 

Retrieves a named boolean setting from a node in the buddy list.

Parameters:
node The node to retrieve the data from
key The identifier of the data
Returns:
The value, or FALSE if there is no setting

GList* gaim_blist_node_get_extended_menu GaimBlistNode n  ) 
 

Retrieves the extended menu items for a buddy list node.

Parameters:
n The blist node for which to obtain the extended menu items.
Returns:
list of GaimBlistNodeAction items, as harvested by the blist-node-extended-menu signal.

int gaim_blist_node_get_int GaimBlistNode node,
const char *  key
 

Retrieves a named integer setting from a node in the buddy list.

Parameters:
node The node to retrieve the data from
key The identifier of the data
Returns:
The value, or 0 if there is no setting

const char* gaim_blist_node_get_string GaimBlistNode node,
const char *  key
 

Retrieves a named string setting from a node in the buddy list.

Parameters:
node The node to retrieve the data from
key The identifier of the data
Returns:
The value, or NULL if there is no setting

void gaim_blist_node_remove_setting GaimBlistNode node,
const char *  key
 

Removes a named setting from a blist node.

Parameters:
node The node from which to remove the setting
key The name of the setting

void gaim_blist_node_set_bool GaimBlistNode node,
const char *  key,
gboolean  value
 

Associates a boolean with a node in the buddy list.

Parameters:
node The node to associate the data with
key The identifier for the data
value The value to set

void gaim_blist_node_set_int GaimBlistNode node,
const char *  key,
int  value
 

Associates an integer with a node in the buddy list.

Parameters:
node The node to associate the data with
key The identifier for the data
value The value to set

void gaim_blist_node_set_string GaimBlistNode node,
const char *  key,
const char *  value
 

Associates a string with a node in the buddy list.

Parameters:
node The node to associate the data with
key The identifier for the data
value The value to set

void gaim_blist_parse_toc_buddy_list GaimAccount *  account,
char *  config
 

Parses the toc-style buddy list used in older versions of Gaim and for SSI in toc.c.

Parameters:
account This is the account that the buddies and groups from config will get added to
config This is the toc-style buddy list data

void gaim_blist_remove_account GaimAccount *  account  ) 
 

Called when an account gets signed off.

Sets the presence of all the buddies to 0 and tells the UI to update them.

Parameters:
account The account

void gaim_blist_remove_buddy GaimBuddy buddy  ) 
 

Removes a buddy from the buddy list and frees the memory allocated to it.

Parameters:
buddy The buddy to be removed

void gaim_blist_remove_chat GaimChat chat  ) 
 

Removes a chat from the buddy list and frees the memory allocated to it.

Parameters:
chat The chat to be removed

void gaim_blist_remove_contact GaimContact contact  ) 
 

Removes a contact, and any buddies it contains, and frees the memory allocated to it.

Parameters:
contact The contact to be removed

void gaim_blist_remove_group GaimGroup group  ) 
 

Removes a group from the buddy list and frees the memory allocated to it and to its children.

Parameters:
group The group to be removed

void gaim_blist_rename_buddy GaimBuddy buddy,
const char *  name
 

Renames a buddy in the buddy list.

Parameters:
buddy The buddy whose name will be changed.
name The new name of the buddy.

void gaim_blist_rename_group GaimGroup group,
const char *  name
 

Renames a group.

Parameters:
group The group to rename
name The new name

void gaim_blist_request_add_buddy GaimAccount *  account,
const char *  username,
const char *  group,
const char *  alias
 

Requests from the user information needed to add a buddy to the buddy list.

Parameters:
account The account the buddy is added to.
username The username of the buddy.
group The name of the group to place the buddy in.
alias The optional alias for the buddy.

void gaim_blist_request_add_chat GaimAccount *  account,
GaimGroup group,
const char *  alias,
const char *  name
 

Requests from the user information needed to add a chat to the buddy list.

Parameters:
account The account the buddy is added to.
group The optional group to add the chat to.
alias The optional alias for the chat.
name The required chat name.

void gaim_blist_server_alias_buddy GaimBuddy buddy,
const char *  alias
 

Sets the server-sent alias of a buddy in the buddy list.

Parameters:
buddy The buddy whose alias will be changed.
alias The buddy's "official" alias.

void gaim_blist_set_ui_ops GaimBlistUiOps ops  ) 
 

Sets the UI operations structure to be used for the buddy list.

Parameters:
ops The ops struct.

void gaim_blist_set_visible gboolean  show  ) 
 

Hides or unhides the buddy list.

Parameters:
show Whether or not to show the buddy list

void gaim_blist_sync  ) 
 

Force an immediate write of the buddy list.

Normally the buddy list is saved automatically a few seconds after a change is made.

void gaim_blist_update_buddy_evil GaimBuddy buddy,
int  warning
 

Updates a buddy's warning level.

Parameters:
buddy The buddy whose warning level has changed.
warning The warning level as an int from 0 to 100.

void gaim_blist_update_buddy_icon GaimBuddy buddy  ) 
 

Updates a buddy's icon.

Parameters:
buddy The buddy whose buddy icon has changed

void gaim_blist_update_buddy_idle GaimBuddy buddy,
int  idle
 

Updates a buddy's idle time.

Parameters:
buddy The buddy whose idle time has changed
idle The buddy's idle time in minutes.

void gaim_blist_update_buddy_presence GaimBuddy buddy,
gboolean  online
 

Updates a buddy's presence.

Parameters:
buddy The buddy whose presence has changed
online If the buddy is now online

void gaim_blist_update_buddy_signon GaimBuddy buddy,
time_t  signon
 

Updates a buddy's signon time.

Parameters:
buddy The buddy whose idle time has changed.
signon The buddy's signon time since the dawn of the UNIX epoch.

void gaim_blist_update_buddy_status GaimBuddy buddy,
int  status
 

Updates a buddy's status.

This needs to not take an int.

Parameters:
buddy The buddy whose status has changed
status The new status in cryptic prpl-understood code

const char* gaim_buddy_get_alias GaimBuddy buddy  ) 
 

Returns the correct name to display for a buddy.

In order of precedence: the buddy's alias; the buddy's server alias; the buddy's contact alias; the buddy's user name.

Parameters:
buddy The buddy whose name will be returned.
Returns:
The appropriate name or alias, or NULL

const char* gaim_buddy_get_alias_only GaimBuddy buddy  ) 
 

Returns the alias of a buddy.

Parameters:
buddy The buddy whose name will be returned.
Returns:
The alias (if set), server alias (if set and preference is to display server aliases), or NULL.

GaimContact* gaim_buddy_get_contact GaimBuddy buddy  ) 
 

Returns a buddy's contact.

Parameters:
buddy The buddy.
Returns:
The buddy's contact.

const char* gaim_buddy_get_contact_alias GaimBuddy buddy  ) 
 

Returns the correct name to display for a buddy, taking the contact alias into account.

In order of precedence: the buddy's alias; the buddy's contact alias; the buddy's server alias; the buddy's user name.

Parameters:
buddy The buddy whose name will be returned
Returns:
The appropriate name or alias, or NULL.

GaimBuddyIcon* gaim_buddy_get_icon const GaimBuddy buddy  ) 
 

Returns a buddy's icon.

Parameters:
buddy The buddy.
Returns:
The buddy icon.

GaimBuddy* gaim_buddy_new GaimAccount *  account,
const char *  screenname,
const char *  alias
 

Creates a new buddy.

Parameters:
account The account this buddy will get added to
screenname The screenname of the new buddy
alias The alias of the new buddy (or NULL if unaliased)
Returns:
A newly allocated buddy

void gaim_buddy_set_icon GaimBuddy buddy,
GaimBuddyIcon *  icon
 

Sets a buddy's icon.

This should only be called from within Gaim. You probably want to call gaim_buddy_icon_set_data().

Parameters:
buddy The buddy.
icon The buddy icon.
See also:
gaim_buddy_icon_set_data()

char* gaim_chat_get_display_name GaimChat chat  ) 
 

Gets the alias of the chat, or the chat name if the alias does not exist.

Parameters:
chat The chat
Returns:
The display name of the chat

GaimGroup* gaim_chat_get_group GaimChat chat  ) 
 

Returns the group of which the chat is a member.

Parameters:
chat The chat.
Returns:
The parent group, or NULL if the chat is not in a group.

const char* gaim_chat_get_name GaimChat chat  ) 
 

Returns the correct name to display for a blist chat.

Parameters:
chat The chat whose name will be returned.
Returns:
The alias (if set), or first component value.

GaimChat* gaim_chat_new GaimAccount *  account,
const char *  alias,
GHashTable *  components
 

Creates a new chat for the buddy list.

Parameters:
account The account this chat will get added to
alias The alias of the new chat
components The info the prpl needs to join the chat
Returns:
A newly allocated chat

const char* gaim_contact_get_alias GaimContact contact  ) 
 

Gets the alias for a contact.

Parameters:
contact The contact
Returns:
The alias, or NULL if it is not set.

GaimBuddy* gaim_contact_get_priority_buddy GaimContact contact  ) 
 

Returns the highest priority buddy for a given contact.

Parameters:
contact The contact
Returns:
The highest priority buddy

GaimContact* gaim_contact_new  ) 
 

Creates a new contact.

Returns:
A new contact struct

gboolean gaim_contact_on_account GaimContact contact,
GaimAccount *  account
 

Determines whether an account owns any buddies in a given contact.

Parameters:
contact The contact to search through.
account The account.
Returns:
TRUE if there are any buddies from account in the contact, or FALSE otherwise.

void gaim_contact_set_alias GaimContact contact,
const char *  alias
 

Sets the alias for a contact.

Parameters:
contact The contact
alias The alias to set, or NULL to unset

GSList* gaim_find_buddies GaimAccount *  account,
const char *  name
 

Finds all GaimBuddy structs given a screenname and an account.

Parameters:
name The buddy's screenname
account The account this buddy belongs to
Returns:
A GSList of buddies (which must be freed), or NULL if the buddy doesn't exist

GaimBuddy* gaim_find_buddy GaimAccount *  account,
const char *  name
 

Finds the buddy struct given a screenname and an account.

Parameters:
name The buddy's screenname
account The account this buddy belongs to
Returns:
The buddy or NULL if the buddy does not exist

GaimBuddy* gaim_find_buddy_in_group GaimAccount *  account,
const char *  name,
GaimGroup group
 

Finds the buddy struct given a screenname, an account, and a group.

Parameters:
name The buddy's screenname
account The account this buddy belongs to
group The group to look in
Returns:
The buddy or NULL if the buddy does not exist in the group

GaimGroup* gaim_find_buddys_group GaimBuddy buddy  ) 
 

Returns the group of which the buddy is a member.

Parameters:
buddy The buddy
Returns:
The group or NULL if the buddy is not in a group

GaimGroup* gaim_find_group const char *  name  ) 
 

Finds a group by name.

Parameters:
name The groups name
Returns:
The group or NULL if the group does not exist

GaimBuddyList* gaim_get_blist void   ) 
 

Returns the main buddy list.

Returns:
The main buddy list.

GSList* gaim_group_get_accounts GaimGroup g  ) 
 

Returns a list of accounts that have buddies in this group.

Parameters:
g The group
Returns:
A list of gaim_accounts

GaimGroup* gaim_group_new const char *  name  ) 
 

Creates a new group.

You can't have more than one group with the same name. Sorry. If you pass this the * name of a group that already exists, it will return that group.

Parameters:
name The name of the new group
Returns:
A new group struct

gboolean gaim_group_on_account GaimGroup g,
GaimAccount *  account
 

Determines whether an account owns any buddies in a given group.

Parameters:
g The group to search through.
account The account.
Returns:
TRUE if there are any buddies in the group, or FALSE otherwise.

void gaim_set_blist GaimBuddyList blist  ) 
 

Sets the main buddy list.

Returns:
The main buddy list.


Generated on Fri Apr 22 05:21:12 2005 for gaim by  doxygen 1.3.9.1