Blame xmpsdk/include/XMP_Const.h

Packit Service 21b5d1
#ifndef __XMP_Const_h__
Packit Service 21b5d1
#define __XMP_Const_h__ 1
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Copyright 2002-2008 Adobe Systems Incorporated
Packit Service 21b5d1
// All Rights Reserved.
Packit Service 21b5d1
//
Packit Service 21b5d1
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
Packit Service 21b5d1
// of the Adobe license agreement accompanying it.
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
#include "XMP_Environment.h"
Packit Service 21b5d1
Packit Service 21b5d1
   #include <stddef.h>
Packit Service 21b5d1
Packit Service 21b5d1
#if XMP_MacBuild	// ! No stdint.h on Windows and some UNIXes.
Packit Service 21b5d1
    #include <stdint.h>
Packit Service 21b5d1
#endif
Packit Service 21b5d1
Packit Service 21b5d1
#if __cplusplus
Packit Service 21b5d1
extern "C" {
Packit Service 21b5d1
#endif
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
/// \file XMP_Const.h
Packit Service 21b5d1
/// \brief Common C/C++ types and constants for the XMP toolkit.
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Basic types and constants
Packit Service 21b5d1
// =========================
Packit Service 21b5d1
Packit Service 21b5d1
// The XMP_... types are used on the off chance that the ..._t types present a problem. In that
Packit Service 21b5d1
// case only the declarations of the XMP_... types needs to change, not all of the uses. These
Packit Service 21b5d1
// types are used where fixed sizes are required in order to have a known ABI for a DLL build.
Packit Service 21b5d1
Packit Service 21b5d1
#if XMP_MacBuild
Packit Service 21b5d1
Packit Service 21b5d1
    typedef int8_t   XMP_Int8;
Packit Service 21b5d1
    typedef int16_t  XMP_Int16;
Packit Service 21b5d1
    typedef int32_t  XMP_Int32;
Packit Service 21b5d1
    typedef int64_t  XMP_Int64;
Packit Service 21b5d1
Packit Service 21b5d1
    typedef uint8_t  XMP_Uns8;
Packit Service 21b5d1
    typedef uint16_t XMP_Uns16;
Packit Service 21b5d1
    typedef uint32_t XMP_Uns32;
Packit Service 21b5d1
    typedef uint64_t XMP_Uns64;
Packit Service 21b5d1
Packit Service 21b5d1
#else
Packit Service 21b5d1
Packit Service 21b5d1
    typedef signed char XMP_Int8;
Packit Service 21b5d1
    typedef signed short XMP_Int16;
Packit Service 21b5d1
    typedef signed long XMP_Int32;
Packit Service 21b5d1
    typedef signed long long XMP_Int64;
Packit Service 21b5d1
Packit Service 21b5d1
    typedef unsigned char XMP_Uns8;
Packit Service 21b5d1
    typedef unsigned short XMP_Uns16;
Packit Service 21b5d1
    typedef unsigned long XMP_Uns32;
Packit Service 21b5d1
    typedef unsigned long long XMP_Uns64;
Packit Service 21b5d1
Packit Service 21b5d1
#endif
Packit Service 21b5d1
Packit Service 21b5d1
typedef XMP_Uns8 XMP_Bool;
Packit Service 21b5d1
Packit Service 21b5d1
/// An "ABI safe" pointer to the internal part of an XMP object. Use to pass an XMP object across
Packit Service 21b5d1
/// client DLL boundaries. See \c TXMPMeta::GetInternalRef().
Packit Service 21b5d1
typedef struct __XMPMeta__ *        XMPMetaRef;
Packit Service 21b5d1
Packit Service 21b5d1
/// An "ABI safe" pointer to the internal part of an XMP iteration object. Use to pass an XMP
Packit Service 21b5d1
/// iteration object across client DLL boundaries. See \c TXMPIterator.
Packit Service 21b5d1
typedef struct __XMPIterator__ *    XMPIteratorRef;
Packit Service 21b5d1
Packit Service 21b5d1
/// An "ABI safe" pointer to the internal part of an XMP document operations object. Use to pass an
Packit Service 21b5d1
/// XMP document operations object across client DLL boundaries. See \c TXMPDocOps.
Packit Service 21b5d1
typedef struct __XMPDocOps__ *    XMPDocOpsRef;
Packit Service 21b5d1
Packit Service 21b5d1
/// An "ABI safe" pointer to the internal part of an XMP file-handling object. Use to pass an XMP
Packit Service 21b5d1
/// file-handling object across  client DLL boundaries. See \c TXMPFiles.
Packit Service 21b5d1
typedef struct __XMPFiles__ *       XMPFilesRef;
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
/// \name General scalar types and constants
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
Packit Service 21b5d1
/// \typedef XMP_StringPtr
Packit Service 21b5d1
/// \brief The type for input string parameters. A <tt>const char *</tt>, a null-terminated UTF-8
Packit Service 21b5d1
/// string.
Packit Service 21b5d1
Packit Service 21b5d1
/// \typedef XMP_StringLen
Packit Service 21b5d1
/// \brief The type for string length parameters. A 32-bit unsigned integer, as big as will be
Packit Service 21b5d1
/// practically needed.
Packit Service 21b5d1
Packit Service 21b5d1
/// \typedef XMP_Index
Packit Service 21b5d1
/// \brief The type for offsets and indices. A 32-bit signed integer. It is signed to allow -1 for
Packit Service 21b5d1
/// loop termination.
Packit Service 21b5d1
Packit Service 21b5d1
/// \typedef XMP_OptionBits
Packit Service 21b5d1
/// \brief The type for a collection of 32 flag bits. Individual flags are defined as enum value bit
Packit Service 21b5d1
/// masks; see \c #kXMP_PropValueIsURI and following. A number of macros provide common set or set
Packit Service 21b5d1
/// operations, such as \c XMP_PropIsSimple. For other tests use an expression like options &
Packit Service 21b5d1
/// kXMP_<theOption>. When passing multiple option flags use the bitwise-OR operator. '|',
Packit Service 21b5d1
/// not the arithmatic plus, '+'.
Packit Service 21b5d1
Packit Service 21b5d1
typedef const char * XMP_StringPtr;  // Points to a null terminated UTF-8 string.
Packit Service 21b5d1
typedef XMP_Uns32    XMP_StringLen;
Packit Service 21b5d1
typedef XMP_Int32    XMP_Index;      // Signed, sometimes -1 is handy.
Packit Service 21b5d1
typedef XMP_Uns32    XMP_OptionBits; // Used as 32 individual bits.
Packit Service 21b5d1
Packit Service 21b5d1
/// \def kXMP_TrueStr
Packit Service 21b5d1
/// \brief The canonical true string value for Booleans in serialized XMP.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// Code that converts from string to bool should be case insensitive, and also allow "1".
Packit Service 21b5d1
Packit Service 21b5d1
/// \def kXMP_FalseStr
Packit Service 21b5d1
/// \brief The canonical false string value for Booleans in serialized XMP.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// Code that converts	from string to bool should be case insensitive, and also allow "0".
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_TrueStr  "True"  // Serialized XMP spellings, not for the type bool.
Packit Service 21b5d1
#define kXMP_FalseStr "False"
Packit Service 21b5d1
Packit Service 21b5d1
/// Type for yes/no/maybe answers. The values are picked to allow Boolean-like usage. The yes and
Packit Service 21b5d1
/// values are true (non-zero), the no value is false (zero).
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// The part or parts have definitely changed.
Packit Service 21b5d1
	kXMPTS_Yes = 1,
Packit Service 21b5d1
	/// The part or parts have definitely not changed.
Packit Service 21b5d1
	kXMPTS_No = 0,
Packit Service 21b5d1
	/// The part or parts might, or might not, have changed.
Packit Service 21b5d1
	kXMPTS_Maybe = -1
Packit Service 21b5d1
};
Packit Service 21b5d1
typedef XMP_Int8 XMP_TriState;
Packit Service 21b5d1
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
/// \struct XMP_DateTime
Packit Service 21b5d1
/// \brief The expanded type for a date and time.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// Dates and time in the serialized XMP are ISO 8601 strings. The \c XMP_DateTime struct allows
Packit Service 21b5d1
/// easy conversion with other formats.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// All of the fields are 32 bit, even though most could be 8 bit. This avoids overflow when doing
Packit Service 21b5d1
/// carries for arithmetic or normalization. All fields have signed values for the same reasons.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// Date-time values are occasionally used with only a date or only a time component. A date without
Packit Service 21b5d1
/// a time has zeros in the \c XMP_DateTime struct for all time fields. A time without a date has
Packit Service 21b5d1
/// zeros for all date fields (year, month, and day).
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \c TXMPUtils provides utility functions for manipulating date-time values.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @see \c TXMPUtils::ConvertToDate(), \c TXMPUtils::ConvertFromDate(),
Packit Service 21b5d1
/// \c TXMPUtils::CompareDateTime(), \c TXMPUtils::ConvertToLocalTime(),
Packit Service 21b5d1
/// \c TXMPUtils::ConvertToUTCTime(), \c TXMPUtils::CurrentDateTime(),
Packit Service 21b5d1
/// \c TXMPUtils::SetTimeZone()
Packit Service 21b5d1
Packit Service 21b5d1
struct XMP_DateTime {
Packit Service 21b5d1
Packit Service 21b5d1
	/// The year, can be negative.
Packit Service 21b5d1
    XMP_Int32 year;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The month in the range 1..12.
Packit Service 21b5d1
    XMP_Int32 month;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The day of the month in the range 1..31.
Packit Service 21b5d1
    XMP_Int32 day;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The hour in the range 0..23.
Packit Service 21b5d1
    XMP_Int32 hour;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The minute in the range 0..59.
Packit Service 21b5d1
    XMP_Int32 minute;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The second in the range 0..59.
Packit Service 21b5d1
    XMP_Int32 second;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The "sign" of the time zone, \c #kXMP_TimeIsUTC (0) means UTC, \c #kXMP_TimeWestOfUTC (-1)
Packit Service 21b5d1
	/// is west, \c #kXMP_TimeEastOfUTC (+1) is east.
Packit Service 21b5d1
    XMP_Int32 tzSign;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The time zone hour in the range 0..23.
Packit Service 21b5d1
    XMP_Int32 tzHour;
Packit Service 21b5d1
Packit Service 21b5d1
	/// The time zone minute in the range 0..59.
Packit Service 21b5d1
    XMP_Int32 tzMinute;
Packit Service 21b5d1
Packit Service 21b5d1
	/// Nanoseconds within a second, often left as zero.
Packit Service 21b5d1
    XMP_Int32 nanoSecond;
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Constant values for \c XMP_DateTime::tzSign field.
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// Time zone is west of UTC.
Packit Service 21b5d1
    kXMP_TimeWestOfUTC = -1,
Packit Service 21b5d1
	/// UTC time.
Packit Service 21b5d1
    kXMP_TimeIsUTC     =  0,
Packit Service 21b5d1
	/// Time zone is east of UTC.
Packit Service 21b5d1
    kXMP_TimeEastOfUTC = +1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Standard namespace URI constants
Packit Service 21b5d1
// ================================
Packit Service 21b5d1
Packit Service 21b5d1
/// \name XML namespace constants for standard XMP schema.
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP
Packit Service 21b5d1
/// \brief The XML namespace for the XMP "basic" schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_Rights
Packit Service 21b5d1
/// \brief The XML namespace for the XMP copyright schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_MM
Packit Service 21b5d1
/// \brief The XML namespace for the XMP digital asset management schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_BJ
Packit Service 21b5d1
/// \brief The XML namespace for the job management schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_T
Packit Service 21b5d1
/// \brief The XML namespace for the XMP text document schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_T_PG
Packit Service 21b5d1
/// \brief The XML namespace for the XMP paged document schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_PDF
Packit Service 21b5d1
/// \brief The XML namespace for the PDF schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_Photoshop
Packit Service 21b5d1
/// \brief The XML namespace for the Photoshop custom schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_EXIF
Packit Service 21b5d1
/// \brief The XML namespace for Adobe's EXIF schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_TIFF
Packit Service 21b5d1
/// \brief The XML namespace for Adobe's TIFF schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_XMP        "http://ns.adobe.com/xap/1.0/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_XMP_Rights "http://ns.adobe.com/xap/1.0/rights/"
Packit Service 21b5d1
#define kXMP_NS_XMP_MM     "http://ns.adobe.com/xap/1.0/mm/"
Packit Service 21b5d1
#define kXMP_NS_XMP_BJ     "http://ns.adobe.com/xap/1.0/bj/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_PDF        "http://ns.adobe.com/pdf/1.3/"
Packit Service 21b5d1
#define kXMP_NS_Photoshop  "http://ns.adobe.com/photoshop/1.0/"
Packit Service 21b5d1
#define kXMP_NS_PSAlbum    "http://ns.adobe.com/album/1.0/"
Packit Service 21b5d1
#define kXMP_NS_EXIF       "http://ns.adobe.com/exif/1.0/"
Packit Service 21b5d1
#define kXMP_NS_EXIF_Aux   "http://ns.adobe.com/exif/1.0/aux/"
Packit Service 21b5d1
#define kXMP_NS_TIFF       "http://ns.adobe.com/tiff/1.0/"
Packit Service 21b5d1
#define kXMP_NS_PNG        "http://ns.adobe.com/png/1.0/"
Packit Service 21b5d1
#define kXMP_NS_SWF        "http://ns.adobe.com/swf/1.0/"
Packit Service 21b5d1
#define kXMP_NS_JPEG       "http://ns.adobe.com/jpeg/1.0/"
Packit Service 21b5d1
#define kXMP_NS_JP2K       "http://ns.adobe.com/jp2k/1.0/"
Packit Service 21b5d1
#define kXMP_NS_CameraRaw  "http://ns.adobe.com/camera-raw-settings/1.0/"
Packit Service 21b5d1
#define kXMP_NS_DM         "http://ns.adobe.com/xmp/1.0/DynamicMedia/"
Packit Service 21b5d1
#define kXMP_NS_ASF        "http://ns.adobe.com/asf/1.0/"
Packit Service 21b5d1
#define kXMP_NS_WAV        "http://ns.adobe.com/xmp/wav/1.0/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_XMP_Note   "http://ns.adobe.com/xmp/note/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_AdobeStockPhoto "http://ns.adobe.com/StockPhoto/1.0/"
Packit Service 21b5d1
#define kXMP_NS_CreatorAtom "http://ns.adobe.com/creatorAtom/1.0/"
Packit Service 21b5d1
Packit Service 21b5d1
/// \name XML namespace constants for qualifiers and structured property fields.
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_IdentifierQual
Packit Service 21b5d1
/// \brief The XML namespace for qualifiers of the xmp:Identifier property.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_Dimensions
Packit Service 21b5d1
/// \brief The XML namespace for fields of the Dimensions type.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_Image
Packit Service 21b5d1
/// \brief The XML namespace for fields of a graphical image. Used for the Thumbnail type.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_ResourceEvent
Packit Service 21b5d1
/// \brief The XML namespace for fields of the ResourceEvent type.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_ResourceRef
Packit Service 21b5d1
/// \brief The XML namespace for fields of the ResourceRef type.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_ST_Version
Packit Service 21b5d1
/// \brief The XML namespace for fields of the Version type.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XMP_ST_Job
Packit Service 21b5d1
/// \brief The XML namespace for fields of the JobRef type.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_XMP_IdentifierQual "http://ns.adobe.com/xmp/Identifier/qual/1.0/"
Packit Service 21b5d1
#define kXMP_NS_XMP_Dimensions     "http://ns.adobe.com/xap/1.0/sType/Dimensions#"
Packit Service 21b5d1
#define kXMP_NS_XMP_Text           "http://ns.adobe.com/xap/1.0/t/"
Packit Service 21b5d1
#define kXMP_NS_XMP_PagedFile      "http://ns.adobe.com/xap/1.0/t/pg/"
Packit Service 21b5d1
#define kXMP_NS_XMP_Graphics       "http://ns.adobe.com/xap/1.0/g/"
Packit Service 21b5d1
#define kXMP_NS_XMP_Image          "http://ns.adobe.com/xap/1.0/g/img/"
Packit Service 21b5d1
#define kXMP_NS_XMP_Font           "http://ns.adobe.com/xap/1.0/sType/Font#"
Packit Service 21b5d1
#define kXMP_NS_XMP_ResourceEvent  "http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
Packit Service 21b5d1
#define kXMP_NS_XMP_ResourceRef    "http://ns.adobe.com/xap/1.0/sType/ResourceRef#"
Packit Service 21b5d1
#define kXMP_NS_XMP_ST_Version     "http://ns.adobe.com/xap/1.0/sType/Version#"
Packit Service 21b5d1
#define kXMP_NS_XMP_ST_Job         "http://ns.adobe.com/xap/1.0/sType/Job#"
Packit Service 21b5d1
#define kXMP_NS_XMP_ManifestItem   "http://ns.adobe.com/xap/1.0/sType/ManifestItem#"
Packit Service 21b5d1
Packit Service 21b5d1
// Deprecated XML namespace constants
Packit Service 21b5d1
#define kXMP_NS_XMP_T     "http://ns.adobe.com/xap/1.0/t/"
Packit Service 21b5d1
#define kXMP_NS_XMP_T_PG  "http://ns.adobe.com/xap/1.0/t/pg/"
Packit Service 21b5d1
#define kXMP_NS_XMP_G_IMG "http://ns.adobe.com/xap/1.0/g/img/"
Packit Service 21b5d1
Packit Service 21b5d1
/// \name XML namespace constants from outside Adobe.
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_DC
Packit Service 21b5d1
/// \brief The XML namespace for the Dublin Core schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_IPTCCore
Packit Service 21b5d1
/// \brief The XML namespace for the IPTC Core schema.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_RDF
Packit Service 21b5d1
/// \brief The XML namespace for RDF.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NS_XML
Packit Service 21b5d1
/// \brief The XML namespace for XML.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_DC              "http://purl.org/dc/elements/1.1/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_IPTCCore       "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_DICOM          "http://ns.adobe.com/DICOM/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_PDFA_Schema    "http://www.aiim.org/pdfa/ns/schema#"
Packit Service 21b5d1
#define kXMP_NS_PDFA_Property  "http://www.aiim.org/pdfa/ns/property#"
Packit Service 21b5d1
#define kXMP_NS_PDFA_Type      "http://www.aiim.org/pdfa/ns/type#"
Packit Service 21b5d1
#define kXMP_NS_PDFA_Field     "http://www.aiim.org/pdfa/ns/field#"
Packit Service 21b5d1
#define kXMP_NS_PDFA_ID        "http://www.aiim.org/pdfa/ns/id/"
Packit Service 21b5d1
#define kXMP_NS_PDFA_Extension "http://www.aiim.org/pdfa/ns/extension/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_PDFX           "http://ns.adobe.com/pdfx/1.3/"
Packit Service 21b5d1
#define	kXMP_NS_PDFX_ID        "http://www.npes.org/pdfx/ns/id/"
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_NS_RDF            "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Packit Service 21b5d1
#define kXMP_NS_XML            "http://www.w3.org/XML/1998/namespace"
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Enums and macros used for option bits
Packit Service 21b5d1
// =====================================
Packit Service 21b5d1
Packit Service 21b5d1
/// \name Macros for standard option selections.
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_ArrayLastItem
Packit Service 21b5d1
/// \brief Options macro accesses last array item.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_UseNullTermination
Packit Service 21b5d1
/// \brief Options macro sets string style.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def kXMP_NoOptions
Packit Service 21b5d1
/// \brief Options macro clears all property-type bits.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_ArrayLastItem      ((XMP_Index)(-1L))
Packit Service 21b5d1
#define kXMP_UseNullTermination ((XMP_StringLen)(~0UL))
Packit Service 21b5d1
#define kXMP_NoOptions          ((XMP_OptionBits)0UL)
Packit Service 21b5d1
Packit Service 21b5d1
/// \name Macros for setting and testing general option bits.
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_SetOption
Packit Service 21b5d1
/// \brief Macro sets an option flag bit.
Packit Service 21b5d1
///	\param var A variable storing an options flag.
Packit Service 21b5d1
/// \param opt The bit-flag constant to set.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_ClearOption
Packit Service 21b5d1
/// \brief Macro clears an option flag bit.
Packit Service 21b5d1
///	\param var A variable storing an options flag.
Packit Service 21b5d1
/// \param opt The bit-flag constant to clear.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_TestOption
Packit Service 21b5d1
/// \brief Macro reports whether an option flag bit is set.
Packit Service 21b5d1
///	\param var A variable storing an options flag.
Packit Service 21b5d1
/// \param opt The bit-flag constant to test.
Packit Service 21b5d1
/// \return True if the bit is set.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_OptionIsSet
Packit Service 21b5d1
/// \brief Macro reports whether an option flag bit is set.
Packit Service 21b5d1
///	\param var A variable storing an options flag.
Packit Service 21b5d1
/// \param opt The bit-flag constant to test.
Packit Service 21b5d1
/// \return True if the bit is set.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_OptionIsClear
Packit Service 21b5d1
/// \brief Macro reports whether an option flag bit is clear.
Packit Service 21b5d1
///	\param var A variable storing an options flag.
Packit Service 21b5d1
/// \param opt The bit-flag constant to test.
Packit Service 21b5d1
/// \return True if the bit is clear.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define XMP_SetOption(var,opt)      var |= (opt)
Packit Service 21b5d1
#define XMP_ClearOption(var,opt)    var &= ~(opt)
Packit Service 21b5d1
#define XMP_TestOption(var,opt)     (((var) & (opt)) != 0)
Packit Service 21b5d1
#define XMP_OptionIsSet(var,opt)    (((var) & (opt)) != 0)
Packit Service 21b5d1
#define XMP_OptionIsClear(var,opt)  (((var) & (opt)) == 0)
Packit Service 21b5d1
Packit Service 21b5d1
/// \name Macros for setting and testing specific option bits.
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropIsSimple
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropIsStruct
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropIsArray
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_ArrayIsUnordered
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_ArrayIsOrdered
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_ArrayIsAlternate
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_ArrayIsAltText
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropHasQualifiers
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropIsQualifier
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropHasLang
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_NodeIsSchema
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_PropIsAlias
Packit Service 21b5d1
/// \brief Macro reports the property type specified by an options flag.
Packit Service 21b5d1
/// \param opt The options flag to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define XMP_PropIsSimple(opt)       (((opt) & kXMP_PropCompositeMask) == 0)
Packit Service 21b5d1
#define XMP_PropIsStruct(opt)       (((opt) & kXMP_PropValueIsStruct) != 0)
Packit Service 21b5d1
#define XMP_PropIsArray(opt)        (((opt) & kXMP_PropValueIsArray) != 0)
Packit Service 21b5d1
Packit Service 21b5d1
#define XMP_ArrayIsUnordered(opt)   (((opt) & kXMP_PropArrayIsOrdered) == 0)
Packit Service 21b5d1
#define XMP_ArrayIsOrdered(opt)     (((opt) & kXMP_PropArrayIsOrdered) != 0)
Packit Service 21b5d1
#define XMP_ArrayIsAlternate(opt)   (((opt) & kXMP_PropArrayIsAlternate) != 0)
Packit Service 21b5d1
#define XMP_ArrayIsAltText(opt)     (((opt) & kXMP_PropArrayIsAltText) != 0)
Packit Service 21b5d1
Packit Service 21b5d1
#define XMP_PropHasQualifiers(opt)  (((opt) & kXMP_PropHasQualifiers) != 0)
Packit Service 21b5d1
#define XMP_PropIsQualifier(opt)    (((opt) & kXMP_PropIsQualifier) != 0)
Packit Service 21b5d1
#define XMP_PropHasLang(opt)        (((opt) & kXMP_PropHasLang) != 0)
Packit Service 21b5d1
Packit Service 21b5d1
#define XMP_NodeIsSchema(opt)       (((opt) & kXMP_SchemaNode) != 0)
Packit Service 21b5d1
#define XMP_PropIsAlias(opt)        (((opt) & kXMP_PropIsAlias) != 0)
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for the \c TXMPMeta property accessor functions.
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED
Packit Service 21b5d1
    kXMP_PropValueIsURI       = 0x00000002UL,
Packit Service 21b5d1
Packit Service 21b5d1
	// ------------------------------------------------------
Packit Service 21b5d1
    // Options relating to qualifiers attached to a property.
Packit Service 21b5d1
Packit Service 21b5d1
	/// The property has qualifiers, includes \c rdf:type and \c xml:lang.
Packit Service 21b5d1
    kXMP_PropHasQualifiers    = 0x00000010UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// This is a qualifier for some other property, includes \c rdf:type and \c xml:lang.
Packit Service 21b5d1
	/// Qualifiers can have arbitrary structure, and can themselves have qualifiers. If the
Packit Service 21b5d1
	/// qualifier itself has a structured value, this flag is only set for the top node of the
Packit Service 21b5d1
	/// qualifier's subtree.
Packit Service 21b5d1
    kXMP_PropIsQualifier      = 0x00000020UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Implies \c #kXMP_PropHasQualifiers, property has \c xml:lang.
Packit Service 21b5d1
    kXMP_PropHasLang          = 0x00000040UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Implies \c #kXMP_PropHasQualifiers, property has \c rdf:type.
Packit Service 21b5d1
    kXMP_PropHasType          = 0x00000080UL,
Packit Service 21b5d1
Packit Service 21b5d1
	// --------------------------------------------
Packit Service 21b5d1
    // Options relating to the data structure form.
Packit Service 21b5d1
Packit Service 21b5d1
	/// The value is a structure with nested fields.
Packit Service 21b5d1
    kXMP_PropValueIsStruct    = 0x00000100UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The value is an array (RDF alt/bag/seq). The "ArrayIs..." flags identify specific types
Packit Service 21b5d1
	/// of array; default is a general unordered array, serialized using an \c rdf:Bag container.
Packit Service 21b5d1
    kXMP_PropValueIsArray     = 0x00000200UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The item order does not matter.
Packit Service 21b5d1
    kXMP_PropArrayIsUnordered = kXMP_PropValueIsArray,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Implies \c #kXMP_PropValueIsArray, item order matters. It is serialized using an \c rdf:Seq container.
Packit Service 21b5d1
    kXMP_PropArrayIsOrdered   = 0x00000400UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Implies \c #kXMP_PropArrayIsOrdered, items are alternates. It is serialized using an \c rdf:Alt container.
Packit Service 21b5d1
    kXMP_PropArrayIsAlternate = 0x00000800UL,
Packit Service 21b5d1
Packit Service 21b5d1
	// ------------------------------------
Packit Service 21b5d1
    // Additional struct and array options.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Implies \c #kXMP_PropArrayIsAlternate, items are localized text.  Each array element is a
Packit Service 21b5d1
	/// simple property with an \c xml:lang attribute.
Packit Service 21b5d1
    kXMP_PropArrayIsAltText   = 0x00001000UL,
Packit Service 21b5d1
Packit Service 21b5d1
    // kXMP_InsertBeforeItem  = 0x00004000UL,  ! Used by SetXyz functions.
Packit Service 21b5d1
    // kXMP_InsertAfterItem   = 0x00008000UL,  ! Used by SetXyz functions.
Packit Service 21b5d1
Packit Service 21b5d1
	// ----------------------------
Packit Service 21b5d1
    // Other miscellaneous options.
Packit Service 21b5d1
Packit Service 21b5d1
	/// This property is an alias name for another property.  This is only returned by
Packit Service 21b5d1
	/// \c TXMPMeta::GetProperty() and then only if the property name is simple, not an path expression.
Packit Service 21b5d1
    kXMP_PropIsAlias          = 0x00010000UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// This property is the base value (actual) for a set of aliases.This is only returned by
Packit Service 21b5d1
	/// \c TXMPMeta::GetProperty() and then only if the property name is simple, not an path expression.
Packit Service 21b5d1
    kXMP_PropHasAliases       = 0x00020000UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The value of this property is "owned" by the application, and should not generally be editable in a UI.
Packit Service 21b5d1
    kXMP_PropIsInternal       = 0x00040000UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The value of this property is not derived from the document content.
Packit Service 21b5d1
    kXMP_PropIsStable         = 0x00100000UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The value of this property is derived from the document content.
Packit Service 21b5d1
    kXMP_PropIsDerived        = 0x00200000UL,
Packit Service 21b5d1
Packit Service 21b5d1
    // kXMPUtil_AllowCommas   = 0x10000000UL,  ! Used by TXMPUtils::CatenateArrayItems and ::SeparateArrayItems.
Packit Service 21b5d1
    // kXMP_DeleteExisting    = 0x20000000UL,  ! Used by TXMPMeta::SetXyz functions to delete any pre-existing property.
Packit Service 21b5d1
    // kXMP_SchemaNode        = 0x80000000UL,  ! Returned by iterators - #define to avoid warnings
Packit Service 21b5d1
Packit Service 21b5d1
	// ------------------------------
Packit Service 21b5d1
    // Masks that are multiple flags.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Property type bit-flag mask for all array types
Packit Service 21b5d1
    kXMP_PropArrayFormMask    = kXMP_PropValueIsArray | kXMP_PropArrayIsOrdered | kXMP_PropArrayIsAlternate | kXMP_PropArrayIsAltText,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Property type bit-flag mask for composite types (array and struct)
Packit Service 21b5d1
    kXMP_PropCompositeMask    = kXMP_PropValueIsStruct | kXMP_PropArrayFormMask,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Mask for bits that are reserved for transient use by the implementation.
Packit Service 21b5d1
    kXMP_ImplReservedMask     = 0x70000000L
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
#define kXMP_SchemaNode ((XMP_OptionBits)0x80000000UL)
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for the \c TXMPMeta property setting functions. These option bits are shared
Packit Service 21b5d1
/// with the accessor functions:
Packit Service 21b5d1
///   \li \c #kXMP_PropValueIsURI
Packit Service 21b5d1
///   \li \c #kXMP_PropValueIsStruct
Packit Service 21b5d1
///   \li \c #kXMP_PropValueIsArray
Packit Service 21b5d1
///   \li \c #kXMP_PropArrayIsOrdered
Packit Service 21b5d1
///   \li \c #kXMP_PropArrayIsAlternate
Packit Service 21b5d1
///   \li \c #kXMP_PropArrayIsAltText
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
    /// Option for array item location: Insert a new item before the given index.
Packit Service 21b5d1
    kXMP_InsertBeforeItem      = 0x00004000UL,
Packit Service 21b5d1
Packit Service 21b5d1
    /// Option for array item location: Insert a new item after the given index.
Packit Service 21b5d1
    kXMP_InsertAfterItem       = 0x00008000UL,
Packit Service 21b5d1
Packit Service 21b5d1
    /// Delete any pre-existing property.
Packit Service 21b5d1
    kXMP_DeleteExisting        = 0x20000000UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Bit-flag mask for property-value option bits
Packit Service 21b5d1
    kXMP_PropValueOptionsMask  = kXMP_PropValueIsURI,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Bit-flag mask for array-item location bits
Packit Service 21b5d1
    kXMP_PropArrayLocationMask = kXMP_InsertBeforeItem | kXMP_InsertAfterItem
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPMeta::ParseFromBuffer().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// Require a surrounding \c x:xmpmeta element.
Packit Service 21b5d1
    kXMP_RequireXMPMeta   = 0x0001UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// This is the not last input buffer for this parse stream.
Packit Service 21b5d1
    kXMP_ParseMoreBuffers = 0x0002UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Do not reconcile alias differences, throw an exception.
Packit Service 21b5d1
    kXMP_StrictAliasing   = 0x0004UL
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPMeta::SerializeToBuffer().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
    // *** Option to remove empty struct/array, or leaf with empty value?
Packit Service 21b5d1
Packit Service 21b5d1
	/// Omit the XML packet wrapper.
Packit Service 21b5d1
    kXMP_OmitPacketWrapper   = 0x0010UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Default is a writeable packet.
Packit Service 21b5d1
    kXMP_ReadOnlyPacket      = 0x0020UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Use a compact form of RDF.
Packit Service 21b5d1
    kXMP_UseCompactFormat    = 0x0040UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Include a padding allowance for a thumbnail image.
Packit Service 21b5d1
    kXMP_IncludeThumbnailPad = 0x0100UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The padding parameter is the overall packet length.
Packit Service 21b5d1
    kXMP_ExactPacketLength   = 0x0200UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Show aliases as XML comments.
Packit Service 21b5d1
    kXMP_WriteAliasComments  = 0x0400UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Omit all formatting whitespace.
Packit Service 21b5d1
    kXMP_OmitAllFormatting   = 0x0800UL,
Packit Service 21b5d1
    
Packit Service 21b5d1
    /// Omit the x:xmpmeta element surrounding the rdf:RDF element.
Packit Service 21b5d1
    kXMP_OmitXMPMetaElement  = 0x1000UL,
Packit Service 21b5d1
Packit Service 21b5d1
    _XMP_LittleEndian_Bit    = 0x0001UL,  // ! Don't use directly, see the combined values below!
Packit Service 21b5d1
    _XMP_UTF16_Bit           = 0x0002UL,
Packit Service 21b5d1
    _XMP_UTF32_Bit           = 0x0004UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Bit-flag mask for encoding-type bits
Packit Service 21b5d1
    kXMP_EncodingMask        = 0x0007UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Use UTF8 encoding
Packit Service 21b5d1
    kXMP_EncodeUTF8          = 0UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Use UTF16 big-endian encoding
Packit Service 21b5d1
    kXMP_EncodeUTF16Big      = _XMP_UTF16_Bit,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Use UTF16 little-endian encoding
Packit Service 21b5d1
    kXMP_EncodeUTF16Little   = _XMP_UTF16_Bit | _XMP_LittleEndian_Bit,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Use UTF32 big-endian encoding
Packit Service 21b5d1
    kXMP_EncodeUTF32Big      = _XMP_UTF32_Bit,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Use UTF13 little-endian encoding
Packit Service 21b5d1
    kXMP_EncodeUTF32Little   = _XMP_UTF32_Bit | _XMP_LittleEndian_Bit
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPIterator construction.
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// The low 8 bits are an enum of what data structure to iterate.
Packit Service 21b5d1
    kXMP_IterClassMask      = 0x00FFUL,
Packit Service 21b5d1
Packit Service 21b5d1
    /// Iterate the property tree of a TXMPMeta object.
Packit Service 21b5d1
    kXMP_IterProperties     = 0x0000UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Iterate the global alias table.
Packit Service 21b5d1
    kXMP_IterAliases        = 0x0001UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Iterate the global namespace table.
Packit Service 21b5d1
    kXMP_IterNamespaces     = 0x0002UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Just do the immediate children of the root, default is subtree.
Packit Service 21b5d1
    kXMP_IterJustChildren   = 0x0100UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Just do the leaf nodes, default is all nodes in the subtree.
Packit Service 21b5d1
    kXMP_IterJustLeafNodes  = 0x0200UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Return just the leaf part of the path, default is the full path.
Packit Service 21b5d1
    kXMP_IterJustLeafName   = 0x0400UL,
Packit Service 21b5d1
Packit Service 21b5d1
	 /// Include aliases, default is just actual properties.
Packit Service 21b5d1
    kXMP_IterIncludeAliases = 0x0800UL,
Packit Service 21b5d1
Packit Service 21b5d1
	 /// Omit all qualifiers.
Packit Service 21b5d1
    kXMP_IterOmitQualifiers = 0x1000UL
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPIterator::Skip().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// Skip the subtree below the current node.
Packit Service 21b5d1
    kXMP_IterSkipSubtree    = 0x0001UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Skip the subtree below and remaining siblings of the current node.
Packit Service 21b5d1
    kXMP_IterSkipSiblings   = 0x0002UL
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
/// Option bit flags for \c TXMPUtils::CatenateArrayItems() and \c TXMPUtils::SeparateArrayItems().
Packit Service 21b5d1
/// These option bits are shared with the accessor functions:
Packit Service 21b5d1
///   \li \c #kXMP_PropValueIsArray,
Packit Service 21b5d1
///   \li \c #kXMP_PropArrayIsOrdered, 
Packit Service 21b5d1
///   \li \c #kXMP_PropArrayIsAlternate,
Packit Service 21b5d1
///   \li \c #kXMP_PropArrayIsAltText
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// Allow commas in item values, default is separator.
Packit Service 21b5d1
    kXMPUtil_AllowCommas      = 0x10000000UL
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPUtils::RemoveProperties() and \c TXMPUtils::AppendProperties().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	 /// Do all properties, default is just external properties.
Packit Service 21b5d1
    kXMPUtil_DoAllProperties   = 0x0001UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Replace existing values, default is to leave them.
Packit Service 21b5d1
    kXMPUtil_ReplaceOldValues  = 0x0002UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Delete properties if the new value is empty.
Packit Service 21b5d1
    kXMPUtil_DeleteEmptyValues = 0x0004UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Include aliases, default is just actual properties.
Packit Service 21b5d1
    kXMPUtil_IncludeAliases    = 0x0800UL
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Types and Constants for XMPFiles
Packit Service 21b5d1
// ================================
Packit Service 21b5d1
Packit Service 21b5d1
/// File format constants for use with XMPFiles.
Packit Service 21b5d1
enum {
Packit Service 21b5d1
    
Packit Service 21b5d1
    // ! Hex used to avoid gcc warnings. Leave the constants so the text reads big endian. There
Packit Service 21b5d1
    // ! seems to be no decent way on UNIX to determine the target endianness at compile time.
Packit Service 21b5d1
    // ! Forcing it on the client isn't acceptable.
Packit Service 21b5d1
Packit Service 21b5d1
	// --------------------
Packit Service 21b5d1
    // Public file formats.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Public file format constant: 'PDF '
Packit Service 21b5d1
    kXMP_PDFFile             = 0x50444620UL,
Packit Service 21b5d1
	/// Public file format constant: 'PS  ', general PostScript following DSC conventions
Packit Service 21b5d1
    kXMP_PostScriptFile      = 0x50532020UL,
Packit Service 21b5d1
	/// Public file format constant: 'EPS ', encapsulated PostScript
Packit Service 21b5d1
    kXMP_EPSFile             = 0x45505320UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Public file format constant: 'JPEG'
Packit Service 21b5d1
    kXMP_JPEGFile            = 0x4A504547UL,
Packit Service 21b5d1
	/// Public file format constant: 'JPX ', JPEG 2000, ISO 15444-1
Packit Service 21b5d1
    kXMP_JPEG2KFile          = 0x4A505820UL,
Packit Service 21b5d1
	/// Public file format constant: 'TIFF'
Packit Service 21b5d1
    kXMP_TIFFFile            = 0x54494646UL,
Packit Service 21b5d1
	/// Public file format constant: 'GIF '
Packit Service 21b5d1
    kXMP_GIFFile             = 0x47494620UL,
Packit Service 21b5d1
	/// Public file format constant: 'PNG '
Packit Service 21b5d1
    kXMP_PNGFile             = 0x504E4720UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Public file format constant: 'SWF '
Packit Service 21b5d1
    kXMP_SWFFile             = 0x53574620UL,
Packit Service 21b5d1
	/// Public file format constant: 'FLA '
Packit Service 21b5d1
    kXMP_FLAFile             = 0x464C4120UL,
Packit Service 21b5d1
	/// Public file format constant: 'FLV '
Packit Service 21b5d1
    kXMP_FLVFile             = 0x464C5620UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Public file format constant: 'MOV ', Quicktime
Packit Service 21b5d1
    kXMP_MOVFile             = 0x4D4F5620UL,
Packit Service 21b5d1
	/// Public file format constant: 'AVI '
Packit Service 21b5d1
    kXMP_AVIFile             = 0x41564920UL,
Packit Service 21b5d1
	/// Public file format constant: 'CIN ', Cineon
Packit Service 21b5d1
    kXMP_CINFile             = 0x43494E20UL,
Packit Service 21b5d1
 	/// Public file format constant: 'WAV '
Packit Service 21b5d1
    kXMP_WAVFile             = 0x57415620UL,
Packit Service 21b5d1
	/// Public file format constant: 'MP3 '
Packit Service 21b5d1
    kXMP_MP3File             = 0x4D503320UL,
Packit Service 21b5d1
	/// Public file format constant: 'SES ', Audition session
Packit Service 21b5d1
    kXMP_SESFile             = 0x53455320UL,
Packit Service 21b5d1
	/// Public file format constant: 'CEL ', Audition loop
Packit Service 21b5d1
    kXMP_CELFile             = 0x43454C20UL,
Packit Service 21b5d1
	/// Public file format constant: 'MPEG'
Packit Service 21b5d1
    kXMP_MPEGFile            = 0x4D504547UL,
Packit Service 21b5d1
	/// Public file format constant: 'MP2 '
Packit Service 21b5d1
    kXMP_MPEG2File           = 0x4D503220UL,
Packit Service 21b5d1
	/// Public file format constant: 'MP4 ', ISO 14494-12 and -14
Packit Service 21b5d1
    kXMP_MPEG4File           = 0x4D503420UL,
Packit Service 21b5d1
	/// Public file format constant: 'WMAV', Windows Media Audio and Video
Packit Service 21b5d1
    kXMP_WMAVFile            = 0x574D4156UL,
Packit Service 21b5d1
	/// Public file format constant:  'AIFF'
Packit Service 21b5d1
    kXMP_AIFFFile            = 0x41494646UL,
Packit Service 21b5d1
	/// Public file format constant:  'P2  ', a collection not really a single file
Packit Service 21b5d1
    kXMP_P2File              = 0x50322020UL,
Packit Service 21b5d1
	/// Public file format constant:  'XDCF', a collection not really a single file
Packit Service 21b5d1
    kXMP_XDCAM_FAMFile       = 0x58444346UL,
Packit Service 21b5d1
	/// Public file format constant:  'XDCS', a collection not really a single file
Packit Service 21b5d1
    kXMP_XDCAM_SAMFile       = 0x58444353UL,
Packit Service 21b5d1
	/// Public file format constant:  'XDCX', a collection not really a single file
Packit Service 21b5d1
    kXMP_XDCAM_EXFile        = 0x58444358UL,
Packit Service 21b5d1
	/// Public file format constant:  'AVHD', a collection not really a single file
Packit Service 21b5d1
    kXMP_AVCHDFile           = 0x41564844UL,
Packit Service 21b5d1
	/// Public file format constant:  'SHDV', a collection not really a single file
Packit Service 21b5d1
    kXMP_SonyHDVFile         = 0x53484456UL,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Public file format constant: 'HTML'
Packit Service 21b5d1
    kXMP_HTMLFile            = 0x48544D4CUL,
Packit Service 21b5d1
	/// Public file format constant: 'XML '
Packit Service 21b5d1
    kXMP_XMLFile             = 0x584D4C20UL,
Packit Service 21b5d1
	/// Public file format constant:  'text'
Packit Service 21b5d1
    kXMP_TextFile            = 0x74657874UL,
Packit Service 21b5d1
Packit Service 21b5d1
	// -------------------------------
Packit Service 21b5d1
    // Adobe application file formats.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Adobe application file format constant: 'PSD '
Packit Service 21b5d1
    kXMP_PhotoshopFile       = 0x50534420UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'AI  '
Packit Service 21b5d1
    kXMP_IllustratorFile     = 0x41492020UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'INDD'
Packit Service 21b5d1
    kXMP_InDesignFile        = 0x494E4444UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'AEP '
Packit Service 21b5d1
    kXMP_AEProjectFile       = 0x41455020UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'AET ', After Effects Project Template
Packit Service 21b5d1
    kXMP_AEProjTemplateFile  = 0x41455420UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'FFX '
Packit Service 21b5d1
    kXMP_AEFilterPresetFile  = 0x46465820UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'NCOR'
Packit Service 21b5d1
    kXMP_EncoreProjectFile   = 0x4E434F52UL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'PRPJ'
Packit Service 21b5d1
    kXMP_PremiereProjectFile = 0x5052504AUL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'PRTL'
Packit Service 21b5d1
    kXMP_PremiereTitleFile   = 0x5052544CUL,
Packit Service 21b5d1
	/// Adobe application file format constant: 'UCF ', Universal Container Format
Packit Service 21b5d1
	kXMP_UCFFile             = 0x55434620UL,
Packit Service 21b5d1
Packit Service 21b5d1
	// -------
Packit Service 21b5d1
    // Others.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Unknown file format constant: '    '
Packit Service 21b5d1
    kXMP_UnknownFile         = 0x20202020UL
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Type for file format identification constants. See \c #kXMP_PDFFile and following.
Packit Service 21b5d1
typedef XMP_Uns32 XMP_FileFormat;
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
Packit Service 21b5d1
/// Byte-order masks, do not use directly
Packit Service 21b5d1
enum {
Packit Service 21b5d1
    kXMP_CharLittleEndianMask = 1,
Packit Service 21b5d1
    kXMP_Char16BitMask        = 2,
Packit Service 21b5d1
    kXMP_Char32BitMask        = 4
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Constants to allow easy testing for 16/32 bit and big/little endian.
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// 8-bit
Packit Service 21b5d1
    kXMP_Char8Bit        = 0,
Packit Service 21b5d1
	/// 16-bit big-endian
Packit Service 21b5d1
    kXMP_Char16BitBig    = kXMP_Char16BitMask,
Packit Service 21b5d1
	/// 16-bit little-endian
Packit Service 21b5d1
    kXMP_Char16BitLittle = kXMP_Char16BitMask | kXMP_CharLittleEndianMask,
Packit Service 21b5d1
	/// 32-bit big-endian
Packit Service 21b5d1
    kXMP_Char32BitBig    = kXMP_Char32BitMask,
Packit Service 21b5d1
	/// 32-bit little-endian
Packit Service 21b5d1
    kXMP_Char32BitLittle = kXMP_Char32BitMask | kXMP_CharLittleEndianMask,
Packit Service 21b5d1
	/// Variable or not-yet-known cases
Packit Service 21b5d1
    kXMP_CharUnknown     = 1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// \name Macros to test components of the character form mask
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_CharFormIs16Bit
Packit Service 21b5d1
/// \brief Macro reports the encoding of a character.
Packit Service 21b5d1
/// \param f The character to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_CharFormIs32Bit
Packit Service 21b5d1
/// \brief Macro reports the encoding of a character.
Packit Service 21b5d1
/// \param f The character to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_CharFormIsBigEndian
Packit Service 21b5d1
/// \brief Macro reports the byte-order of a character.
Packit Service 21b5d1
/// \param f The character to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_CharFormIsLittleEndian
Packit Service 21b5d1
/// \brief Macro reports the byte-order of a character.
Packit Service 21b5d1
/// \param f The character to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_GetCharSize
Packit Service 21b5d1
/// \brief Macro reports the byte-size of a character.
Packit Service 21b5d1
/// \param f The character to check.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_CharToSerializeForm
Packit Service 21b5d1
/// \brief Macro converts \c XMP_Uns8 to \c XMP_OptionBits.
Packit Service 21b5d1
/// \param cf The character to convert.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \def XMP_CharFromSerializeForm
Packit Service 21b5d1
/// \brief Macro converts \c XMP_OptionBits to \c XMP_Uns8.
Packit Service 21b5d1
/// \param sf The character to convert.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
#define XMP_CharFormIs16Bit(f)         ( ((int)(f) & kXMP_Char16BitMask) != 0 )
Packit Service 21b5d1
#define XMP_CharFormIs32Bit(f)         ( ((int)(f) & kXMP_Char32BitMask) != 0 )
Packit Service 21b5d1
#define XMP_CharFormIsBigEndian(f)     ( ((int)(f) & kXMP_CharLittleEndianMask) == 0 )
Packit Service 21b5d1
#define XMP_CharFormIsLittleEndian(f)  ( ((int)(f) & kXMP_CharLittleEndianMask) != 0 )
Packit Service 21b5d1
#define XMP_GetCharSize(f)             ( ((int)(f)&6) == 0 ? 1 : (int)(f)&6 )
Packit Service 21b5d1
#define XMP_CharToSerializeForm(cf)    ( (XMP_OptionBits)(cf) )
Packit Service 21b5d1
#define XMP_CharFromSerializeForm(sf)  ( (XMP_Uns8)(sf) )
Packit Service 21b5d1
Packit Service 21b5d1
/// \def kXMPFiles_UnknownOffset
Packit Service 21b5d1
/// \brief Constant for an unknown packet offset within a file.
Packit Service 21b5d1
#define kXMPFiles_UnknownOffset	((XMP_Int64)-1)
Packit Service 21b5d1
Packit Service 21b5d1
/// \def kXMPFiles_UnknownLength
Packit Service 21b5d1
/// \brief Constant for an unknown packet length within a file.
Packit Service 21b5d1
#define kXMPFiles_UnknownLength	((XMP_Int32)-1)
Packit Service 21b5d1
Packit Service 21b5d1
/// XMP packet description
Packit Service 21b5d1
struct XMP_PacketInfo {
Packit Service 21b5d1
Packit Service 21b5d1
	/// Packet offset in the file in bytes, -1 if unknown.
Packit Service 21b5d1
    XMP_Int64 offset;
Packit Service 21b5d1
	/// Packet length in the file in bytes, -1 if unknown.
Packit Service 21b5d1
    XMP_Int32 length;
Packit Service 21b5d1
	/// Packet padding size in bytes, zero if unknown.
Packit Service 21b5d1
    XMP_Int32 padSize;   // Zero if unknown.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Character format using the values \c kXMP_Char8Bit, \c kXMP_Char16BitBig, etc.
Packit Service 21b5d1
    XMP_Uns8  charForm;
Packit Service 21b5d1
	/// True if there is a packet wrapper and the trailer says writeable by dumb packet scanners.
Packit Service 21b5d1
    XMP_Bool  writeable;
Packit Service 21b5d1
    /// True if there is a packet wrapper, the "" XML processing instructions.
Packit Service 21b5d1
    XMP_Bool  hasWrapper;
Packit Service 21b5d1
Packit Service 21b5d1
	/// Padding to make the struct's size be a multiple 4.
Packit Service 21b5d1
    XMP_Uns8  pad;
Packit Service 21b5d1
Packit Service 21b5d1
	/// Default constructor.
Packit Service 21b5d1
	XMP_PacketInfo() : offset(kXMPFiles_UnknownOffset), length(kXMPFiles_UnknownLength),
Packit Service 21b5d1
					   padSize(0), charForm(0), writeable(0), hasWrapper(0), pad(0) {};
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Version of the XMP_PacketInfo type
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// Version of the XMP_PacketInfo type
Packit Service 21b5d1
	kXMP_PacketInfoVersion = 3
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
Packit Service 21b5d1
/// Values for \c XMP_ThumbnailInfo::tnailFormat.
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// The thumbnail data has an unknown format.
Packit Service 21b5d1
    kXMP_UnknownTNail = 0,
Packit Service 21b5d1
	/// The thumbnail data is a JPEG stream, presumably compressed.
Packit Service 21b5d1
    kXMP_JPEGTNail    = 1,
Packit Service 21b5d1
	/// The thumbnail data is a TIFF stream, presumably uncompressed.
Packit Service 21b5d1
    kXMP_TIFFTNail    = 2,
Packit Service 21b5d1
	/// The thumbnail data is in the format of Photoshop Image Resource 1036.
Packit Service 21b5d1
    kXMP_PShopTNail   = 3
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Thumbnail descriptor
Packit Service 21b5d1
struct XMP_ThumbnailInfo {
Packit Service 21b5d1
Packit Service 21b5d1
	/// The format of the containing file.
Packit Service 21b5d1
    XMP_FileFormat   fileFormat;
Packit Service 21b5d1
	/// Full image size in pixels.
Packit Service 21b5d1
    XMP_Uns32        fullWidth, fullHeight;
Packit Service 21b5d1
	/// Thumbnail image size in pixels.
Packit Service 21b5d1
    XMP_Uns32        tnailWidth, tnailHeight;
Packit Service 21b5d1
	/// Orientation of full image and thumbnail, as defined by Exif for tag 274.
Packit Service 21b5d1
Packit Service 21b5d1
    XMP_Uns16        fullOrientation, tnailOrientation;
Packit Service 21b5d1
	/// Raw image data from the host file, valid for life of the owning \c XMPFiles object. Do not modify!
Packit Service 21b5d1
    const XMP_Uns8 * tnailImage;
Packit Service 21b5d1
	/// The size in bytes of the thumbnail image data.
Packit Service 21b5d1
    XMP_Uns32        tnailSize;
Packit Service 21b5d1
	/// The format of the thumbnail image data.
Packit Service 21b5d1
    XMP_Uns8         tnailFormat;
Packit Service 21b5d1
Packit Service 21b5d1
	/// Padding to make the struct's size be a multiple 4.
Packit Service 21b5d1
    XMP_Uns8         pad1, pad2, pad3;
Packit Service 21b5d1
Packit Service 21b5d1
	/// Default constructor.
Packit Service 21b5d1
	XMP_ThumbnailInfo() : fileFormat(kXMP_UnknownFile), fullWidth(0), fullHeight(0),
Packit Service 21b5d1
						  tnailWidth(0), tnailHeight(0), fullOrientation(0), tnailOrientation(0),
Packit Service 21b5d1
						  tnailImage(0), tnailSize(0), tnailFormat(kXMP_UnknownTNail) {};
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Version of the XMP_ThumbnailInfo type
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// Version of the XMP_ThumbnailInfo type
Packit Service 21b5d1
	kXMP_ThumbnailInfoVersion = 1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPFiles::Initialize().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// Do not initialize QuickTime, the client will.
Packit Service 21b5d1
    kXMPFiles_NoQuickTimeInit = 0x0001
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPFiles::GetFormatInfo().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// Can inject first-time XMP into an existing file.
Packit Service 21b5d1
    kXMPFiles_CanInjectXMP        = 0x00000001,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Can expand XMP or other metadata in an existing file.
Packit Service 21b5d1
    kXMPFiles_CanExpand           = 0x00000002,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Can copy one file to another, writing new metadata.
Packit Service 21b5d1
    kXMPFiles_CanRewrite          = 0x00000004,
Packit Service 21b5d1
Packit Service 21b5d1
	 /// Can expand, but prefers in-place update.
Packit Service 21b5d1
    kXMPFiles_PrefersInPlace      = 0x00000008,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Supports reconciliation between XMP and other forms.
Packit Service 21b5d1
    kXMPFiles_CanReconcile        = 0x00000010,
Packit Service 21b5d1
Packit Service 21b5d1
	 /// Allows access to just the XMP, ignoring other forms.
Packit Service 21b5d1
    kXMPFiles_AllowsOnlyXMP       = 0x00000020,
Packit Service 21b5d1
Packit Service 21b5d1
	/// File handler returns raw XMP packet information.
Packit Service 21b5d1
    kXMPFiles_ReturnsRawPacket    = 0x00000040,
Packit Service 21b5d1
Packit Service 21b5d1
	 /// File handler returns native thumbnail.
Packit Service 21b5d1
    kXMPFiles_ReturnsTNail        = 0x00000080,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The file handler does the file open and close.
Packit Service 21b5d1
    kXMPFiles_HandlerOwnsFile     = 0x00000100,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The file handler allows crash-safe file updates.
Packit Service 21b5d1
    kXMPFiles_AllowsSafeUpdate    = 0x00000200,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The file format needs the XMP packet to be read-only.
Packit Service 21b5d1
    kXMPFiles_NeedsReadOnlyPacket = 0x00000400,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The file handler uses a "sidecar" file for the XMP.
Packit Service 21b5d1
    kXMPFiles_UsesSidecarXMP      = 0x00000800,
Packit Service 21b5d1
Packit Service 21b5d1
	/// The format is folder oriented, for example the P2 video format.
Packit Service 21b5d1
    kXMPFiles_FolderBasedFormat   = 0x00001000
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPFiles::OpenFile().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	/// Open for read-only access.
Packit Service 21b5d1
    kXMPFiles_OpenForRead           = 0x00000001,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Open for reading and writing.
Packit Service 21b5d1
    kXMPFiles_OpenForUpdate         = 0x00000002,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Only the XMP is wanted, allows space/time optimizations.
Packit Service 21b5d1
    kXMPFiles_OpenOnlyXMP           = 0x00000004,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Cache thumbnail if possible, \c TXMPFiles::GetThumbnail() will be called.
Packit Service 21b5d1
    kXMPFiles_OpenCacheTNail        = 0x00000008,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Be strict about locating XMP and reconciling with other forms.
Packit Service 21b5d1
    kXMPFiles_OpenStrictly          = 0x00000010,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Require the use of a smart handler.
Packit Service 21b5d1
    kXMPFiles_OpenUseSmartHandler   = 0x00000020,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Force packet scanning, do not use a smart handler.
Packit Service 21b5d1
    kXMPFiles_OpenUsePacketScanning = 0x00000040,
Packit Service 21b5d1
Packit Service 21b5d1
	/// Only packet scan files "known" to need scanning.
Packit Service 21b5d1
    kXMPFiles_OpenLimitedScanning   = 0x00000080,
Packit Service 21b5d1
    
Packit Service 21b5d1
    /// Attempt to repair a file opened for update, default is to not open (throw an exception).
Packit Service 21b5d1
    kXMPFiles_OpenRepairFile        = 0x00000100,
Packit Service 21b5d1
Packit Service 21b5d1
	 /// Set if calling from background thread.
Packit Service 21b5d1
    kXMPFiles_OpenInBackground      = 0x10000000
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// A note about kXMPFiles_OpenInBackground. The XMPFiles handler for .mov files currently uses
Packit Service 21b5d1
// QuickTime. On Macintosh, calls to Enter/ExitMovies versus Enter/ExitMoviesOnThread must be made.
Packit Service 21b5d1
// This option is used to signal background use so that the .mov handler can behave appropriately.
Packit Service 21b5d1
Packit Service 21b5d1
/// Option bit flags for \c TXMPFiles::CloseFile().
Packit Service 21b5d1
enum {
Packit Service 21b5d1
	/// Write into a temporary file and swap for crash safety.
Packit Service 21b5d1
    kXMPFiles_UpdateSafely = 0x0001
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Exception codes
Packit Service 21b5d1
// ===============
Packit Service 21b5d1
Packit Service 21b5d1
/// \name Errors Exception handling
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
///
Packit Service 21b5d1
/// XMP Tookit errors result in throwing an \c XMP_Error exception. Any exception thrown within the
Packit Service 21b5d1
/// XMP Toolkit is caught in the toolkit and rethrown as an \c XMP_Error.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// The \c XMP_Error class contains a numeric code and an English explanation. New numeric codes may
Packit Service 21b5d1
/// be added at any time. There are typically many possible explanations for each numeric code. The
Packit Service 21b5d1
/// explanations try to be precise about the specific circumstances causing the error.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// \note The explanation string is for debugging use only. It must not be shown to users in a
Packit Service 21b5d1
/// final product. It is written for developers not users, and never localized.
Packit Service 21b5d1
///
Packit Service 21b5d1
Packit Service 21b5d1
/// XMP Toolkit error, associates an error code with a descriptive error string.
Packit Service 21b5d1
class XMP_Error {
Packit Service 21b5d1
public:
Packit Service 21b5d1
Packit Service 21b5d1
	/// @brief Constructor for an XMP_Error.
Packit Service 21b5d1
	///
Packit Service 21b5d1
	/// @param _id The numeric code.
Packit Service 21b5d1
	///
Packit Service 21b5d1
	/// @param _errMsg The descriptive string, for debugging use only. It must not be shown to users
Packit Service 21b5d1
	/// in a final product. It is written for developers, not users, and never localized.
Packit Service 21b5d1
	XMP_Error ( XMP_Int32 _id, XMP_StringPtr _errMsg ) : id(_id), errMsg(_errMsg) {};
Packit Service 21b5d1
Packit Service 21b5d1
	/// Retrieves the numeric code from an XMP_Error.
Packit Service 21b5d1
	inline XMP_Int32     GetID() const     { return id; };
Packit Service 21b5d1
Packit Service 21b5d1
	/// Retrieves the descriptive string from an XMP_Error.
Packit Service 21b5d1
	inline XMP_StringPtr GetErrMsg() const { return errMsg; };
Packit Service 21b5d1
Packit Service 21b5d1
private:
Packit Service 21b5d1
	/// Exception code. See constants \c #kXMPErr_Unknown and following.
Packit Service 21b5d1
	XMP_Int32     id;
Packit Service 21b5d1
	/// Descriptive string, for debugging use only. It must not be shown to users in a final
Packit Service 21b5d1
	/// product. It is written for developers, not users, and never localized.
Packit Service 21b5d1
	XMP_StringPtr errMsg;
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// Exception code constants
Packit Service 21b5d1
enum {
Packit Service 21b5d1
Packit Service 21b5d1
	// --------------------
Packit Service 21b5d1
    // Generic error codes.
Packit Service 21b5d1
   
Packit Service 21b5d1
	/// Generic unknown error
Packit Service 21b5d1
    kXMPErr_Unknown          =   0,
Packit Service 21b5d1
	/// Generic undefined error
Packit Service 21b5d1
    kXMPErr_TBD              =   1,
Packit Service 21b5d1
	/// Generic unavailable error
Packit Service 21b5d1
    kXMPErr_Unavailable      =   2,
Packit Service 21b5d1
	/// Generic bad object error
Packit Service 21b5d1
    kXMPErr_BadObject        =   3,
Packit Service 21b5d1
	/// Generic bad parameter error
Packit Service 21b5d1
    kXMPErr_BadParam         =   4,
Packit Service 21b5d1
	/// Generic bad value error
Packit Service 21b5d1
    kXMPErr_BadValue         =   5,
Packit Service 21b5d1
	/// Generic assertion failure
Packit Service 21b5d1
    kXMPErr_AssertFailure    =   6,
Packit Service 21b5d1
	/// Generic enforcement failure
Packit Service 21b5d1
    kXMPErr_EnforceFailure   =   7,
Packit Service 21b5d1
	/// Generic unimplemented error
Packit Service 21b5d1
    kXMPErr_Unimplemented    =   8,
Packit Service 21b5d1
	/// Generic internal failure
Packit Service 21b5d1
    kXMPErr_InternalFailure  =   9,
Packit Service 21b5d1
	/// Generic deprecated error
Packit Service 21b5d1
    kXMPErr_Deprecated       =  10,
Packit Service 21b5d1
	/// Generic external failure
Packit Service 21b5d1
    kXMPErr_ExternalFailure  =  11,
Packit Service 21b5d1
	/// Generic user abort error
Packit Service 21b5d1
    kXMPErr_UserAbort        =  12,
Packit Service 21b5d1
	/// Generic standard exception
Packit Service 21b5d1
    kXMPErr_StdException     =  13,
Packit Service 21b5d1
	/// Generic unknown exception
Packit Service 21b5d1
    kXMPErr_UnknownException =  14,
Packit Service 21b5d1
	/// Generic out-of-memory error
Packit Service 21b5d1
    kXMPErr_NoMemory         =  15,
Packit Service 21b5d1
Packit Service 21b5d1
	// ------------------------------------
Packit Service 21b5d1
    // More specific parameter error codes.
Packit Service 21b5d1
Packit Service 21b5d1
	/// Bad schema parameter
Packit Service 21b5d1
    kXMPErr_BadSchema        = 101,
Packit Service 21b5d1
	/// Bad XPath parameter
Packit Service 21b5d1
    kXMPErr_BadXPath         = 102,
Packit Service 21b5d1
	/// Bad options parameter
Packit Service 21b5d1
    kXMPErr_BadOptions       = 103,
Packit Service 21b5d1
	/// Bad index parameter
Packit Service 21b5d1
    kXMPErr_BadIndex         = 104,
Packit Service 21b5d1
	/// Bad iteration position
Packit Service 21b5d1
    kXMPErr_BadIterPosition  = 105,
Packit Service 21b5d1
	/// XML parsing error
Packit Service 21b5d1
    kXMPErr_BadParse         = 106,
Packit Service 21b5d1
	/// Serialization error
Packit Service 21b5d1
    kXMPErr_BadSerialize     = 107,
Packit Service 21b5d1
	/// File format error
Packit Service 21b5d1
    kXMPErr_BadFileFormat    = 108,
Packit Service 21b5d1
	/// No file handler found for format
Packit Service 21b5d1
    kXMPErr_NoFileHandler    = 109,
Packit Service 21b5d1
	/// Data too large for JPEG file format
Packit Service 21b5d1
    kXMPErr_TooLargeForJPEG  = 110,
Packit Service 21b5d1
Packit Service 21b5d1
	// -----------------------------------------------
Packit Service 21b5d1
    // File format and internal structure error codes.
Packit Service 21b5d1
Packit Service 21b5d1
	/// XML format error
Packit Service 21b5d1
    kXMPErr_BadXML           = 201,
Packit Service 21b5d1
	/// RDF format error
Packit Service 21b5d1
    kXMPErr_BadRDF           = 202,
Packit Service 21b5d1
	/// XMP format error
Packit Service 21b5d1
    kXMPErr_BadXMP           = 203,
Packit Service 21b5d1
	/// Empty iterator
Packit Service 21b5d1
    kXMPErr_EmptyIterator    = 204,
Packit Service 21b5d1
	/// Unicode error
Packit Service 21b5d1
    kXMPErr_BadUnicode       = 205,
Packit Service 21b5d1
	/// TIFF format error
Packit Service 21b5d1
    kXMPErr_BadTIFF          = 206,
Packit Service 21b5d1
	/// JPEG format error
Packit Service 21b5d1
    kXMPErr_BadJPEG          = 207,
Packit Service 21b5d1
	/// PSD format error
Packit Service 21b5d1
    kXMPErr_BadPSD           = 208,
Packit Service 21b5d1
	/// PSIR format error
Packit Service 21b5d1
    kXMPErr_BadPSIR          = 209,
Packit Service 21b5d1
	/// IPTC format error
Packit Service 21b5d1
    kXMPErr_BadIPTC          = 210,
Packit Service 21b5d1
	/// MPEG format error
Packit Service 21b5d1
    kXMPErr_BadMPEG          = 211
Packit Service 21b5d1
Packit Service 21b5d1
};
Packit Service 21b5d1
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Client callbacks
Packit Service 21b5d1
// ================
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
/// \name Special purpose callback functions
Packit Service 21b5d1
/// @{
Packit Service 21b5d1
Packit Service 21b5d1
/// A signed 32-bit integer used as a status result for the output callback routine,
Packit Service 21b5d1
/// \c XMP_TextOutputProc. Zero means no error, all other values except -1 are private to the callback.
Packit Service 21b5d1
/// The callback is wrapped to prevent exceptions being thrown across DLL boundaries. Any exceptions
Packit Service 21b5d1
/// thrown out of the callback cause a return status of -1.
Packit Service 21b5d1
Packit Service 21b5d1
typedef XMP_Int32 XMP_Status;
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
/// The signature of a client-defined callback for text output from XMP Toolkit debugging
Packit Service 21b5d1
/// operations. The callback is invoked one or more times for each line of output. The end of a line
Packit Service 21b5d1
/// is signaled by a '\\n' character at the end of the buffer. Formatting newlines are never present
Packit Service 21b5d1
/// in the middle of a buffer, but values of properties might contain any UTF-8 characters.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @param refCon A pointer to client-defined data passed to the TextOutputProc.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @param buffer  A string containing one line of output.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @param bufferSize The number of characters in the output buffer.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @return A success/fail status value. Any failure result aborts the output.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @see \c TXMPMeta::DumpObject()
Packit Service 21b5d1
Packit Service 21b5d1
typedef XMP_Status (* XMP_TextOutputProc) ( void *        refCon,
Packit Service 21b5d1
                                            XMP_StringPtr buffer,
Packit Service 21b5d1
                                            XMP_StringLen bufferSize );
Packit Service 21b5d1
Packit Service 21b5d1
// -------------------------------------------------------------------------------------------------
Packit Service 21b5d1
/// The signature of a client-defined callback to check for a user request to abort a time-consuming
Packit Service 21b5d1
/// operation within XMPFiles.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @param arg A pointer to caller-defined data passed from the registration call.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @return True to abort the current operation, which results in an exception being thrown.
Packit Service 21b5d1
///
Packit Service 21b5d1
/// @see \c TXMPFiles::SetAbortProc()
Packit Service 21b5d1
Packit Service 21b5d1
typedef bool (* XMP_AbortProc) ( void * arg );	// Used by .
Packit Service 21b5d1
Packit Service 21b5d1
/// @}
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
// Stuff with no better place to be
Packit Service 21b5d1
// ================================
Packit Service 21b5d1
Packit Service 21b5d1
/// XMP Toolkit version information
Packit Service 21b5d1
typedef struct XMP_VersionInfo {
Packit Service 21b5d1
	/// The primary release number, the "1" in version "1.2.3".
Packit Service 21b5d1
    XMP_Uns8      major;
Packit Service 21b5d1
	/// The secondary release number, the "2" in version "1.2.3".
Packit Service 21b5d1
    XMP_Uns8      minor;
Packit Service 21b5d1
	/// The tertiary release number, the "3" in version "1.2.3".
Packit Service 21b5d1
    XMP_Uns8      micro;
Packit Service 21b5d1
	 /// A 0/1 boolean value, true if this is a debug build.
Packit Service 21b5d1
    XMP_Bool      isDebug;
Packit Service 21b5d1
	 /// A rolling build number, monotonically increasing in a release.
Packit Service 21b5d1
    XMP_Uns32     build;
Packit Service 21b5d1
	 /// Individual feature implementation flags.
Packit Service 21b5d1
    XMP_Uns32     flags;
Packit Service 21b5d1
	 /// A comprehensive version information string.
Packit Service 21b5d1
    XMP_StringPtr message;
Packit Service 21b5d1
} XMP_VersionInfo;
Packit Service 21b5d1
Packit Service 21b5d1
// =================================================================================================
Packit Service 21b5d1
Packit Service 21b5d1
#if __cplusplus
Packit Service 21b5d1
} // extern "C"
Packit Service 21b5d1
#endif
Packit Service 21b5d1
Packit Service 21b5d1
#endif  // __XMP_Const_h__