libpurple/imgstore.h

Mon, 01 Oct 2007 21:25:18 +0000

author
Luke Schierer <lschiere@pidgin.im>
date
Mon, 01 Oct 2007 21:25:18 +0000
changeset 20809
5ca6127ca6f5
parent 20147
66f05a854eee
child 20889
3d0ef192f98c
permissions
-rw-r--r--

merge of '2a1e61ae4a0491e4906ffc58a5d4c01f406b5a61'
and '933b5898de30964f6fd69cbb3c5bbf029db95405'

6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
1 /**
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
2 * @file imgstore.h IM Image Store API
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
3 * @ingroup core
20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
4 */
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 /* purple
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
7 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7118
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7118
diff changeset
10 * source distribution.
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
11 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
15 * (at your option) any later version.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
16 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
20 * GNU General Public License for more details.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
21 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
23 * 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
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
25 *
18412
6873322c380f Add links to the signal documents in the API documents.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 18271
diff changeset
26 * @see @ref imgstore-signals
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
27 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
28 #ifndef _PURPLE_IMGSTORE_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
29 #define _PURPLE_IMGSTORE_H_
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
30
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
31 #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
32
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
33 typedef struct _PurpleStoredImage PurpleStoredImage;
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
34
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
35 #ifdef __cplusplus
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
36 extern "C" {
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
37 #endif
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
38
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
39 /**
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
40 * 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
41 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
42 * 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
43 * 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
44 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
45 * 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
46 * 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
47 *
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
48 * @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
49 * 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
50 * 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
51 * @param size Image data's size.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
52 * @param filename Filename associated with image.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
53 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
54 * @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
55 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
56 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
57 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
58
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 * 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
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 * 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
63 * 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
64 * for it to be freed.
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
65 *
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
66 * @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
67 * 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
68 * copy of the data, make it before calling this function.
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
69 * @param size Image data's size.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
70 * @param filename Filename associated with image.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
71
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
72 * @return ID for the image.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
73 */
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
74 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename);
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
75
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
76 /**
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
77 * Retrieve an image from the store. The caller does not own a
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
78 * reference to the image.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
79 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
80 * @param id The ID for the image.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
81 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
82 * @return A pointer to the requested image, or NULL if it was not found.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
83 */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
84 PurpleStoredImage *purple_imgstore_find_by_id(int id);
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
85
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
86 /**
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
87 * Retrieves a pointer to the image's data.
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
88 *
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
89 * @param img The Image
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
90 *
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
91 * @return A pointer to the data, which must not
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
92 * be freed or modified.
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
93 */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
94 gconstpointer purple_imgstore_get_data(PurpleStoredImage *img);
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
95
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
96 /**
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
97 * Retrieves the length of the image's data.
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
98 *
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
99 * @param img The Image
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
100 *
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
101 * @return The size of the data that the pointer returned by
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
102 * purple_imgstore_get_data points to.
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
103 */
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
104 size_t purple_imgstore_get_size(PurpleStoredImage *img);
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
105
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
106 /**
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
107 * Retrieves a pointer to the image's filename.
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
108 *
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
109 * @param img The image
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
110 *
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
111 * @return A pointer to the filename, which must not
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
112 * be freed or modified.
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
113 */
16775
8627d2560d40 Get rid of two harmless warnings:
Mark Doliner <markdoliner@pidgin.im>
parents: 16599
diff changeset
114 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
115
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
116 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
117 * Returns an extension corresponding to the image's file type.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
118 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
119 * @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
120 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
121 * @return The icon's extension or "icon" if unknown.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
122 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
123 const char *purple_imgstore_get_extension(PurpleStoredImage *img);
8962
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
124
5cd12e525d95 [gaim-migrate @ 9736]
Tim Ringenbach <marv@pidgin.im>
parents: 8046
diff changeset
125 /**
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
126 * 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
127 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
128 * @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
129 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
130 * @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
131 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
132 PurpleStoredImage *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
133 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
134
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
135 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
136 * 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
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 * 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
139 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
140 * @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
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 * @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
143 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
144 PurpleStoredImage *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
145 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
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 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
148 * 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
149 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
150 * 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
151 * 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
152 * be more efficient to call purple_imgstore_ref() directly.
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
153 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
154 * @param id The ID for the image.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
155 */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
156 void purple_imgstore_ref_by_id(int id);
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
157
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
158 /**
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
159 * 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
160 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
161 * 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
162 * 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
163 * be more efficient to call purple_imgstore_unref() directly.
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
164 *
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
165 * @param id The ID for the image.
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
166 */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
167 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
168
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
169 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
170 * 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
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 * @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
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 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
175
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
176 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
177 * 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
178 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
179 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
180
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
181 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
182 * 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
183 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 15884
diff changeset
184 void purple_imgstore_uninit(void);
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
185
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
186 #ifdef __cplusplus
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
187 }
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
188 #endif
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
diff changeset
189
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
190 #endif /* _PURPLE_IMGSTORE_H_ */

mercurial