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 00058 PurpleStoredImage * 00059 purple_imgstore_add(gpointer data, size_t size, const char *filename); 00060 00076 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename); 00077 00086 PurpleStoredImage *purple_imgstore_find_by_id(int id); 00087 00096 gconstpointer purple_imgstore_get_data(PurpleStoredImage *img); 00097 00106 size_t purple_imgstore_get_size(PurpleStoredImage *img); 00107 00116 const char *purple_imgstore_get_filename(const PurpleStoredImage *img); 00117 00125 const char *purple_imgstore_get_extension(PurpleStoredImage *img); 00126 00134 PurpleStoredImage * 00135 purple_imgstore_ref(PurpleStoredImage *img); 00136 00146 PurpleStoredImage * 00147 purple_imgstore_unref(PurpleStoredImage *img); 00148 00158 void purple_imgstore_ref_by_id(int id); 00159 00169 void purple_imgstore_unref_by_id(int id); 00170 00176 void *purple_imgstore_get_handle(void); 00177 00181 void purple_imgstore_init(void); 00182 00186 void purple_imgstore_uninit(void); 00187 00188 #ifdef __cplusplus 00189 } 00190 #endif 00191 00192 #endif /* _PURPLE_IMGSTORE_H_ */