EXIF library (libexif) Internals  0.6.24
exif-log.h File Reference

Log message infrastructure. More...

#include <libexif/exif-mem.h>
#include <stdarg.h>
Include dependency graph for exif-log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#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))
 

Typedefs

typedef struct _ExifLog ExifLog
 State maintained by the logging interface. More...
 
typedef void(* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args, void *data)
 Log callback function prototype. More...
 

Enumerations

enum  ExifLogCode { EXIF_LOG_CODE_NONE , EXIF_LOG_CODE_DEBUG , EXIF_LOG_CODE_NO_MEMORY , EXIF_LOG_CODE_CORRUPT_DATA }
 

Functions

ExifLogexif_log_new (void)
 Create a new logging instance. More...
 
ExifLogexif_log_new_mem (ExifMem *)
 
void exif_log_ref (ExifLog *log)
 
void exif_log_unref (ExifLog *log)
 
void exif_log_free (ExifLog *log)
 Delete instance of ExifLog. More...
 
const char * exif_log_code_get_title (ExifLogCode code)
 Return a textual description of the given class of error log. More...
 
const char * exif_log_code_get_message (ExifLogCode code)
 Return a verbose description of the given class of error log. More...
 
void exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data)
 Register log callback function. More...
 
void exif_log (ExifLog *log, ExifLogCode, const char *domain, const char *format,...)
 
void exif_logv (ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args)
 

Detailed Description

Log message infrastructure.

Definition in file exif-log.h.

Macro Definition Documentation

◆ EXIF_LOG_NO_MEMORY

#define EXIF_LOG_NO_MEMORY (   l,
  d,
 
)    exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))

Definition at line 110 of file exif-log.h.

Typedef Documentation

◆ ExifLog

typedef struct _ExifLog ExifLog

State maintained by the logging interface.

Definition at line 1 of file exif-log.h.

◆ ExifLogFunc

typedef void(* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain, const char *format, va_list args, void *data)

Log callback function prototype.

Definition at line 77 of file exif-log.h.

Enumeration Type Documentation

◆ ExifLogCode

Enumerator
EXIF_LOG_CODE_NONE 
EXIF_LOG_CODE_DEBUG 
EXIF_LOG_CODE_NO_MEMORY 
EXIF_LOG_CODE_CORRUPT_DATA 

Definition at line 54 of file exif-log.h.

Function Documentation

◆ exif_log()

◆ exif_log_code_get_message()

const char* exif_log_code_get_message ( ExifLogCode  code)

Return a verbose description of the given class of error log.

Parameters
[in]codelogging message class
Returns
verbose description of the log class, or NULL if unknown

Definition at line 62 of file exif-log.c.

References _, code, codes, and message.

◆ exif_log_code_get_title()

const char* exif_log_code_get_title ( ExifLogCode  code)

Return a textual description of the given class of error log.

Parameters
[in]codelogging message class
Returns
textual description of the log class, or NULL if unknown

Definition at line 53 of file exif-log.c.

References _, code, codes, and title.

◆ exif_log_free()

void exif_log_free ( ExifLog log)

Delete instance of ExifLog.

See also
exif_log_new
Parameters
[in]logExifLog
Returns
new instance of ExifLog

Definition at line 112 of file exif-log.c.

References exif_mem_free(), exif_mem_unref(), and _ExifLog::mem.

Referenced by exif_log_unref(), and log_null_test().

Here is the call graph for this function:

◆ exif_log_new()

ExifLog* exif_log_new ( void  )

Create a new logging instance.

See also
exif_log_free
Returns
new instance of ExifLog

Definition at line 86 of file exif-log.c.

References exif_log_new_mem(), exif_mem_new_default(), and exif_mem_unref().

Referenced by log_null_test(), main(), and test_parse().

Here is the call graph for this function:

◆ exif_log_new_mem()

ExifLog* exif_log_new_mem ( ExifMem mem)

Definition at line 71 of file exif-log.c.

References exif_mem_alloc(), exif_mem_ref(), _ExifLog::mem, and _ExifLog::ref_count.

Referenced by exif_log_new(), and log_null_test().

Here is the call graph for this function:

◆ exif_log_ref()

void exif_log_ref ( ExifLog log)

◆ exif_log_set_func()

void exif_log_set_func ( ExifLog log,
ExifLogFunc  func,
void *  data 
)

Register log callback function.

Calls to the log callback function are purely for diagnostic purposes.

Parameters
[in]loglogging state variable
[in]funccallback function to set
[in]datadata to pass into callback function

Definition at line 123 of file exif-log.c.

References _ExifLog::data, and _ExifLog::func.

Referenced by log_null_test(), main(), and test_parse().

◆ exif_log_unref()

void exif_log_unref ( ExifLog log)

Definition at line 104 of file exif-log.c.

References exif_log_free(), and _ExifLog::ref_count.

Referenced by exif_content_free(), exif_content_log(), exif_data_free(), exif_data_log(), exif_loader_free(), exif_loader_log(), exif_mnote_data_free(), exif_mnote_data_log(), and log_null_test().

Here is the call graph for this function:

◆ exif_logv()

void exif_logv ( ExifLog log,
ExifLogCode  code,
const char *  domain,
const char *  format,
va_list  args 
)

Definition at line 146 of file exif-log.c.

References code, _ExifLog::data, format, and _ExifLog::func.

Referenced by exif_entry_log(), exif_log(), and log_null_test().


libexif Generated by doxygen