buddyicon.h File Reference

Buddy Icon API. More...

#include "account.h"
#include "blist.h"

Include dependency graph for buddyicon.h:

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

Go to the source code of this file.

Data Structures

struct  _GaimBuddyIcon

Typedefs

typedef _GaimBuddyIcon GaimBuddyIcon

Functions

Buddy Icon API
GaimBuddyIcon * gaim_buddy_icon_new (GaimAccount *account, const char *username, void *icon_data, size_t icon_len)
 Creates a new buddy icon structure.
void gaim_buddy_icon_destroy (GaimBuddyIcon *icon)
 Destroys a buddy icon structure.
GaimBuddyIcon * gaim_buddy_icon_ref (GaimBuddyIcon *icon)
 Increments the reference count on a buddy icon.
GaimBuddyIcon * gaim_buddy_icon_unref (GaimBuddyIcon *icon)
 Decrements the reference count on a buddy icon.
void gaim_buddy_icon_update (GaimBuddyIcon *icon)
 Updates every instance of this icon.
void gaim_buddy_icon_cache (GaimBuddyIcon *icon, GaimBuddy *buddy)
 Caches a buddy icon associated with a specific buddy to disk.
void gaim_buddy_icon_uncache (GaimBuddy *buddy)
 Removes cached buddy icon for a specific buddy.
void gaim_buddy_icon_set_account (GaimBuddyIcon *icon, GaimAccount *account)
 Sets the buddy icon's account.
void gaim_buddy_icon_set_username (GaimBuddyIcon *icon, const char *username)
 Sets the buddy icon's username.
void gaim_buddy_icon_set_data (GaimBuddyIcon *icon, void *data, size_t len)
 Sets the buddy icon's icon data.
GaimAccount * gaim_buddy_icon_get_account (const GaimBuddyIcon *icon)
 Returns the buddy icon's account.
const char * gaim_buddy_icon_get_username (const GaimBuddyIcon *icon)
 Returns the buddy icon's username.
const void * gaim_buddy_icon_get_data (const GaimBuddyIcon *icon, size_t *len)
 Returns the buddy icon's data.
const char * gaim_buddy_icon_get_type (const GaimBuddyIcon *icon)
 Returns an extension corresponding to the buddy icon's file type.
Buddy Icon Subsystem API
void gaim_buddy_icons_set_for_user (GaimAccount *account, const char *username, void *icon_data, size_t icon_len)
 Sets a buddy icon for a user.
GaimBuddyIcon * gaim_buddy_icons_find (GaimAccount *account, const char *username)
 Returns the buddy icon information for a user.
void gaim_buddy_icons_set_caching (gboolean caching)
 Sets whether or not buddy icon caching is enabled.
gboolean gaim_buddy_icons_is_caching (void)
 Returns whether or not buddy icon caching should be enabled.
void gaim_buddy_icons_set_cache_dir (const char *cache_dir)
 Sets the directory used to store buddy icon cache files.
const char * gaim_buddy_icons_get_cache_dir (void)
 Returns the directory used to store buddy icon cache files.
void * gaim_buddy_icons_get_handle ()
 Returns the buddy icon subsystem handle.
void gaim_buddy_icons_init ()
 Initializes the buddy icon subsystem.
void gaim_buddy_icons_uninit ()
 Uninitializes the buddy icon subsystem.


Detailed Description

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


Function Documentation

void gaim_buddy_icon_cache ( GaimBuddyIcon *  icon,
GaimBuddy buddy 
)

Caches a buddy icon associated with a specific buddy to disk.

Parameters:
icon The buddy icon.
buddy The buddy that this icon belongs to.

void gaim_buddy_icon_destroy ( GaimBuddyIcon *  icon  ) 

Destroys a buddy icon structure.

If the buddy icon's reference count is greater than 1, this will just decrease the reference count and return.

Parameters:
icon The buddy icon structure to destroy.

GaimAccount* gaim_buddy_icon_get_account ( const GaimBuddyIcon *  icon  ) 

Returns the buddy icon's account.

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

const void* gaim_buddy_icon_get_data ( const GaimBuddyIcon *  icon,
size_t *  len 
)

