EXIF library (libexif) Internals  0.6.24
exif-mnote-data-canon.c File Reference
#include <config.h>
#include "exif-mnote-data-canon.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libexif/exif-byte-order.h>
#include <libexif/exif-utils.h>
#include <libexif/exif-data.h>
Include dependency graph for exif-mnote-data-canon.c:

Go to the source code of this file.

Macros

#define CHECKOVERFLOW(offset, datasize, structsize)   (( offset >= datasize) || (structsize > datasize) || (offset > datasize - structsize ))
 
#define FAILSAFE_SIZE_MAX   1000000L
 

Functions

static void exif_mnote_data_canon_clear (ExifMnoteDataCanon *n)
 
static void exif_mnote_data_canon_free (ExifMnoteData *n)
 
static void exif_mnote_data_canon_get_tags (ExifMnoteDataCanon *dc, unsigned int n, unsigned int *m, unsigned int *s)
 
static char * exif_mnote_data_canon_get_value (ExifMnoteData *note, unsigned int n, char *val, unsigned int maxlen)
 
static void exif_mnote_data_canon_set_byte_order (ExifMnoteData *d, ExifByteOrder o)
 
static void exif_mnote_data_canon_set_offset (ExifMnoteData *n, unsigned int o)
 
static void exif_mnote_data_canon_save (ExifMnoteData *ne, unsigned char **buf, unsigned int *buf_size)
 
static void exif_mnote_data_canon_load (ExifMnoteData *ne, const unsigned char *buf, unsigned int buf_size)
 
static unsigned int exif_mnote_data_canon_count (ExifMnoteData *n)
 
static unsigned int exif_mnote_data_canon_get_id (ExifMnoteData *d, unsigned int i)
 
static const char * exif_mnote_data_canon_get_name (ExifMnoteData *note, unsigned int i)
 
static const char * exif_mnote_data_canon_get_title (ExifMnoteData *note, unsigned int i)
 
static const char * exif_mnote_data_canon_get_description (ExifMnoteData *note, unsigned int i)
 
int exif_mnote_data_canon_identify (const ExifData *ed, const ExifEntry *e)
 Detect if MakerNote is recognized as one handled by the Canon module. More...
 
ExifMnoteDataexif_mnote_data_canon_new (ExifMem *mem, ExifDataOption o)
 

Macro Definition Documentation

◆ CHECKOVERFLOW

#define CHECKOVERFLOW (   offset,
  datasize,
  structsize 
)    (( offset >= datasize) || (structsize > datasize) || (offset > datasize - structsize ))

Definition at line 33 of file exif-mnote-data-canon.c.

◆ FAILSAFE_SIZE_MAX

#define FAILSAFE_SIZE_MAX   1000000L

Definition at line 36 of file exif-mnote-data-canon.c.

Function Documentation

◆ exif_mnote_data_canon_clear()

static void exif_mnote_data_canon_clear ( ExifMnoteDataCanon n)
static

Definition at line 39 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _MnoteCanonEntry::data, _ExifMnoteDataCanon::entries, exif_mem_free(), and _ExifMnoteData::mem.

Referenced by exif_mnote_data_canon_free(), and exif_mnote_data_canon_load().

Here is the call graph for this function:

◆ exif_mnote_data_canon_count()

static unsigned int exif_mnote_data_canon_count ( ExifMnoteData n)
static

Definition at line 334 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, and mnote_canon_entry_count_values().

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_free()

static void exif_mnote_data_canon_free ( ExifMnoteData n)
static

Definition at line 59 of file exif-mnote-data-canon.c.

References exif_mnote_data_canon_clear().

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_get_description()

static const char* exif_mnote_data_canon_get_description ( ExifMnoteData note,
unsigned int  i 
)
static

Definition at line 381 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, exif_mnote_data_canon_get_tags(), mnote_canon_tag_get_description(), and _MnoteCanonEntry::tag.

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_get_id()

static unsigned int exif_mnote_data_canon_get_id ( ExifMnoteData d,
unsigned int  i 
)
static

Definition at line 345 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, exif_mnote_data_canon_get_tags(), and _MnoteCanonEntry::tag.

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_get_name()

static const char* exif_mnote_data_canon_get_name ( ExifMnoteData note,
unsigned int  i 
)
static

Definition at line 357 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, exif_mnote_data_canon_get_tags(), mnote_canon_tag_get_name_sub(), _ExifMnoteDataCanon::options, and _MnoteCanonEntry::tag.

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_get_tags()

static void exif_mnote_data_canon_get_tags ( ExifMnoteDataCanon dc,
unsigned int  n,
unsigned int *  m,
unsigned int *  s 
)
static

Definition at line 67 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, and mnote_canon_entry_count_values().

Referenced by exif_mnote_data_canon_get_description(), exif_mnote_data_canon_get_id(), exif_mnote_data_canon_get_name(), exif_mnote_data_canon_get_title(), and exif_mnote_data_canon_get_value().

Here is the call graph for this function:

◆ exif_mnote_data_canon_get_title()

static const char* exif_mnote_data_canon_get_title ( ExifMnoteData note,
unsigned int  i 
)
static

Definition at line 369 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, exif_mnote_data_canon_get_tags(), mnote_canon_tag_get_title_sub(), _ExifMnoteDataCanon::options, and _MnoteCanonEntry::tag.

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_get_value()

static char* exif_mnote_data_canon_get_value ( ExifMnoteData note,
unsigned int  n,
char *  val,
unsigned int  maxlen 
)
static

Definition at line 84 of file exif-mnote-data-canon.c.

References _ExifMnoteDataCanon::count, _ExifMnoteDataCanon::entries, exif_mnote_data_canon_get_tags(), and mnote_canon_entry_get_value().

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_identify()

int exif_mnote_data_canon_identify ( const ExifData ed,
const ExifEntry e 
)

Detect if MakerNote is recognized as one handled by the Canon module.

Parameters
[in]edimage ExifData to identify as as a Canon type
[in]eExifEntry for EXIF_TAG_MAKER_NOTE, from within ed but duplicated here for convenience
Returns
0 if not recognized, nonzero if recognized. The specific nonzero value returned may identify a subtype unique within this module.

Definition at line 393 of file exif-mnote-data-canon.c.

References exif_data_get_entry, exif_entry_get_value(), and EXIF_TAG_MAKE.

Referenced by interpret_maker_note().

Here is the call graph for this function:

◆ exif_mnote_data_canon_load()

◆ exif_mnote_data_canon_new()

◆ exif_mnote_data_canon_save()

static void exif_mnote_data_canon_save ( ExifMnoteData ne,
unsigned char **  buf,
unsigned int *  buf_size 
)
static

◆ exif_mnote_data_canon_set_byte_order()

static void exif_mnote_data_canon_set_byte_order ( ExifMnoteData d,
ExifByteOrder  o 
)
static

Definition at line 96 of file exif-mnote-data-canon.c.

References _MnoteCanonEntry::components, _ExifMnoteDataCanon::count, _MnoteCanonEntry::data, _ExifMnoteDataCanon::entries, exif_array_set_byte_order(), exif_format_get_size(), _MnoteCanonEntry::format, _ExifMnoteDataCanon::order, _MnoteCanonEntry::order, and _MnoteCanonEntry::size.

Referenced by exif_mnote_data_canon_new().

Here is the call graph for this function:

◆ exif_mnote_data_canon_set_offset()

static void exif_mnote_data_canon_set_offset ( ExifMnoteData n,
unsigned int  o 
)
static

Definition at line 116 of file exif-mnote-data-canon.c.

Referenced by exif_mnote_data_canon_new().


libexif Generated by doxygen