imgstore.h

Go to the documentation of this file.
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 
00073 PurpleStoredImage *
00074 purple_imgstore_new_from_file(const char *path);
00075 
00096 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename);
00097 
00106 PurpleStoredImage *purple_imgstore_find_by_id(int id);
00107 
00116 gconstpointer purple_imgstore_get_data(PurpleStoredImage *img);
00117 
00126 size_t purple_imgstore_get_size(PurpleStoredImage *img);
00127 
00136 const char *purple_imgstore_get_filename(const PurpleStoredImage *img);
00137 
00147 const char *purple_imgstore_get_extension(PurpleStoredImage *img);
00148 
00156 PurpleStoredImage *
00157 purple_imgstore_ref(PurpleStoredImage *img);
00158 
00168 PurpleStoredImage *
00169 purple_imgstore_unref(PurpleStoredImage *img);
00170 
00180 void purple_imgstore_ref_by_id(int id);
00181 
00191 void purple_imgstore_unref_by_id(int id);
00192 
00198 void *purple_imgstore_get_handle(void);
00199 
00203 void purple_imgstore_init(void);
00204 
00208 void purple_imgstore_uninit(void);
00209 
00210 #ifdef __cplusplus
00211 }
00212 #endif
00213 
00214 #endif /* _PURPLE_IMGSTORE_H_ */