pidgin 2.14.14dev
Loading...
Searching...
No Matches
buddyicon.h
Go to the documentation of this file.
1
6/* purple
7 *
8 * Purple is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26#ifndef _PURPLE_BUDDYICON_H_
27#define _PURPLE_BUDDYICON_H_
28
34typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
35
36#include "account.h"
37#include "blist.h"
38#include "imgstore.h"
39#include "prpl.h"
40#include "util.h"
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46
47/**************************************************************************/
49/**************************************************************************/
66PurpleBuddyIcon *purple_buddy_icon_new(PurpleAccount *account, const char *username,
67 void *icon_data, size_t icon_len,
68 const char *checksum);
69
78
89
96
106void
108 size_t len, const char *checksum);
109
118
127
138
148gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
149
159
175
178/**************************************************************************/
180/**************************************************************************/
193void
194purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
195 void *icon_data, size_t icon_len,
196 const char *checksum);
197
208const char *
210
221purple_buddy_icons_find(PurpleAccount *account, const char *username);
222
239
257 guchar *icon_data, size_t icon_len);
258
269time_t
271
280gboolean
282
300
318 guchar *icon_data, size_t icon_len);
319
336 const gchar *filename);
337
338#if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BUDDYICON_C_)
346gboolean
348
358
368 guchar *icon_data, size_t icon_len);
369#endif
370
377void purple_buddy_icons_set_caching(gboolean caching);
378
388
394void purple_buddy_icons_set_cache_dir(const char *cache_dir);
395
405
412
417
422
425/**************************************************************************/
427/**************************************************************************/
433void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
434
437#ifdef __cplusplus
438}
439#endif
440
441#endif /* _PURPLE_BUDDYICON_H_ */
Account API.
Buddy List API.
time_t purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account)
Returns the timestamp of when the icon was set.
PurpleBuddyIcon * purple_buddy_icons_find(PurpleAccount *account, const char *username)
Returns the buddy icon information for a user.
char * purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon)
Returns a full path to an icon.
struct _PurpleBuddyIcon PurpleBuddyIcon
An opaque structure representing a buddy icon for a particular user on a particular PurpleAccount.
Definition buddyicon.h:34
void purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username, void *icon_data, size_t icon_len, const char *checksum)
Sets a buddy icon for a user.
const char * purple_buddy_icon_get_username(const PurpleBuddyIcon *icon)
Returns the buddy icon's username.
const char * purple_buddy_icons_get_cache_dir(void)
Returns the directory used to store buddy icon cache files.
PurpleBuddyIcon * purple_buddy_icon_unref(PurpleBuddyIcon *icon)
Decrements the reference count on a buddy icon.
PurpleStoredImage * purple_buddy_icons_find_custom_icon(PurpleContact *contact)
PurpleContact version of purple_buddy_icons_node_find_custom_icon.
const char * purple_buddy_icons_get_checksum_for_user(PurpleBuddy *buddy)
Returns the checksum for the buddy icon of a specified buddy.
PurpleStoredImage * purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node, guchar *icon_data, size_t icon_len)
Sets a custom buddy icon for a blist node.
void purple_buddy_icons_uninit(void)
Uninitializes the buddy icon subsystem.
gboolean purple_buddy_icons_has_custom_icon(PurpleContact *contact)
PurpleContact version of purple_buddy_icons_node_has_custom_icon.
PurpleBuddyIcon * purple_buddy_icon_new(PurpleAccount *account, const char *username, void *icon_data, size_t icon_len, const char *checksum)
Creates a new buddy icon structure and populates it.
void purple_buddy_icons_set_cache_dir(const char *cache_dir)
Sets the directory used to store buddy icon cache files.
PurpleStoredImage * purple_buddy_icons_find_account_icon(PurpleAccount *account)
Returns the buddy icon image for an account.
PurpleStoredImage * purple_buddy_icons_set_custom_icon(PurpleContact *contact, guchar *icon_data, size_t icon_len)
PurpleContact version of purple_buddy_icons_node_set_custom_icon.
PurpleStoredImage * purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node, const gchar *filename)
Sets a custom buddy icon for a blist node.
const char * purple_buddy_icon_get_checksum(const PurpleBuddyIcon *icon)
Returns the buddy icon's checksum.
void * purple_buddy_icons_get_handle(void)
Returns the buddy icon subsystem handle.
gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len)
Returns the buddy icon's data.
PurpleStoredImage * purple_buddy_icons_set_account_icon(PurpleAccount *account, guchar *icon_data, size_t icon_len)
Sets a buddy icon for an account.
gboolean purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node)
Returns a boolean indicating if a given blist node has a custom buddy icon.
void purple_buddy_icon_update(PurpleBuddyIcon *icon)
Updates every instance of this icon.
const char * purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon)
Returns an extension corresponding to the buddy icon's file type.
void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height)
Gets display size for a buddy icon.
PurpleAccount * purple_buddy_icon_get_account(const PurpleBuddyIcon *icon)
Returns the buddy icon's account.
PurpleBuddyIcon * purple_buddy_icon_ref(PurpleBuddyIcon *icon)
Increments the reference count on a buddy icon.
void purple_buddy_icons_set_caching(gboolean caching)
Sets whether or not buddy icon caching is enabled.
gboolean purple_buddy_icons_is_caching(void)
Returns whether or not buddy icon caching should be enabled.
PurpleStoredImage * purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node)
Returns the custom buddy icon image for a blist node.
void purple_buddy_icons_init(void)
Initializes the buddy icon subsystem.
void purple_buddy_icon_set_data(PurpleBuddyIcon *icon, guchar *data, size_t len, const char *checksum)
Sets the buddy icon's data.
IM Image Store API.
struct _PurpleStoredImage PurpleStoredImage
A set of utility functions that provide a reference-counted immutable wrapper around an image's data ...
Definition imgstore.h:37
Protocol Plugin functions.
Structure representing an account.
Definition account.h:170
A Buddy list node.
Definition blist.h:126
A description of a Buddy Icon specification.
Definition prpl.h:85
A buddy.
Definition blist.h:140
A contact.
Definition blist.h:155
Utility Functions.