Mercurial > pidgin.yaz
comparison libpurple/imgstore.h @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 5fe8042783c1 |
children | 391a79778f89 |
comparison
equal
deleted
inserted
replaced
15822:84b0f9b23ede | 15823:32c366eeeb99 |
---|---|
1 /** | 1 /** |
2 * @file imgstore.h IM Image Store API | 2 * @file imgstore.h IM Image Store API |
3 * @ingroup core | 3 * @ingroup core |
4 * | 4 * |
5 * gaim | 5 * purple |
6 * | 6 * |
7 * Gaim is the legal property of its developers, whose names are too numerous | 7 * Purple is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | 8 * to list here. Please refer to the COPYRIGHT file distributed with this |
9 * source distribution. | 9 * source distribution. |
10 * | 10 * |
11 * This program is free software; you can redistribute it and/or modify | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | 12 * it under the terms of the GNU General Public License as published by |
21 * You should have received a copy of the GNU General Public License | 21 * You should have received a copy of the GNU General Public License |
22 * along with this program; if not, write to the Free Software | 22 * along with this program; if not, write to the Free Software |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 * | 24 * |
25 */ | 25 */ |
26 #ifndef _GAIM_IMGSTORE_H_ | 26 #ifndef _PURPLE_IMGSTORE_H_ |
27 #define _GAIM_IMGSTORE_H_ | 27 #define _PURPLE_IMGSTORE_H_ |
28 | 28 |
29 struct _GaimStoredImage; | 29 struct _PurpleStoredImage; |
30 typedef struct _GaimStoredImage GaimStoredImage; | 30 typedef struct _PurpleStoredImage PurpleStoredImage; |
31 | 31 |
32 #ifdef __cplusplus | 32 #ifdef __cplusplus |
33 extern "C" { | 33 extern "C" { |
34 #endif | 34 #endif |
35 | 35 |
36 /** | 36 /** |
37 * Add an image to the store. The caller owns a reference | 37 * Add an image to the store. The caller owns a reference |
38 * to the image in the store, and must dereference the image | 38 * to the image in the store, and must dereference the image |
39 * with gaim_imgstore_unref for it to be freed. | 39 * with purple_imgstore_unref for it to be freed. |
40 * | 40 * |
41 * @param data Pointer to the image data. | 41 * @param data Pointer to the image data. |
42 * @param size Image data's size. | 42 * @param size Image data's size. |
43 * @param filename Filename associated with image. | 43 * @param filename Filename associated with image. |
44 | 44 |
45 * @return ID for the image. | 45 * @return ID for the image. |
46 */ | 46 */ |
47 int gaim_imgstore_add(const void *data, size_t size, const char *filename); | 47 int purple_imgstore_add(const void *data, size_t size, const char *filename); |
48 | 48 |
49 /** | 49 /** |
50 * Retrieve an image from the store. The caller does not own a | 50 * Retrieve an image from the store. The caller does not own a |
51 * reference to the image. | 51 * reference to the image. |
52 * | 52 * |
53 * @param id The ID for the image. | 53 * @param id The ID for the image. |
54 * | 54 * |
55 * @return A pointer to the requested image, or NULL if it was not found. | 55 * @return A pointer to the requested image, or NULL if it was not found. |
56 */ | 56 */ |
57 GaimStoredImage *gaim_imgstore_get(int id); | 57 PurpleStoredImage *purple_imgstore_get(int id); |
58 | 58 |
59 /** | 59 /** |
60 * Retrieves a pointer to the image's data. | 60 * Retrieves a pointer to the image's data. |
61 * | 61 * |
62 * @param i The Image | 62 * @param i The Image |
63 * | 63 * |
64 * @return A pointer to the data, which must not | 64 * @return A pointer to the data, which must not |
65 * be freed or modified. | 65 * be freed or modified. |
66 */ | 66 */ |
67 gpointer gaim_imgstore_get_data(GaimStoredImage *i); | 67 gpointer purple_imgstore_get_data(PurpleStoredImage *i); |
68 | 68 |
69 /** | 69 /** |
70 * Retrieves the length of the image's data. | 70 * Retrieves the length of the image's data. |
71 * | 71 * |
72 * @param i The Image | 72 * @param i The Image |
73 * | 73 * |
74 * @return The size of the data that the pointer returned by | 74 * @return The size of the data that the pointer returned by |
75 * gaim_imgstore_get_data points to. | 75 * purple_imgstore_get_data points to. |
76 */ | 76 */ |
77 size_t gaim_imgstore_get_size(GaimStoredImage *i); | 77 size_t purple_imgstore_get_size(PurpleStoredImage *i); |
78 | 78 |
79 /** | 79 /** |
80 * Retrieves a pointer to the image's filename. | 80 * Retrieves a pointer to the image's filename. |
81 * | 81 * |
82 * @param i The Image | 82 * @param i The Image |
83 * | 83 * |
84 * @return A pointer to the filename, which must not | 84 * @return A pointer to the filename, which must not |
85 * be freed or modified. | 85 * be freed or modified. |
86 */ | 86 */ |
87 const char *gaim_imgstore_get_filename(GaimStoredImage *i); | 87 const char *purple_imgstore_get_filename(PurpleStoredImage *i); |
88 | 88 |
89 /** | 89 /** |
90 * Increment the reference count for an image in the store. The | 90 * Increment the reference count for an image in the store. The |
91 * image will be removed from the store when the reference count | 91 * image will be removed from the store when the reference count |
92 * is zero. | 92 * is zero. |
93 * | 93 * |
94 * @param id The ID for the image. | 94 * @param id The ID for the image. |
95 */ | 95 */ |
96 void gaim_imgstore_ref(int id); | 96 void purple_imgstore_ref(int id); |
97 | 97 |
98 /** | 98 /** |
99 * Decrement the reference count for an image in the store. The | 99 * Decrement the reference count for an image in the store. The |
100 * image will be removed from the store when the reference count | 100 * image will be removed from the store when the reference count |
101 * is zero. | 101 * is zero. |
102 * | 102 * |
103 * @param id The ID for the image. | 103 * @param id The ID for the image. |
104 */ | 104 */ |
105 void gaim_imgstore_unref(int id); | 105 void purple_imgstore_unref(int id); |
106 | 106 |
107 #ifdef __cplusplus | 107 #ifdef __cplusplus |
108 } | 108 } |
109 #endif | 109 #endif |
110 | 110 |
111 #endif /* _GAIM_IMGSTORE_H_ */ | 111 #endif /* _PURPLE_IMGSTORE_H_ */ |