Wed, 13 May 2009 20:29:03 +0000
Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.
| 6982 | 1 | /** |
| 2 | * @file imgstore.h IM Image Store API | |
| 3 | * @ingroup core | |
|
20889
3d0ef192f98c
All the links to libpurple signal pages were in the comment containing the
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
4 | * @see @ref imgstore-signals |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
6 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
7 | /* purple |
| 6982 | 8 | * |
| 15884 | 9 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 10 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 11 | * source distribution. | |
| 6982 | 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify | |
| 14 | * it under the terms of the GNU General Public License as published by | |
| 15 | * the Free Software Foundation; either version 2 of the License, or | |
| 16 | * (at your option) any later version. | |
| 17 | * | |
| 18 | * This program is distributed in the hope that it will be useful, | |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | * GNU General Public License for more details. | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License | |
| 24 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18412
diff
changeset
|
25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 6982 | 26 | */ |
| 15884 | 27 | #ifndef _PURPLE_IMGSTORE_H_ |
| 28 | #define _PURPLE_IMGSTORE_H_ | |
| 6982 | 29 | |
|
16538
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
16437
diff
changeset
|
30 | #include <glib.h> |
|
c7e61e2917c9
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@pidgin.im>
parents:
16437
diff
changeset
|
31 | |
|
22613
1077236bf4fb
Add docs to PurpleStoredImage so that doxygen links to it show up
Will Thompson <resiak@pidgin.im>
parents:
20889
diff
changeset
|
32 | /** A reference-counted immutable wrapper around an image's data and its |
|
1077236bf4fb
Add docs to PurpleStoredImage so that doxygen links to it show up
Will Thompson <resiak@pidgin.im>
parents:
20889
diff
changeset
|
33 | * filename. |
|
1077236bf4fb
Add docs to PurpleStoredImage so that doxygen links to it show up
Will Thompson <resiak@pidgin.im>
parents:
20889
diff
changeset
|
34 | */ |
| 15884 | 35 | typedef struct _PurpleStoredImage PurpleStoredImage; |
| 6982 | 36 | |
| 37 | #ifdef __cplusplus | |
| 38 | extern "C" { | |
| 39 | #endif | |
| 40 | ||
| 41 | /** | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
42 | * Add an image to the store. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
43 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
44 | * The caller owns a reference to the image in the store, and must dereference |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
45 | * the image with purple_imgstore_unref() for it to be freed. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
46 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
47 | * No ID is allocated when using this function. If you need to reference the |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
48 | * image by an ID, use purple_imgstore_add_with_id() instead. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
49 | * |
|
16539
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
50 | * @param data Pointer to the image data, which the imgstore will take |
|
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
51 | * ownership of and free as appropriate. If you want a |
|
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
52 | * copy of the data, make it before calling this function. |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
53 | * @param size Image data's size. |
|
22763
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
54 | * @param filename Filename associated with image. This is for your |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
55 | * convenience. It could be the full path to the |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
56 | * image or, more commonly, the filename of the image |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
57 | * without any directory information. It can also be |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
58 | * NULL, if you don't need to keep track of a filename. |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
59 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
60 | * @return The stored image. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
61 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
62 | PurpleStoredImage * |
|
16539
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
63 | purple_imgstore_add(gpointer data, size_t size, const char *filename); |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
64 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
65 | /** |
|
22652
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
66 | * Create an image and add it to the store. |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
67 | * |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
68 | * @param path The path to the image. |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
69 | * |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
70 | * @return The stored image. |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
71 | * @since 2.X.X |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
72 | */ |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
73 | PurpleStoredImage * |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
74 | purple_imgstore_new_from_file(const char *path); |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
75 | |
|
ba50c2bc1adc
Make it simple to create a stored-image from a filename.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20889
diff
changeset
|
76 | /** |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
77 | * Add an image to the store, allocating an ID. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
78 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
79 | * The caller owns a reference to the image in the store, and must dereference |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
80 | * the image with purple_imgstore_unref_by_id() or purple_imgstore_unref() |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
81 | * for it to be freed. |
| 6982 | 82 | * |
|
16539
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
83 | * @param data Pointer to the image data, which the imgstore will take |
|
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
84 | * ownership of and free as appropriate. If you want a |
|
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
85 | * copy of the data, make it before calling this function. |
| 6982 | 86 | * @param size Image data's size. |
|
22763
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
87 | * @param filename Filename associated with image. This is for your |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
88 | * convenience. It could be the full path to the |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
89 | * image or, more commonly, the filename of the image |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
90 | * without any directory information. It can also be |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
91 | * NULL, if you don't need to keep track of a filename. |
| 6982 | 92 | |
|
22763
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
93 | * @return ID for the image. This is a unique number that can be used |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
94 | * within libpurple to reference the image. |
| 6982 | 95 | */ |
|
16539
75a20ae3a527
Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@pidgin.im>
parents:
16538
diff
changeset
|
96 | int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename); |
| 6982 | 97 | |
| 98 | /** | |
| 99 | * Retrieve an image from the store. The caller does not own a | |
| 100 | * reference to the image. | |
| 101 | * | |
| 102 | * @param id The ID for the image. | |
| 103 | * | |
| 104 | * @return A pointer to the requested image, or NULL if it was not found. | |
| 105 | */ | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
106 | PurpleStoredImage *purple_imgstore_find_by_id(int id); |
| 6982 | 107 | |
| 108 | /** | |
| 8962 | 109 | * Retrieves a pointer to the image's data. |
| 110 | * | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
111 | * @param img The Image |
| 8962 | 112 | * |
| 113 | * @return A pointer to the data, which must not | |
| 114 | * be freed or modified. | |
| 115 | */ | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
116 | gconstpointer purple_imgstore_get_data(PurpleStoredImage *img); |
| 8962 | 117 | |
| 118 | /** | |
| 119 | * Retrieves the length of the image's data. | |
| 120 | * | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
121 | * @param img The Image |
| 8962 | 122 | * |
| 123 | * @return The size of the data that the pointer returned by | |
| 15884 | 124 | * purple_imgstore_get_data points to. |
| 8962 | 125 | */ |
|
16599
43f9ca8adbef
Fix the name of the parameter for purple_imgstore_get_size() so that Doxygen will stop crying.
Richard Laager <rlaager@pidgin.im>
parents:
16539
diff
changeset
|
126 | size_t purple_imgstore_get_size(PurpleStoredImage *img); |
| 8962 | 127 | |
| 128 | /** | |
| 129 | * Retrieves a pointer to the image's filename. | |
| 130 | * | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
131 | * @param img The image |
| 8962 | 132 | * |
| 133 | * @return A pointer to the filename, which must not | |
| 134 | * be freed or modified. | |
| 135 | */ | |
|
16775
8627d2560d40
Get rid of two harmless warnings:
Mark Doliner <markdoliner@pidgin.im>
parents:
16599
diff
changeset
|
136 | const char *purple_imgstore_get_filename(const PurpleStoredImage *img); |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
137 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
138 | /** |
|
22763
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
139 | * Looks at the magic numbers of the image data (the first few bytes) |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
140 | * and returns an extension corresponding to the image's file type. |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
141 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
142 | * @param img The image. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
143 | * |
|
22763
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
144 | * @return The image's extension (for example "png") or "icon" |
|
6e4bbebdf127
Better documentation.
Mark Doliner <markdoliner@pidgin.im>
parents:
22613
diff
changeset
|
145 | * if unknown. |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
146 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
147 | const char *purple_imgstore_get_extension(PurpleStoredImage *img); |
| 8962 | 148 | |
| 149 | /** | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
150 | * Increment the reference count. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
151 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
152 | * @param img The image. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
153 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
154 | * @return @a img |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
155 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
156 | PurpleStoredImage * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
157 | purple_imgstore_ref(PurpleStoredImage *img); |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
158 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
159 | /** |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
160 | * Decrement the reference count. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
161 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
162 | * If the reference count reaches zero, the image will be freed. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
163 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
164 | * @param img The image. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
165 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
166 | * @return @a img or @c NULL if the reference count reached zero. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
167 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
168 | PurpleStoredImage * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
169 | purple_imgstore_unref(PurpleStoredImage *img); |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
170 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
171 | /** |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
172 | * Increment the reference count using an ID. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
173 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
174 | * This is a convience wrapper for purple_imgstore_find_by_id() and |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
175 | * purple_imgstore_ref(), so if you have a PurpleStoredImage, it'll |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
176 | * be more efficient to call purple_imgstore_ref() directly. |
| 6982 | 177 | * |
| 178 | * @param id The ID for the image. | |
| 179 | */ | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
180 | void purple_imgstore_ref_by_id(int id); |
| 6982 | 181 | |
| 182 | /** | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
183 | * Decrement the reference count using an ID. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
184 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
185 | * This is a convience wrapper for purple_imgstore_find_by_id() and |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
186 | * purple_imgstore_unref(), so if you have a PurpleStoredImage, it'll |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
187 | * be more efficient to call purple_imgstore_unref() directly. |
| 6982 | 188 | * |
| 189 | * @param id The ID for the image. | |
| 190 | */ | |
|
16437
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
191 | void purple_imgstore_unref_by_id(int id); |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
192 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
193 | /** |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
194 | * Returns the image store subsystem handle. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
195 | * |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
196 | * @return The subsystem handle. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
197 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
198 | void *purple_imgstore_get_handle(void); |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
199 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
200 | /** |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
201 | * Initializes the image store subsystem. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
202 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
203 | void purple_imgstore_init(void); |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
204 | |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
205 | /** |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
206 | * Uninitializes the image store subsystem. |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
207 | */ |
|
7ff7c3405ea2
Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
208 | void purple_imgstore_uninit(void); |
| 6982 | 209 | |
| 210 | #ifdef __cplusplus | |
| 211 | } | |
| 212 | #endif | |
| 213 | ||
| 15884 | 214 | #endif /* _PURPLE_IMGSTORE_H_ */ |