Applied patch from Phil for hardcoded language fixes
This commit is contained in:
2
winclude/libiptcdata/_stdint.h
Executable file
2
winclude/libiptcdata/_stdint.h
Executable file
@@ -0,0 +1,2 @@
|
||||
/* This file is generated automatically by configure */
|
||||
#include <stdint.h>
|
106
winclude/libiptcdata/iptc-data.h
Executable file
106
winclude/libiptcdata/iptc-data.h
Executable file
@@ -0,0 +1,106 @@
|
||||
/* iptc-data.h
|
||||
*
|
||||
* Copyright <20> 2005 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_DATA_H__
|
||||
#define __IPTC_DATA_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef struct _IptcData IptcData;
|
||||
typedef struct _IptcDataPrivate IptcDataPrivate;
|
||||
|
||||
#include <libiptcdata/iptc-tag.h>
|
||||
#include <libiptcdata/iptc-dataset.h>
|
||||
#include <libiptcdata/iptc-mem.h>
|
||||
#include <libiptcdata/iptc-log.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef enum {
|
||||
IPTC_ENCODING_UNKNOWN = 0,
|
||||
IPTC_ENCODING_UNSPECIFIED = 1,
|
||||
IPTC_ENCODING_UTF8 = 2
|
||||
} IptcEncoding;
|
||||
|
||||
/* The version of the spec implemented by this library */
|
||||
#define IPTC_IIM_VERSION 4
|
||||
|
||||
struct _IptcData
|
||||
{
|
||||
IptcDataSet **datasets;
|
||||
unsigned int count;
|
||||
|
||||
IptcDataPrivate *priv;
|
||||
};
|
||||
|
||||
/* Lifecycle */
|
||||
IptcData *iptc_data_new (void);
|
||||
IptcData *iptc_data_new_mem (IptcMem *mem);
|
||||
IptcData *iptc_data_new_from_jpeg (const char *path);
|
||||
IptcData *iptc_data_new_from_jpeg_file (FILE* infile);
|
||||
IptcData *iptc_data_new_from_data (const unsigned char *buf,
|
||||
unsigned int size);
|
||||
void iptc_data_ref (IptcData *data);
|
||||
void iptc_data_unref (IptcData *data);
|
||||
void iptc_data_free (IptcData *data);
|
||||
|
||||
int iptc_data_load (IptcData *data, const unsigned char *buf,
|
||||
unsigned int size);
|
||||
int iptc_data_save (IptcData *data, unsigned char **buf,
|
||||
unsigned int *size);
|
||||
void iptc_data_free_buf (IptcData *data, unsigned char *buf);
|
||||
|
||||
int iptc_data_add_dataset (IptcData *data, IptcDataSet *ds);
|
||||
int iptc_data_add_dataset_before (IptcData *data, IptcDataSet *ds,
|
||||
IptcDataSet *newds);
|
||||
int iptc_data_add_dataset_after (IptcData *data, IptcDataSet *ds,
|
||||
IptcDataSet *newds);
|
||||
int iptc_data_remove_dataset (IptcData *data, IptcDataSet *ds);
|
||||
IptcDataSet *iptc_data_get_dataset (IptcData *data, IptcRecord record,
|
||||
IptcTag tag);
|
||||
IptcDataSet *iptc_data_get_next_dataset (IptcData *data, IptcDataSet *ds,
|
||||
IptcRecord record, IptcTag tag);
|
||||
|
||||
typedef void (* IptcDataForeachDataSetFunc) (IptcDataSet *dataset,
|
||||
void *user_data);
|
||||
void iptc_data_foreach_dataset (IptcData *data,
|
||||
IptcDataForeachDataSetFunc func,
|
||||
void *user_data);
|
||||
void iptc_data_sort (IptcData *data);
|
||||
IptcEncoding iptc_data_get_encoding (IptcData *data);
|
||||
int iptc_data_set_encoding_utf8 (IptcData *data);
|
||||
|
||||
int iptc_data_set_version (IptcData *data, unsigned int version);
|
||||
|
||||
int iptc_data_add_dataset_with_value (IptcData *data, IptcRecord record,
|
||||
IptcTag tag, unsigned int value, IptcValidate validate);
|
||||
int iptc_data_add_dataset_with_contents (IptcData *data, IptcRecord record,
|
||||
IptcTag tag, const unsigned char * buf,
|
||||
unsigned int size, IptcValidate validate);
|
||||
|
||||
void iptc_data_dump (IptcData *data, unsigned int indent);
|
||||
void iptc_data_log (IptcData *data, IptcLog *log);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_DATA_H__ */
|
92
winclude/libiptcdata/iptc-dataset.h
Executable file
92
winclude/libiptcdata/iptc-dataset.h
Executable file
@@ -0,0 +1,92 @@
|
||||
/* iptc-dataset.h
|
||||
*
|
||||
* Copyright <20> 2005 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_DATASET_H__
|
||||
#define __IPTC_DATASET_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
typedef struct _IptcDataSet IptcDataSet;
|
||||
typedef struct _IptcDataSetPrivate IptcDataSetPrivate;
|
||||
|
||||
typedef enum {
|
||||
IPTC_DONT_VALIDATE = 0,
|
||||
IPTC_VALIDATE = 1
|
||||
} IptcValidate;
|
||||
|
||||
#include <libiptcdata/iptc-data.h>
|
||||
#include <libiptcdata/iptc-mem.h>
|
||||
|
||||
struct _IptcDataSet {
|
||||
IptcRecord record;
|
||||
IptcTag tag;
|
||||
const IptcTagInfo * info;
|
||||
|
||||
unsigned char *data;
|
||||
unsigned int size;
|
||||
|
||||
/* Data containing this dataset */
|
||||
IptcData *parent;
|
||||
|
||||
IptcDataSetPrivate *priv;
|
||||
};
|
||||
|
||||
|
||||
/* Lifecycle */
|
||||
IptcDataSet *iptc_dataset_new (void);
|
||||
IptcDataSet *iptc_dataset_new_mem (IptcMem * mem);
|
||||
IptcDataSet *iptc_dataset_copy (IptcDataSet *dataset);
|
||||
void iptc_dataset_ref (IptcDataSet *dataset);
|
||||
void iptc_dataset_unref (IptcDataSet *dataset);
|
||||
void iptc_dataset_free (IptcDataSet *dataset);
|
||||
|
||||
void iptc_dataset_set_tag (IptcDataSet *dataset, IptcRecord record, IptcTag tag);
|
||||
IptcFormat iptc_dataset_get_format (IptcDataSet *dataset);
|
||||
|
||||
int iptc_dataset_get_data (IptcDataSet *dataset, unsigned char * buf,
|
||||
unsigned int size);
|
||||
unsigned int iptc_dataset_get_value (IptcDataSet *dataset);
|
||||
int iptc_dataset_get_date (IptcDataSet *dataset, int *year, int *month, int *day);
|
||||
int iptc_dataset_get_time (IptcDataSet *dataset, int *hour, int *min, int *sec,
|
||||
int *tz);
|
||||
|
||||
int iptc_dataset_set_data (IptcDataSet *dataset, const unsigned char * buf,
|
||||
unsigned int size, IptcValidate validate);
|
||||
int iptc_dataset_set_value (IptcDataSet *dataset, unsigned int value,
|
||||
IptcValidate validate);
|
||||
int iptc_dataset_set_date (IptcDataSet *dataset, int year, int month, int day,
|
||||
IptcValidate validate);
|
||||
int iptc_dataset_set_time (IptcDataSet *dataset, int hour, int min, int sec,
|
||||
int tz, IptcValidate validate);
|
||||
|
||||
|
||||
/* For your convenience */
|
||||
const char *iptc_dataset_get_as_str (IptcDataSet *dataset, char *buf,
|
||||
unsigned int size);
|
||||
|
||||
void iptc_dataset_dump (IptcDataSet *dataset, unsigned int indent);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_DATASET_H__ */
|
45
winclude/libiptcdata/iptc-jpeg.h
Executable file
45
winclude/libiptcdata/iptc-jpeg.h
Executable file
@@ -0,0 +1,45 @@
|
||||
/* iptc-jpeg.h
|
||||
*
|
||||
* Copyright <20> 2005 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_JPEG_H__
|
||||
#define __IPTC_JPEG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libiptcdata/iptc-data.h>
|
||||
|
||||
int iptc_jpeg_read_ps3 (FILE * infile, unsigned char * buf, unsigned int size);
|
||||
int iptc_jpeg_ps3_find_iptc (const unsigned char * ps3,
|
||||
unsigned int ps3_size, unsigned int * iptc_len);
|
||||
|
||||
int iptc_jpeg_ps3_save_iptc (const unsigned char * ps3, unsigned int ps3_size,
|
||||
const unsigned char * iptc, unsigned int iptc_size,
|
||||
unsigned char * buf, unsigned int size);
|
||||
int iptc_jpeg_save_with_ps3 (FILE * infile, FILE * outfile,
|
||||
const unsigned char * ps3, unsigned int ps3_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_JPEG_H__ */
|
70
winclude/libiptcdata/iptc-log.h
Executable file
70
winclude/libiptcdata/iptc-log.h
Executable file
@@ -0,0 +1,70 @@
|
||||
/* iptc-log.h
|
||||
*
|
||||
* Copyright <20> 2005 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_LOG_H__
|
||||
#define __IPTC_LOG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libiptcdata/iptc-mem.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
typedef struct _IptcLog IptcLog;
|
||||
|
||||
IptcLog *iptc_log_new (void);
|
||||
IptcLog *iptc_log_new_mem (IptcMem *);
|
||||
void iptc_log_ref (IptcLog *log);
|
||||
void iptc_log_unref (IptcLog *log);
|
||||
void iptc_log_free (IptcLog *log);
|
||||
|
||||
typedef enum {
|
||||
IPTC_LOG_CODE_NONE,
|
||||
IPTC_LOG_CODE_DEBUG,
|
||||
IPTC_LOG_CODE_NO_MEMORY,
|
||||
IPTC_LOG_CODE_CORRUPT_DATA
|
||||
} IptcLogCode;
|
||||
const char *iptc_log_code_get_title (IptcLogCode); /* Title for dialog */
|
||||
const char *iptc_log_code_get_message (IptcLogCode); /* Message for dialog */
|
||||
|
||||
typedef void (* IptcLogFunc) (IptcLog *log, IptcLogCode, const char *domain,
|
||||
const char *format, va_list args, void *data);
|
||||
|
||||
void iptc_log_set_func (IptcLog *log, IptcLogFunc func, void *data);
|
||||
|
||||
void iptc_log (IptcLog *log, IptcLogCode, const char *domain,
|
||||
const char *format, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__format__(printf,4,5)))
|
||||
#endif
|
||||
;
|
||||
|
||||
void iptc_logv (IptcLog *log, IptcLogCode, const char *domain,
|
||||
const char *format, va_list args);
|
||||
|
||||
/* For your convenience */
|
||||
#define IPTC_LOG_NO_MEMORY(l,d,s) iptc_log (l, IPTC_LOG_CODE_NO_MEMORY, d, "Could not allocate %i byte(s).", s)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_LOG_H__ */
|
54
winclude/libiptcdata/iptc-mem.h
Executable file
54
winclude/libiptcdata/iptc-mem.h
Executable file
@@ -0,0 +1,54 @@
|
||||
/* iptc-mem.h
|
||||
*
|
||||
* Copyright <20> 2005 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_MEM_H__
|
||||
#define __IPTC_MEM_H__
|
||||
|
||||
#include <libiptcdata/iptc-utils.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Should work like calloc: Needs to return initialized memory. */
|
||||
typedef void * (* IptcMemAllocFunc) (IptcLong);
|
||||
|
||||
typedef void * (* IptcMemReallocFunc) (void *, IptcLong);
|
||||
typedef void (* IptcMemFreeFunc) (void *);
|
||||
|
||||
typedef struct _IptcMem IptcMem;
|
||||
|
||||
IptcMem *iptc_mem_new (IptcMemAllocFunc, IptcMemReallocFunc,
|
||||
IptcMemFreeFunc);
|
||||
void iptc_mem_ref (IptcMem *);
|
||||
void iptc_mem_unref (IptcMem *);
|
||||
|
||||
void *iptc_mem_alloc (IptcMem *, IptcLong);
|
||||
void *iptc_mem_realloc (IptcMem *, void *, IptcLong);
|
||||
void iptc_mem_free (IptcMem *, void *);
|
||||
|
||||
/* For your convenience */
|
||||
IptcMem *iptc_mem_new_default (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_MEM_H__ */
|
171
winclude/libiptcdata/iptc-tag.h
Executable file
171
winclude/libiptcdata/iptc-tag.h
Executable file
@@ -0,0 +1,171 @@
|
||||
/* iptc-tag.h
|
||||
*
|
||||
* Copyright <20> 2001 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_TAG_H__
|
||||
#define __IPTC_TAG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
typedef enum {
|
||||
IPTC_RECORD_OBJECT_ENV = 1,
|
||||
IPTC_RECORD_APP_2 = 2,
|
||||
IPTC_RECORD_APP_3 = 3,
|
||||
IPTC_RECORD_APP_4 = 4,
|
||||
IPTC_RECORD_APP_5 = 5,
|
||||
IPTC_RECORD_APP_6 = 6,
|
||||
IPTC_RECORD_PREOBJ_DATA = 7,
|
||||
IPTC_RECORD_OBJ_DATA = 8,
|
||||
IPTC_RECORD_POSTOBJ_DATA = 9
|
||||
} IptcRecord;
|
||||
|
||||
typedef enum {
|
||||
IPTC_TAG_MODEL_VERSION = 0, /* Begin record 1 tags */
|
||||
IPTC_TAG_DESTINATION = 5,
|
||||
IPTC_TAG_FILE_FORMAT = 20,
|
||||
IPTC_TAG_FILE_VERSION = 22,
|
||||
IPTC_TAG_SERVICE_ID = 30,
|
||||
IPTC_TAG_ENVELOPE_NUM = 40,
|
||||
IPTC_TAG_PRODUCT_ID = 50,
|
||||
IPTC_TAG_ENVELOPE_PRIORITY = 60,
|
||||
IPTC_TAG_DATE_SENT = 70,
|
||||
IPTC_TAG_TIME_SENT = 80,
|
||||
IPTC_TAG_CHARACTER_SET = 90,
|
||||
IPTC_TAG_UNO = 100,
|
||||
IPTC_TAG_ARM_ID = 120,
|
||||
IPTC_TAG_ARM_VERSION = 122, /* End record 1 tags */
|
||||
IPTC_TAG_RECORD_VERSION = 0, /* Begin record 2 tags */
|
||||
IPTC_TAG_OBJECT_TYPE = 3,
|
||||
IPTC_TAG_OBJECT_ATTRIBUTE = 4,
|
||||
IPTC_TAG_OBJECT_NAME = 5,
|
||||
IPTC_TAG_EDIT_STATUS = 7,
|
||||
IPTC_TAG_EDITORIAL_UPDATE = 8,
|
||||
IPTC_TAG_URGENCY = 10,
|
||||
IPTC_TAG_SUBJECT_REFERENCE = 12,
|
||||
IPTC_TAG_CATEGORY = 15,
|
||||
IPTC_TAG_SUPPL_CATEGORY = 20,
|
||||
IPTC_TAG_FIXTURE_ID = 22,
|
||||
IPTC_TAG_KEYWORDS = 25,
|
||||
IPTC_TAG_CONTENT_LOC_CODE = 26,
|
||||
IPTC_TAG_CONTENT_LOC_NAME = 27,
|
||||
IPTC_TAG_RELEASE_DATE = 30,
|
||||
IPTC_TAG_RELEASE_TIME = 35,
|
||||
IPTC_TAG_EXPIRATION_DATE = 37,
|
||||
IPTC_TAG_EXPIRATION_TIME = 38,
|
||||
IPTC_TAG_SPECIAL_INSTRUCTIONS = 40,
|
||||
IPTC_TAG_ACTION_ADVISED = 42,
|
||||
IPTC_TAG_REFERENCE_SERVICE = 45,
|
||||
IPTC_TAG_REFERENCE_DATE = 47,
|
||||
IPTC_TAG_REFERENCE_NUMBER = 50,
|
||||
IPTC_TAG_DATE_CREATED = 55,
|
||||
IPTC_TAG_TIME_CREATED = 60,
|
||||
IPTC_TAG_DIGITAL_CREATION_DATE = 62,
|
||||
IPTC_TAG_DIGITAL_CREATION_TIME = 63,
|
||||
IPTC_TAG_ORIGINATING_PROGRAM = 65,
|
||||
IPTC_TAG_PROGRAM_VERSION = 70,
|
||||
IPTC_TAG_OBJECT_CYCLE = 75,
|
||||
IPTC_TAG_BYLINE = 80,
|
||||
IPTC_TAG_BYLINE_TITLE = 85,
|
||||
IPTC_TAG_CITY = 90,
|
||||
IPTC_TAG_SUBLOCATION = 92,
|
||||
IPTC_TAG_STATE = 95,
|
||||
IPTC_TAG_COUNTRY_CODE = 100,
|
||||
IPTC_TAG_COUNTRY_NAME = 101,
|
||||
IPTC_TAG_ORIG_TRANS_REF = 103,
|
||||
IPTC_TAG_HEADLINE = 105,
|
||||
IPTC_TAG_CREDIT = 110,
|
||||
IPTC_TAG_SOURCE = 115,
|
||||
IPTC_TAG_COPYRIGHT_NOTICE = 116,
|
||||
IPTC_TAG_PICASA_UNKNOWN = 117,
|
||||
IPTC_TAG_CONTACT = 118,
|
||||
IPTC_TAG_CAPTION = 120,
|
||||
IPTC_TAG_WRITER_EDITOR = 122,
|
||||
IPTC_TAG_RASTERIZED_CAPTION = 125,
|
||||
IPTC_TAG_IMAGE_TYPE = 130,
|
||||
IPTC_TAG_IMAGE_ORIENTATION = 131,
|
||||
IPTC_TAG_LANGUAGE_ID = 135,
|
||||
IPTC_TAG_AUDIO_TYPE = 150,
|
||||
IPTC_TAG_AUDIO_SAMPLING_RATE = 151,
|
||||
IPTC_TAG_AUDIO_SAMPLING_RES = 152,
|
||||
IPTC_TAG_AUDIO_DURATION = 153,
|
||||
IPTC_TAG_AUDIO_OUTCUE = 154,
|
||||
IPTC_TAG_PREVIEW_FORMAT = 200,
|
||||
IPTC_TAG_PREVIEW_FORMAT_VER = 201,
|
||||
IPTC_TAG_PREVIEW_DATA = 202, /* End record 2 tags */
|
||||
IPTC_TAG_SIZE_MODE = 10, /* Begin record 7 tags */
|
||||
IPTC_TAG_MAX_SUBFILE_SIZE = 20,
|
||||
IPTC_TAG_SIZE_ANNOUNCED = 90,
|
||||
IPTC_TAG_MAX_OBJECT_SIZE = 95, /* End record 7 tags */
|
||||
IPTC_TAG_SUBFILE = 10, /* Record 8 tags */
|
||||
IPTC_TAG_CONFIRMED_DATA_SIZE = 10 /* Record 9 tags */
|
||||
} IptcTag;
|
||||
|
||||
typedef enum {
|
||||
IPTC_OPTIONAL = 0,
|
||||
IPTC_MANDATORY = 1
|
||||
} IptcMandatory;
|
||||
|
||||
typedef enum {
|
||||
IPTC_NOT_REPEATABLE = 0,
|
||||
IPTC_REPEATABLE = 1
|
||||
} IptcRepeatable;
|
||||
|
||||
typedef enum {
|
||||
IPTC_FORMAT_UNKNOWN,
|
||||
IPTC_FORMAT_BINARY,
|
||||
IPTC_FORMAT_BYTE,
|
||||
IPTC_FORMAT_SHORT,
|
||||
IPTC_FORMAT_LONG,
|
||||
IPTC_FORMAT_STRING,
|
||||
IPTC_FORMAT_NUMERIC_STRING,
|
||||
IPTC_FORMAT_DATE,
|
||||
IPTC_FORMAT_TIME
|
||||
} IptcFormat;
|
||||
|
||||
typedef struct _IptcTagInfo IptcTagInfo;
|
||||
|
||||
struct _IptcTagInfo {
|
||||
IptcRecord record;
|
||||
IptcTag tag;
|
||||
const char *name;
|
||||
const char *title;
|
||||
const char *description;
|
||||
IptcFormat format;
|
||||
IptcMandatory mandatory;
|
||||
IptcRepeatable repeatable;
|
||||
unsigned int minbytes;
|
||||
unsigned int maxbytes;
|
||||
};
|
||||
|
||||
const char *iptc_tag_get_name (IptcRecord record, IptcTag tag);
|
||||
char *iptc_tag_get_title (IptcRecord record, IptcTag tag);
|
||||
char *iptc_tag_get_description (IptcRecord record, IptcTag tag);
|
||||
const IptcTagInfo *iptc_tag_get_info (IptcRecord record, IptcTag tag);
|
||||
char *iptc_format_get_name (IptcFormat format);
|
||||
|
||||
int iptc_tag_find_by_name (const char * name, IptcRecord * record, IptcTag * tag);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_TAG_H__ */
|
66
winclude/libiptcdata/iptc-utils.h
Executable file
66
winclude/libiptcdata/iptc-utils.h
Executable file
@@ -0,0 +1,66 @@
|
||||
/* iptc-utils.h
|
||||
*
|
||||
* Copyright <20> 2005 David Moore <dcm@acm.org>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __IPTC_UTILS_H__
|
||||
#define __IPTC_UTILS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libiptcdata/_stdint.h>
|
||||
|
||||
typedef enum {
|
||||
IPTC_BYTE_ORDER_MOTOROLA,
|
||||
IPTC_BYTE_ORDER_INTEL
|
||||
} IptcByteOrder;
|
||||
|
||||
|
||||
/* If these definitions don't work for you, please let us fix the
|
||||
* macro generating _stdint.h */
|
||||
|
||||
typedef char IptcByte; /* 1 byte */
|
||||
typedef uint16_t IptcShort; /* 2 bytes */
|
||||
typedef uint32_t IptcLong; /* 4 bytes */
|
||||
typedef int32_t IptcSLong; /* 4 bytes */
|
||||
|
||||
|
||||
IptcShort iptc_get_short (const unsigned char *b, IptcByteOrder order);
|
||||
IptcLong iptc_get_long (const unsigned char *b, IptcByteOrder order);
|
||||
IptcSLong iptc_get_slong (const unsigned char *b, IptcByteOrder order);
|
||||
|
||||
void iptc_set_short (unsigned char *b, IptcByteOrder order,
|
||||
IptcShort value);
|
||||
void iptc_set_long (unsigned char *b, IptcByteOrder order,
|
||||
IptcLong value);
|
||||
void iptc_set_slong (unsigned char *b, IptcByteOrder order,
|
||||
IptcSLong value);
|
||||
|
||||
#undef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/* For compatibility with older versions */
|
||||
#define IPTC_TAG_SUBSEC_TIME IPTC_TAG_SUB_SEC_TIME
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __IPTC_UTILS_H__ */
|
Reference in New Issue
Block a user