test-parse.c File Reference

Completely parse all files given on the command line. More...

#include "libexif/exif-data.h"
#include "libexif/exif-system.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Typedefs

typedef void(* test_parse_func )(const char *filename, void *callback_data)

Functions

void content_foreach_func (ExifEntry *entry, void *callback_data)
void content_foreach_func (ExifEntry *entry, void *UNUSED(callback_data))
void data_foreach_func (ExifContent *content, void *callback_data)
void test_parse (const char *filename, void *callback_data)
void split_ws_string (const char *string, test_parse_func func, void *callback_data)
int main (const int argc, const char *argv[])


Detailed Description

Completely parse all files given on the command line.

Copyright (C) 2007 Hans Ulrich Niedermann <gp@n-dimensional.de>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file test-parse.c.


Typedef Documentation

typedef void(* test_parse_func)(const char *filename, void *callback_data)

Callback function prototype for string parsing.

Definition at line 72 of file test-parse.c.


Function Documentation

void content_foreach_func ( ExifEntry entry,
void *  UNUSED(callback_data) 
)

Definition at line 33 of file test-parse.c.

References _ExifEntry::components, exif_entry_get_value(), exif_format_get_name(), exif_tag_get_name(), _ExifEntry::format, _ExifEntry::size, and _ExifEntry::tag.

void content_foreach_func ( ExifEntry entry,
void *  callback_data 
)

Callback function handling an ExifEntry.

Referenced by data_foreach_func().

void data_foreach_func ( ExifContent content,
void *  callback_data 
)

Callback function handling an ExifContent (corresponds 1:1 to an IFD).

Definition at line 51 of file test-parse.c.

References content_foreach_func(), exif_content_foreach_entry(), and exif_content_get_ifd().

Referenced by test_parse().

int main ( const int  argc,
const char *  argv[] 
)

Main program.

Definition at line 107 of file test-parse.c.

References split_ws_string(), and test_parse().

void split_ws_string ( const char *  string,
test_parse_func  func,
void *  callback_data 
)

Split string at whitespace and call callback with each substring.

Definition at line 77 of file test-parse.c.

Referenced by main().

void test_parse ( const char *  filename,
void *  callback_data 
)

Run EXIF parsing test on the given file.

Definition at line 60 of file test-parse.c.

References data_foreach_func(), exif_data_foreach_content(), exif_data_new_from_file(), and exif_data_unref().

Referenced by main().


SourceForge.net Logo Generated by doxygen