00001 00005 /* exif-mem.h 00006 * 00007 * Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the 00021 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 * Boston, MA 02110-1301 USA. 00023 */ 00024 00025 #ifndef __EXIF_MEM_H__ 00026 #define __EXIF_MEM_H__ 00027 00028 #include <libexif/exif-utils.h> 00029 00030 #ifdef __cplusplus 00031 extern "C" { 00032 #endif /* __cplusplus */ 00033 00039 typedef void * (* ExifMemAllocFunc) (ExifLong s); 00040 00047 typedef void * (* ExifMemReallocFunc) (void *p, ExifLong s); 00048 00054 typedef void (* ExifMemFreeFunc) (void *p); 00055 00057 typedef struct _ExifMem ExifMem; 00058 00065 ExifMem *exif_mem_new (ExifMemAllocFunc a, ExifMemReallocFunc r, 00066 ExifMemFreeFunc f); 00069 void exif_mem_ref (ExifMem *); 00070 00074 void exif_mem_unref (ExifMem *); 00075 00076 void *exif_mem_alloc (ExifMem *m, ExifLong s); 00077 void *exif_mem_realloc (ExifMem *m, void *p, ExifLong s); 00078 void exif_mem_free (ExifMem *m, void *p); 00079 00084 ExifMem *exif_mem_new_default (void); 00085 00086 #ifdef __cplusplus 00087 } 00088 #endif /* __cplusplus */ 00089 00090 #endif /* __EXIF_MEM_H__ */