25 #ifndef LIBEXIF_EXIF_LOG_H
26 #define LIBEXIF_EXIF_LOG_H
45 void exif_log_ref (
ExifLog *log);
46 void exif_log_unref (
ExifLog *log);
59 EXIF_LOG_CODE_NO_MEMORY,
60 EXIF_LOG_CODE_CORRUPT_DATA
80 const char *format, va_list args,
void *data);
91 #ifndef NO_VERBOSE_TAG_STRINGS
92 void exif_log (
ExifLog *log, ExifLogCode,
const char *domain,
93 const char *format, ...)
95 __attribute__((__format__(printf,4,5)))
99 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
100 #define exif_log(...) do { } while (0)
101 #elif defined(__GNUC__)
102 #define exif_log(x...) do { } while (0)
104 #define exif_log (void)
108 void exif_logv (
ExifLog *log, ExifLogCode,
const char *domain,
109 const char *format, va_list args);
112 #define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
void(* ExifLogFunc)(ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args, void *data)
Log callback function prototype.
Definition: exif-log.h:79
ExifLog * exif_log_new(void)
Create a new logging instance.
Definition: exif-log.c:88
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition: exif-mem.h:59
const char * exif_log_code_get_message(ExifLogCode code)
Return a verbose description of the given class of error log.
Definition: exif-log.c:64
void exif_log_set_func(ExifLog *log, ExifLogFunc func, void *data)
Register log callback function.
Definition: exif-log.c:125
void exif_log_free(ExifLog *log)
Delete instance of ExifLog.
Definition: exif-log.c:114
Define the ExifMem data type and the associated functions.
struct _ExifLog ExifLog
State maintained by the logging interface.
Definition: exif-log.h:36
const char * exif_log_code_get_title(ExifLogCode code)
Return a textual description of the given class of error log.
Definition: exif-log.c:55