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

Go to the source code of this file.

Macros

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

Functions

static enum OlympusVersion exif_mnote_data_olympus_identify_variant (const unsigned char *buf, unsigned int buf_size)
 
static void exif_mnote_data_olympus_clear (ExifMnoteDataOlympus *n)
 
static void exif_mnote_data_olympus_free (ExifMnoteData *n)
 
static char * exif_mnote_data_olympus_get_value (ExifMnoteData *d, unsigned int i, char *val, unsigned int maxlen)
 
static void exif_mnote_data_olympus_save (ExifMnoteData *ne, unsigned char **buf, unsigned int *buf_size)
 save the MnoteData from ne to buf More...
 
static void exif_mnote_data_olympus_load (ExifMnoteData *en, const unsigned char *buf, unsigned int buf_size)
 
static unsigned int exif_mnote_data_olympus_count (ExifMnoteData *n)
 
static unsigned int exif_mnote_data_olympus_get_id (ExifMnoteData *d, unsigned int n)
 
static const char * exif_mnote_data_olympus_get_name (ExifMnoteData *d, unsigned int i)
 
static const char * exif_mnote_data_olympus_get_title (ExifMnoteData *d, unsigned int i)
 
static const char * exif_mnote_data_olympus_get_description (ExifMnoteData *d, unsigned int i)
 
static void exif_mnote_data_olympus_set_byte_order (ExifMnoteData *d, ExifByteOrder o)
 
static void exif_mnote_data_olympus_set_offset (ExifMnoteData *n, unsigned int o)
 
int exif_mnote_data_olympus_identify (const ExifData *ed, const ExifEntry *e)
 Detect if MakerNote is recognized as one handled by the Olympus module. More...
 
ExifMnoteDataexif_mnote_data_olympus_new (ExifMem *mem)
 

Macro Definition Documentation

◆ CHECKOVERFLOW

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

Definition at line 38 of file exif-mnote-data-olympus.c.

Function Documentation

◆ exif_mnote_data_olympus_clear()

static void exif_mnote_data_olympus_clear ( ExifMnoteDataOlympus n)
static

Definition at line 46 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _MnoteOlympusEntry::data, _ExifMnoteDataOlympus::entries, exif_mem_free(), and _ExifMnoteData::mem.

Referenced by exif_mnote_data_olympus_free(), and exif_mnote_data_olympus_load().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_count()

static unsigned int exif_mnote_data_olympus_count ( ExifMnoteData n)
static

Definition at line 517 of file exif-mnote-data-olympus.c.

Referenced by exif_mnote_data_olympus_new().

◆ exif_mnote_data_olympus_free()

static void exif_mnote_data_olympus_free ( ExifMnoteData n)
static

Definition at line 66 of file exif-mnote-data-olympus.c.

References exif_mnote_data_olympus_clear().

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_get_description()

static const char* exif_mnote_data_olympus_get_description ( ExifMnoteData d,
unsigned int  i 
)
static

Definition at line 553 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, mnote_olympus_tag_get_description(), and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_get_id()

static unsigned int exif_mnote_data_olympus_get_id ( ExifMnoteData d,
unsigned int  n 
)
static

◆ exif_mnote_data_olympus_get_name()

static const char* exif_mnote_data_olympus_get_name ( ExifMnoteData d,
unsigned int  i 
)
static

Definition at line 533 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, mnote_olympus_tag_get_name(), and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_get_title()

static const char* exif_mnote_data_olympus_get_title ( ExifMnoteData d,
unsigned int  i 
)
static

Definition at line 543 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, mnote_olympus_tag_get_title(), and _MnoteOlympusEntry::tag.

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_get_value()

static char* exif_mnote_data_olympus_get_value ( ExifMnoteData d,
unsigned int  i,
char *  val,
unsigned int  maxlen 
)
static

Definition at line 74 of file exif-mnote-data-olympus.c.

References _ExifMnoteDataOlympus::count, _ExifMnoteDataOlympus::entries, and mnote_olympus_entry_get_value().

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_identify()

int exif_mnote_data_olympus_identify ( const ExifData ed,
const ExifEntry e 
)

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

Parameters
[in]edimage ExifData to identify as as an Olympus 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 621 of file exif-mnote-data-olympus.c.

References _ExifEntry::data, exif_data_get_entry, exif_entry_get_value(), exif_mnote_data_olympus_identify_variant(), EXIF_TAG_MAKE, nikonV0, _ExifEntry::size, and unrecognized.

Referenced by interpret_maker_note().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_identify_variant()

static enum OlympusVersion exif_mnote_data_olympus_identify_variant ( const unsigned char *  buf,
unsigned int  buf_size 
)
static

◆ exif_mnote_data_olympus_load()

◆ exif_mnote_data_olympus_new()

◆ exif_mnote_data_olympus_save()

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

save the MnoteData from ne to buf

Parameters
neextract the data from this structure
*bufwrite the mnoteData to this buffer (buffer will be allocated)
buf_sizethe size of the buffer

Definition at line 99 of file exif-mnote-data-olympus.c.

References _MnoteOlympusEntry::components, _ExifMnoteDataOlympus::count, _MnoteOlympusEntry::data, _ExifMnoteDataOlympus::entries, epsonV1, EXIF_BYTE_ORDER_INTEL, exif_format_get_size(), EXIF_LOG_NO_MEMORY, exif_mem_alloc(), exif_mem_realloc(), exif_set_long(), exif_set_short(), _MnoteOlympusEntry::format, _ExifMnoteData::log, _ExifMnoteData::mem, MNOTE_NIKON1_TAG_BASE, nikonV0, nikonV1, nikonV2, _ExifMnoteDataOlympus::offset, olympusV1, olympusV2, _ExifMnoteDataOlympus::order, sanyoV1, _MnoteOlympusEntry::tag, and _ExifMnoteDataOlympus::version.

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_set_byte_order()

static void exif_mnote_data_olympus_set_byte_order ( ExifMnoteData d,
ExifByteOrder  o 
)
static

Definition at line 563 of file exif-mnote-data-olympus.c.

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

Referenced by exif_mnote_data_olympus_new().

Here is the call graph for this function:

◆ exif_mnote_data_olympus_set_offset()

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

Definition at line 583 of file exif-mnote-data-olympus.c.

Referenced by exif_mnote_data_olympus_new().


libexif Generated by doxygen