Returns the buddy icon's data.

Parameters:
icon The buddy icon.
len The returned icon length.
Returns:
The icon data.

const char* gaim_buddy_icon_get_type ( const GaimBuddyIcon *  icon  ) 

Returns an extension corresponding to the buddy icon's file type.

Parameters:
icon The buddy icon.
Returns:
The icon's extension.

const char* gaim_buddy_icon_get_username ( const GaimBuddyIcon *  icon  ) 

Returns the buddy icon's username.

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

GaimBuddyIcon* gaim_buddy_icon_new ( GaimAccount *  account,
const char *  username,
void *  icon_data,
size_t  icon_len 
)

Creates a new buddy icon structure.

Parameters:
account The account the user is on.
username The username the icon belongs to.
icon_data The buddy icon data.
icon_len The buddy icon length.
Returns:
The buddy icon structure.

GaimBuddyIcon* gaim_buddy_icon_ref ( GaimBuddyIcon *  icon  ) 

Increments the reference count on a buddy icon.

Parameters:
icon The buddy icon.
Returns:
icon.

void gaim_buddy_icon_set_account ( GaimBuddyIcon *  icon,
GaimAccount *  account 
)

Sets the buddy icon's account.

Parameters:
icon The buddy icon.
account The account.

void gaim_buddy_icon_set_data ( GaimBuddyIcon *  icon,
void *  data,
size_t  len 
)

Sets the buddy icon's icon data.

Parameters:
icon The buddy icon.
data The buddy icon data.
len The length of the icon data.

void gaim_buddy_icon_set_username ( GaimBuddyIcon *  icon,
const char *  username 
)

Sets the buddy icon's username.

Parameters:
icon The buddy icon.
username The username.

void gaim_buddy_icon_uncache ( GaimBuddy buddy  ) 

Removes cached buddy icon for a specific buddy.

Parameters:
buddy The buddy for which to remove the cached icon.

GaimBuddyIcon* gaim_buddy_icon_unref ( GaimBuddyIcon *  icon  ) 

Decrements the reference count on a buddy icon.

If the reference count reaches 0, the icon will be destroyed.

Parameters:
icon The buddy icon.
Returns:
icon, or NULL if the reference count reached 0.

void gaim_buddy_icon_update ( GaimBuddyIcon *  icon  ) 

Updates every instance of this icon.

Parameters:
icon The buddy icon.

GaimBuddyIcon* gaim_buddy_icons_find ( GaimAccount *  account,
const char *  username 
)

Returns the buddy icon information for a user.

Parameters:
account The account the user is on.
username The username of the user.
Returns:
The icon data if found, or NULL if not found.

const char* gaim_buddy_icons_get_cache_dir ( void   ) 

Returns the directory used to store buddy icon cache files.

The default directory is GAIMDIR/icons, unless otherwise specified by gaim_buddy_icons_set_cache_dir().

Returns:
The directory to store buddy icon cache files to.

void* gaim_buddy_icons_get_handle (  ) 

Returns the buddy icon subsystem handle.

Returns:
The subsystem handle.

gboolean gaim_buddy_icons_is_caching ( void   ) 

Returns whether or not buddy icon caching should be enabled.

The default is TRUE, unless otherwise specified by gaim_buddy_icons_set_caching().

Returns:
TRUE if buddy icon caching is enabled, or FALSE otherwise.

void gaim_buddy_icons_set_cache_dir ( const char *  cache_dir  ) 

Sets the directory used to store buddy icon cache files.

Parameters:
cache_dir The directory to store buddy icon cache files to.

void gaim_buddy_icons_set_caching ( gboolean  caching  ) 

Sets whether or not buddy icon caching is enabled.

Parameters:
caching TRUE of buddy icon caching should be enabled, or FALSE otherwise.

void gaim_buddy_icons_set_for_user ( GaimAccount *  account,
const char *  username,
void *  icon_data,
size_t  icon_len 
)

Sets a buddy icon for a user.

Parameters:
account The account the user is on.
username The username of the user.
icon_data The icon data.
icon_len The length of the icon data.


Generated on Sun Feb 18 08:38:17 2007 for gaim by  doxygen 1.5.1