23#ifndef LIBEXIF_EXIF_LOG_H
24#define LIBEXIF_EXIF_LOG_H
43void exif_log_ref (
ExifLog *log);
44void exif_log_unref (
ExifLog *log);
57 EXIF_LOG_CODE_NO_MEMORY,
58 EXIF_LOG_CODE_CORRUPT_DATA
78 const char *format, va_list args,
void *data);
89#ifndef NO_VERBOSE_TAG_STRINGS
90void exif_log (
ExifLog *log, ExifLogCode,
const char *domain,
91 const char *format, ...)
93 __attribute__((__format__(printf,4,5)))
97#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
98#define exif_log(...) do { } while (0)
99#elif defined(__GNUC__)
100#define exif_log(x...) do { } while (0)
102#define exif_log (void)
106void exif_logv (
ExifLog *log, ExifLogCode,
const char *domain,
107 const char *format, va_list args);
110#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))
ExifLog * exif_log_new(void)
Create a new logging instance.
Definition exif-log.c:86
const char * exif_log_code_get_title(ExifLogCode code)
Return a textual description of the given class of error log.
Definition exif-log.c:53
void exif_log_set_func(ExifLog *log, ExifLogFunc func, void *data)
Register log callback function.
Definition exif-log.c:123
struct _ExifLog ExifLog
State maintained by the logging interface.
Definition exif-log.h:34
void exif_log_free(ExifLog *log)
Delete instance of ExifLog.
Definition exif-log.c:112
void(* ExifLogFunc)(ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args, void *data)
Log callback function prototype.
Definition exif-log.h:77
const char * exif_log_code_get_message(ExifLogCode code)
Return a verbose description of the given class of error log.
Definition exif-log.c:62
Define the ExifMem data type and the associated functions.
struct _ExifMem ExifMem
ExifMem define a memory allocator.
Definition exif-mem.h:57