3 * Copyright © 2004 Lutz Müller <lutz@users.sourceforge.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __EXIF_LOG_H__
22 #define __EXIF_LOG_H__
26 #endif /* __cplusplus */
30 typedef struct _ExifLog ExifLog;
32 ExifLog *exif_log_new (void);
33 void exif_log_ref (ExifLog *log);
34 void exif_log_unref (ExifLog *log);
35 void exif_log_free (ExifLog *log);
40 EXIF_LOG_CODE_NO_MEMORY,
41 EXIF_LOG_CODE_CORRUPT_DATA
44 typedef void (* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain,
45 const char *format, va_list args, void *data);
47 void exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data);
49 void exif_log (ExifLog *log, ExifLogCode, const char *domain,
50 const char *format, ...);
51 void exif_logv (ExifLog *log, ExifLogCode, const char *domain,
52 const char *format, va_list args);
54 /* For your convenience */
55 #define EXIF_LOG_NO_MEMORY(l,d,s) exif_log (l, EXIF_LOG_CODE_NO_MEMORY, d, "Could not allocate %i byte(s).", s)
59 #endif /* __cplusplus */
61 #endif /* __EXIF_LOG_H__ */