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 00037 typedef struct _PurpleStoredImage PurpleStoredImage; 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00066 PurpleStoredImage * 00067 purple_imgstore_add(gpointer data, size_t size, const char *filename); 00068 00087 PurpleStoredImage * 00088 purple_imgstore_new_from_file(const char *path); 00089 00112 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename); 00113 00122 PurpleStoredImage *purple_imgstore_find_by_id(int id); 00123 00132 gconstpointer purple_imgstore_get_data(PurpleStoredImage *img); 00133 00142 size_t purple_imgstore_get_size(PurpleStoredImage *img); 00143 00152 const char *purple_imgstore_get_filename(const PurpleStoredImage *img); 00153 00163 const char *purple_imgstore_get_extension(PurpleStoredImage *img); 00164 00172 PurpleStoredImage * 00173 purple_imgstore_ref(PurpleStoredImage *img); 00174 00184 PurpleStoredImage * 00185 purple_imgstore_unref(PurpleStoredImage *img); 00186 00196 void purple_imgstore_ref_by_id(int id); 00197 00207 void purple_imgstore_unref_by_id(int id); 00208 00214 void *purple_imgstore_get_handle(void); 00215 00219 void purple_imgstore_init(void); 00220 00224 void purple_imgstore_uninit(void); 00225 00226 #ifdef __cplusplus 00227 } 00228 #endif 00229 00230 #endif /* _PURPLE_IMGSTORE_H_ */