imgstore.h

Go to the documentation of this file.
00001 
00006 /* purple
00007  *
00008  * Purple is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  *
00026  * @see @ref imgstore-signals
00027  */
00028 #ifndef _PURPLE_IMGSTORE_H_
00029 #define _PURPLE_IMGSTORE_H_
00030 
00031 #include <glib.h>
00032 
00033 typedef struct _PurpleStoredImage PurpleStoredImage;
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00056 PurpleStoredImage *
00057 purple_imgstore_add(gpointer data, size_t size, const char *filename);
00058 
00074 int purple_imgstore_add_with_id(gpointer data, size_t size, const char *filename);
00075 
00084 PurpleStoredImage *purple_imgstore_find_by_id(int id);
00085 
00094 gconstpointer purple_imgstore_get_data(PurpleStoredImage *img);
00095 
00104 size_t purple_imgstore_get_size(PurpleStoredImage *img);
00105 
00114 const char *purple_imgstore_get_filename(const PurpleStoredImage *img);
00115 
00123 const char *purple_imgstore_get_extension(PurpleStoredImage *img);
00124 
00132 PurpleStoredImage *
00133 purple_imgstore_ref(PurpleStoredImage *img);
00134 
00144 PurpleStoredImage *
00145 purple_imgstore_unref(PurpleStoredImage *img);
00146 
00156 void purple_imgstore_ref_by_id(int id);
00157 
00167 void purple_imgstore_unref_by_id(int id);
00168 
00174 void *purple_imgstore_get_handle(void);
00175 
00179 void purple_imgstore_init(void);
00180 
00184 void purple_imgstore_uninit(void);
00185 
00186 #ifdef __cplusplus
00187 }
00188 #endif
00189 
00190 #endif /* _PURPLE_IMGSTORE_H_ */