00001 00007 /* purple 00008 * 00009 * Purple is the legal property of its developers, whose names are too numerous 00010 * to list here. Please refer to the COPYRIGHT file distributed with this 00011 * source distribution. 00012 * 00013 * This program is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License as published by 00015 * the Free Software Foundation; either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * This program is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with this program; if not, write to the Free Software 00025 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 00026 */ 00027 #ifndef _PURPLE_IMGSTORE_H_ 00028 #define _PURPLE_IMGSTORE_H_ 00029 00030 #include <glib.h> 00031 00035 typedef struct _PurpleStoredImage PurpleStoredImage; 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00062 PurpleStoredImage * 00063 purple_imgstore_add(gpointer data, size_t size, const char *filename); 00064 00085 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename); 00086 00095 PurpleStoredImage *purple_imgstore_find_by_id(int id); 00096 00105 gconstpointer purple_imgstore_get_data(PurpleStoredImage *img); 00106 00115 size_t purple_imgstore_get_size(PurpleStoredImage *img); 00116 00125 const char *purple_imgstore_get_filename(const PurpleStoredImage *img); 00126 00136 const char *purple_imgstore_get_extension(PurpleStoredImage *img); 00137 00145 PurpleStoredImage * 00146 purple_imgstore_ref(PurpleStoredImage *img); 00147 00157 PurpleStoredImage * 00158 purple_imgstore_unref(PurpleStoredImage *img); 00159 00169 void purple_imgstore_ref_by_id(int id); 00170 00180 void purple_imgstore_unref_by_id(int id); 00181 00187 void *purple_imgstore_get_handle(void); 00188 00192 void purple_imgstore_init(void); 00193 00197 void purple_imgstore_uninit(void); 00198 00199 #ifdef __cplusplus 00200 } 00201 #endif 00202 00203 #endif /* _PURPLE_IMGSTORE_H_ */