Correction to earlier commit. Should not have updated the xmpsdk/include files with files creating using xmpsdk/buildXMPsdk.sh

v0.27.3
clanmills 8 years ago
parent 6085392857
commit 36d2a4f5db

@ -2,12 +2,12 @@
#define __TXMPIterator_hpp__ 1 #define __TXMPIterator_hpp__ 1
#if ( ! __XMP_hpp__ ) #if ( ! __XMP_hpp__ )
#error "Do not directly include, use XMP.hpp" #error "Do not directly include, use XMPSDK.hpp"
#endif #endif
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -19,7 +19,7 @@
/// \brief API for access to the XMP Toolkit iteration services. /// \brief API for access to the XMP Toolkit iteration services.
/// ///
/// \c TXMPIterator is the template class providing iteration services for the XMP Toolkit. It must /// \c TXMPIterator is the template class providing iteration services for the XMP Toolkit. It must
/// be instantiated with a string class such as \c std::string. See the instructions in XMP.hpp, and /// be instantiated with a string class such as \c std::string. See the instructions in XMPSDK.hpp, and
/// the Overview for a discussion of the overall architecture of the XMP API. /// the Overview for a discussion of the overall architecture of the XMP API.
// ================================================================================================= // =================================================================================================
@ -29,7 +29,7 @@
/// ///
/// \c TXMPIterator provides a uniform means to iterate over the schema and properties within an XMP /// \c TXMPIterator provides a uniform means to iterate over the schema and properties within an XMP
/// object. \c TXMPIterator is a template class which must be instantiated with a string class such /// object. \c TXMPIterator is a template class which must be instantiated with a string class such
/// as \c std::string. See the instructions in XMP.hpp, and the Overview for a discussion of the /// as \c std::string. See the instructions in XMPSDK.hpp, and the Overview for a discussion of the
/// overall architecture of the XMP API. Access these functions through the concrete class, /// overall architecture of the XMP API. Access these functions through the concrete class,
/// \c SXMPIterator. /// \c SXMPIterator.
/// ///
@ -62,7 +62,7 @@
/// are visited next. The fields of a struct or items of an array are visited after the qualifiers /// are visited next. The fields of a struct or items of an array are visited after the qualifiers
/// of the parent. /// of the parent.
/// ///
/// You can specify options when contructing the iteration object to control how the iteration is /// You can specify options when constructing the iteration object to control how the iteration is
/// performed. /// performed.
/// ///
/// \li \c #kXMP_IterJustChildren - Visit just the immediate children of the root. Skip the root /// \li \c #kXMP_IterJustChildren - Visit just the immediate children of the root. Skip the root
@ -71,6 +71,8 @@
/// \li \c #kXMP_IterJustLeafNodes - Visit just the leaf property nodes and their qualifiers. /// \li \c #kXMP_IterJustLeafNodes - Visit just the leaf property nodes and their qualifiers.
/// \li \c #kXMP_IterJustLeafName - Return just the leaf component of the node names. The default /// \li \c #kXMP_IterJustLeafName - Return just the leaf component of the node names. The default
/// is to return the full path name. /// is to return the full path name.
/// \li \c #kXMP_IterIncludeAliases - Include aliases as part of the iteration. Since aliases are
/// not actual nodes the default iteration does not visit them.
/// \li \c #kXMP_IterOmitQualifiers - Do not visit the qualifiers of a node. /// \li \c #kXMP_IterOmitQualifiers - Do not visit the qualifiers of a node.
// ================================================================================================= // =================================================================================================
@ -226,8 +228,6 @@ private:
TXMPIterator(); // ! Hidden, must choose property or table iteration. TXMPIterator(); // ! Hidden, must choose property or table iteration.
static void SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
}; // class TXMPIterator }; // class TXMPIterator
// ================================================================================================= // =================================================================================================

@ -2,17 +2,12 @@
#define __TXMPMeta_hpp__ 1 #define __TXMPMeta_hpp__ 1
#if ( ! __XMP_hpp__ ) #if ( ! __XMP_hpp__ )
#error "Do not directly include, use XMP.hpp" #error "Do not directly include, use XMPSDK.hpp"
#endif
#include "XMPCore/XMPCoreDefines.h"
#if ENABLE_CPP_DOM_MODEL
#include "XMPCore/XMPCoreFwdDeclarations.h"
#endif #endif
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -25,9 +20,8 @@
/// ///
/// \c TXMPMeta is the template class providing the core services of the XMP Toolkit. It must be /// \c TXMPMeta is the template class providing the core services of the XMP Toolkit. It must be
/// instantiated with a string class such as \c std::string. Read the Toolkit Overview for /// instantiated with a string class such as \c std::string. Read the Toolkit Overview for
/// information about the overall architecture of the XMP API, and the documentation for \c XMP.hpp /// information about the overall architecture of the XMP API, and the documentation for \c XMPSDK.hpp
/// for specific instantiation instructions. Please that you MUST NOT derive a class from this class, /// for specific instantiation instructions.
/// consider this class FINAL, use it directly. [1279031]
/// ///
/// Access these functions through the concrete class, \c SXMPMeta. /// Access these functions through the concrete class, \c SXMPMeta.
// ================================================================================================= // =================================================================================================
@ -38,7 +32,7 @@
/// ///
/// \c TXMPMeta is the template class providing the core services of the XMP Toolkit. It should be /// \c TXMPMeta is the template class providing the core services of the XMP Toolkit. It should be
/// instantiated with a string class such as \c std::string. Read the Toolkit Overview for /// instantiated with a string class such as \c std::string. Read the Toolkit Overview for
/// information about the overall architecture of the XMP API, and the documentation for \c XMP.hpp /// information about the overall architecture of the XMP API, and the documentation for \c XMPSDK.hpp
/// for specific instantiation instructions. /// for specific instantiation instructions.
/// ///
/// Access these functions through the concrete class, \c SXMPMeta. /// Access these functions through the concrete class, \c SXMPMeta.
@ -105,7 +99,7 @@ public:
// ============================================================================================= // =============================================================================================
// Constuctors and destructor // Constuctors and destructor
// ========================== // =========================
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// \name Constructors and destructor /// \name Constructors and destructor
@ -241,6 +235,23 @@ public:
static XMP_Status DumpNamespaces ( XMP_TextOutputProc outProc, static XMP_Status DumpNamespaces ( XMP_TextOutputProc outProc,
void * clientData ); void * clientData );
// ---------------------------------------------------------------------------------------------
/// @brief \c DumpAliases() sends the list of registered aliases and corresponding actuals to a handler.
///
/// For debugging. Invokes a client-defined callback for each line of output.
///
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
///
/// @param outProc The client-defined procedure to handle each line of output.
///
/// @param clientData A pointer to client-defined data to pass to the handler.
///
/// @return A success-fail status value, returned from the handler. Zero is success, failure
/// values are client-defined.
static XMP_Status DumpAliases ( XMP_TextOutputProc outProc,
void * clientData );
/// @} /// @}
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
@ -256,30 +267,20 @@ public:
/// new URI. /// new URI.
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c RegisterNamespace() registers a namespace URI with a suggested prefix. /// @brief \c RegisterNamespace() registers a namespace URI with a prefix.
/// ///
/// If the URI is not registered but the suggested prefix is in use, a unique prefix is created /// If the the prefix is in use, the URI of the existing prefix is overwritten.
/// from the suggested one. The actual registered prefix is returned. The function result tells
/// if the registered prefix is the suggested one. It is not an error if the URI is already
/// registered, regardless of the prefix.
/// ///
/// This function is static; make the call directly from the concrete class (\c SXMPMeta). /// This function is static; make the call directly from the concrete class (\c SXMPMeta).
/// ///
/// @param namespaceURI The URI for the namespace. Must be a valid XML URI. /// @param namespaceURI The URI for the namespace. Must be a valid XML URI.
/// ///
/// @param suggestedPrefix The suggested prefix to be used if the URI is not yet registered. /// @param prefix The prefix to be used. Must be a valid XML name.
/// Must be a valid XML name.
///
/// @param registeredPrefix [out] A string object in which to return the prefix actually
/// registered for this URI.
///
/// @return True if the registered prefix matches the suggested prefix.
/// ///
/// @note No checking is done on either the URI or the prefix. */ /// @note No checking is done on either the URI or the prefix. */
static bool RegisterNamespace ( XMP_StringPtr namespaceURI, static void RegisterNamespace ( XMP_StringPtr namespaceURI,
XMP_StringPtr suggestedPrefix, XMP_StringPtr prefix );
tStringObj * registeredPrefix );
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c GetNamespacePrefix() obtains the prefix for a registered namespace URI, and /// @brief \c GetNamespacePrefix() obtains the prefix for a registered namespace URI, and
@ -330,6 +331,132 @@ public:
/// @} /// @}
// ---------------------------------------------------------------------------------------------
/// \name Alias functions
/// @{
///
/// Aliases in XMP serve the same purpose as Windows file shortcuts, Mac OS file aliases, or
/// UNIX file symbolic links. The aliases are multiple names for the same property. One
/// distinction of XMP aliases is that they are ordered. An alias name points to an actual name;
/// the primary significance of the actual name is that it is the preferred name for output,
/// generally the most widely recognized name.
///
/// XMP restricts the names that can be aliased. The alias must be a top-level property name,
/// not a field within a structure or an element within an array. The actual can be a top-level
/// property name, the first element within a top-level array, or the default element in an
/// alt-text array. This does not mean the alias can only be a simple property; you can alias a
/// top-level structure or array to an identical top-level structure or array, or to the first
/// item of an array of structures.
// ---------------------------------------------------------------------------------------------
/// @brief \c RegisterAlias() associates an alias name with an actual name.
///
/// Defines an alias mapping from one namespace/property to another. Both property names must be
/// simple names. An alias can be a direct mapping, where the alias and actual have the same
/// data type. It is also possible to map a simple alias to an item in an array. This can either
/// be to the first item in the array, or to the 'x-default' item in an alt-text array. Multiple
/// alias names can map to the same actual, as long as the forms match. It is a no-op to
/// reregister an alias in an identical fashion.
///
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
///
/// @param aliasNS The namespace URI for the alias. Must not be null or the empty string.
///
/// @param aliasProp The name of the alias. Must be a simple name, not null or the empty string
/// and not a general path expression.
///
/// @param actualNS The namespace URI for the actual. Must not be null or the empty string.
///
/// @param actualProp The name of the actual. Must be a simple name, not null or the empty string
/// and not a general path expression.
///
/// @param arrayForm Provides the array form for simple aliases to an array item. This is needed
/// to know what kind of array to create if set for the first time via the simple alias. Pass
/// \c #kXMP_NoOptions, the default value, for all direct aliases regardless of whether the actual
/// data type is an array or not. One of these constants:
///
/// \li \c #kXMP_NoOptions - This is a direct mapping. The actual data type does not matter.
/// \li \c #kXMP_PropValueIsArray - The actual is an unordered array, the alias is to the
/// first element of the array.
/// \li \c #kXMP_PropArrayIsOrdered - The actual is an ordered array, the alias is to the
/// first element of the array.
/// \li \c #kXMP_PropArrayIsAlternate - The actual is an alternate array, the alias is to the
/// first element of the array.
/// \li \c #kXMP_PropArrayIsAltText - The actual is an alternate text array, the alias is to
/// the 'x-default' element of the array. */
static void RegisterAlias ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp,
XMP_StringPtr actualNS,
XMP_StringPtr actualProp,
XMP_OptionBits arrayForm = kXMP_NoOptions );
// ---------------------------------------------------------------------------------------------
/// @brief \c ResolveAlias() reports whether a name is an alias, and what it is aliased to.
///
/// Output strings are not written until return, so you can use this to
/// "reduce" a path to the base form as follows:
/// <pre>
/// isAlias = SXMPMeta::ResolveAlias ( ns.c_str(), path.c_str(), &ns, &path, 0 );
/// </pre>
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
///
/// @param aliasNS The namespace URI for the alias. Must not be null or the empty string.
///
/// @param aliasProp The name of the alias. Can be an arbitrary path expression path, must not
/// null or the empty string.
///
/// @param actualNS [out] A string object in which to return the namespace URI for the actual.
/// Not modified if the given name is not an alias. Can be null if the namespace URI is not wanted.
///
/// @param actualProp [out] A string object in which to return the path of the actual.
/// Not modified if the given name is not an alias. Can be null if the actual's path is not wanted.
///
/// @param arrayForm [out] A string object in which to return the array form of the actual. This
/// is 0 (\c #kXMP_NoOptions) if the alias and actual forms match, otherwise it is the options
/// passed to \c TXMPMeta::RegisterAlias(). Not modified if the given name is not an alias. Can
/// be null if the actual's array form is not wanted.
///
/// @return True if the provided name is an alias.
static bool ResolveAlias ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp,
tStringObj * actualNS,
tStringObj * actualProp,
XMP_OptionBits * arrayForm );
// ---------------------------------------------------------------------------------------------
/// @brief \c DeleteAlias() deletes an alias.
///
/// This deletes only the registration of the alias, it does not delete the actual property.
/// It deletes any view of the property through the alias name.
///
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
///
/// @param aliasNS The namespace URI for the alias. Must not be null or the empty string.
///
/// @param aliasProp The name of the alias. Must be a simple name, not null or the empty string
/// and not a general path expression. It is not an error to provide
/// a name that has not been registered as an alias.
static void DeleteAlias ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp );
// ---------------------------------------------------------------------------------------------
/// @brief \c RegisterStandardAliases() registers all of the built-in aliases for a standard namespace.
///
/// The built-in aliases are documented in the XMP Specification. This function registers the
/// aliases in the given namespace; that is, it creates the aliases from this namespace to
/// actuals in other namespaces.
///
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
///
/// @param schemaNS The namespace URI for the aliases. Must not be null or the empty string.
static void RegisterStandardAliases ( XMP_StringPtr schemaNS );
/// @}
// ============================================================================================= // =============================================================================================
// Basic property manipulation functions // Basic property manipulation functions
// ===================================== // =====================================
@ -366,7 +493,8 @@ public:
/// parts of a registered namespace. /// parts of a registered namespace.
/// ///
/// @param schemaNS The namespace URI for the property. The URI must be for a registered /// @param schemaNS The namespace URI for the property. The URI must be for a registered
/// namespace. Must not be null or the empty string. /// namespace. Can be null or the empty string if the first component of the \c propName path
/// contains a namespace prefix.
/// ///
/// @param propName The name of the property. Can be a general path expression, must not be null /// @param propName The name of the property. Can be a general path expression, must not be null
/// or the empty string. The first component can be a namespace prefix; if present without a /// or the empty string. The first component can be a namespace prefix; if present without a
@ -957,7 +1085,7 @@ public:
bool GetProperty_Int ( XMP_StringPtr schemaNS, bool GetProperty_Int ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int32 * propValue, long * propValue,
XMP_OptionBits * options ) const; XMP_OptionBits * options ) const;
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
@ -982,7 +1110,7 @@ public:
bool GetProperty_Int64 ( XMP_StringPtr schemaNS, bool GetProperty_Int64 ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int64 * propValue, long long * propValue,
XMP_OptionBits * options ) const; XMP_OptionBits * options ) const;
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
@ -1076,7 +1204,7 @@ public:
void SetProperty_Int ( XMP_StringPtr schemaNS, void SetProperty_Int ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int32 propValue, long propValue,
XMP_OptionBits options = 0 ); XMP_OptionBits options = 0 );
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
@ -1098,7 +1226,7 @@ public:
void SetProperty_Int64 ( XMP_StringPtr schemaNS, void SetProperty_Int64 ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int64 propValue, long long propValue,
XMP_OptionBits options = 0 ); XMP_OptionBits options = 0 );
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
@ -1367,28 +1495,6 @@ public:
const tStringObj & itemValue, const tStringObj & itemValue,
XMP_OptionBits options = 0 ); XMP_OptionBits options = 0 );
// ---------------------------------------------------------------------------------------------
/// @brief \c DeleteLocalizedText() deletes specific language alternatives from an alt-text array.
///
/// The rules for finding the language value to delete are similar to those for \c #SetLocalizedText().
///
/// @param schemaNS The namespace URI for the alt-text array; see \c #GetProperty().
///
/// @param altTextName The name of the alt-text array. Can be a general path expression, must
/// not be null or the empty string; see \c #GetProperty() for namespace prefix usage.
///
/// @param genericLang The name of the generic language as an RFC 3066 primary subtag. Can be
/// null or the empty string if no generic language is wanted.
///
/// @param specificLang The name of the specific language as an RFC 3066 tag, or "x-default".
/// Must not be null or the empty string.
///
void
DeleteLocalizedText ( XMP_StringPtr schemaNS,
XMP_StringPtr altTextName,
XMP_StringPtr genericLang,
XMP_StringPtr specificLang );
/// @} /// @}
// ============================================================================================= // =============================================================================================
@ -1449,6 +1555,7 @@ public:
/// \li \c kXMP_ReadOnlyPacket - Create a read-only XML packet wapper. Cannot be specified /// \li \c kXMP_ReadOnlyPacket - Create a read-only XML packet wapper. Cannot be specified
/// together with \c kXMP_OmitPacketWrapper. /// together with \c kXMP_OmitPacketWrapper.
/// \li \c kXMP_UseCompactFormat - Use a highly compact RDF syntax and layout. /// \li \c kXMP_UseCompactFormat - Use a highly compact RDF syntax and layout.
/// \li \c kXMP_WriteAliasComments - Include XML comments for aliases.
/// \li \c kXMP_IncludeThumbnailPad - Include typical space for a JPEG thumbnail in the /// \li \c kXMP_IncludeThumbnailPad - Include typical space for a JPEG thumbnail in the
/// padding if no \c xmp:Thumbnails property is present. Cannot be specified together with /// padding if no \c xmp:Thumbnails property is present. Cannot be specified together with
/// \c kXMP_OmitPacketWrapper. /// \c kXMP_OmitPacketWrapper.
@ -1500,6 +1607,7 @@ public:
/// \li \c kXMP_ReadOnlyPacket - Create a read-only XML packet wapper. Cannot be specified /// \li \c kXMP_ReadOnlyPacket - Create a read-only XML packet wapper. Cannot be specified
/// together with \c kXMP_OmitPacketWrapper. /// together with \c kXMP_OmitPacketWrapper.
/// \li \c kXMP_UseCompactFormat - Use a highly compact RDF syntax and layout. /// \li \c kXMP_UseCompactFormat - Use a highly compact RDF syntax and layout.
/// \li \c kXMP_WriteAliasComments - Include XML comments for aliases.
/// \li \c kXMP_IncludeThumbnailPad - Include typical space for a JPEG thumbnail in the /// \li \c kXMP_IncludeThumbnailPad - Include typical space for a JPEG thumbnail in the
/// padding if no \c xmp:Thumbnails property is present. Cannot be specified together with /// padding if no \c xmp:Thumbnails property is present. Cannot be specified together with
/// \c kXMP_OmitPacketWrapper. /// \c kXMP_OmitPacketWrapper.
@ -1664,7 +1772,7 @@ public:
/// @return A success-fail status value, returned from the handler. Zero is success, failure /// @return A success-fail status value, returned from the handler. Zero is success, failure
/// values are client-defined. /// values are client-defined.
/// ///
/// @see Static function \c DumpNamespaces() /// @see Static functions \c DumpNamespaces() and \c DumpAliases()
XMP_Status DumpObject ( XMP_TextOutputProc outProc, XMP_Status DumpObject ( XMP_TextOutputProc outProc,
void * clientData ) const; void * clientData ) const;
@ -1679,65 +1787,6 @@ public:
/// @} /// @}
// =============================================================================================
// Error notifications
// ===================
// ---------------------------------------------------------------------------------------------
/// \name Error notifications
/// @{
///
/// From the beginning through version 5.5, XMP Tookit errors result in throwing an \c XMP_Error
/// exception. For the most part exceptions were thrown early and thus API calls aborted as soon
/// as an error was detected. Starting in version 5.5, support has been added for notifications
/// of errors arising in calls to \c TXMPMeta functions.
///
/// A client can register an error notification callback function for a \c TXMPMeta object. This
/// can be done as a global default or individually to each object. The global default applies
/// to all objects created after it is registered. Within the object there is no difference
/// between the global default or explicitly registered callback. The callback function returns
/// a \c bool value indicating if recovery should be attempted (true) or an exception thrown
/// (false). If no callback is registered, a best effort at recovery and continuation will be
/// made with an exception thrown if recovery is not possible.
///
/// The number of notifications delivered for a given TXMPMeta object can be limited. This is
/// intended to reduce chatter from multiple or cascading errors. The limit is set when the
/// callback function is registered. This limits the number of notifications of the highest
/// severity delivered or less. If a higher severity error occurs, the counting starts again.
/// The limit and counting can be reset at any time, see \c ResetErrorCallbackLimit.
// --------------------------------------------------------------------------------------------
/// @brief SetDefaultErrorCallback() registers a global default error notification callback.
///
/// @param proc The client's callback function.
///
/// @param context Client-provided context for the callback.
///
/// @param limit A limit on the number of notifications to be delivered.
static void SetDefaultErrorCallback ( XMPMeta_ErrorCallbackProc proc, void* context = 0, XMP_Uns32 limit = 1 );
// --------------------------------------------------------------------------------------------
/// @brief SetErrorCallback() registers an error notification callback.
///
/// @param proc The client's callback function.
///
/// @param context Client-provided context for the callback.
///
/// @param limit A limit on the number of notifications to be delivered.
void SetErrorCallback ( XMPMeta_ErrorCallbackProc proc, void* context = 0, XMP_Uns32 limit = 1 );
// --------------------------------------------------------------------------------------------
/// @brief ResetErrorCallbackLimit() resets the error notification limit and counting. It has no
/// effect if an error notification callback function is not registered.
///
/// @param limit A limit on the number of notifications to be delivered.
void ResetErrorCallbackLimit ( XMP_Uns32 limit = 1 );
/// @}
// ============================================================================================= // =============================================================================================
XMPMetaRef xmpRef; // *** Should be private, see below. XMPMetaRef xmpRef; // *** Should be private, see below.
@ -1749,8 +1798,6 @@ private:
friend class TXMPUtils <class tStringObj>; friend class TXMPUtils <class tStringObj>;
#endif #endif
static void SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
}; // class TXMPMeta }; // class TXMPMeta
#endif // __TXMPMeta_hpp__ #endif // __TXMPMeta_hpp__

@ -2,12 +2,12 @@
#define __TXMPUtils_hpp__ 1 #define __TXMPUtils_hpp__ 1
#if ( ! __XMP_hpp__ ) #if ( ! __XMP_hpp__ )
#error "Do not directly include, use XMP.hpp" #error "Do not directly include, use XMPSDK.hpp"
#endif #endif
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -19,7 +19,7 @@
/// \brief API for access to the XMP Toolkit utility services. /// \brief API for access to the XMP Toolkit utility services.
/// ///
/// \c TXMPUtils is the template class providing utility services for the XMP Toolkit. It must be /// \c TXMPUtils is the template class providing utility services for the XMP Toolkit. It must be
/// instantiated with a string class such as \c std::string. See the instructions in XMP.hpp, and /// instantiated with a string class such as \c std::string. See the instructions in XMPSDK.hpp, and
/// the Overview for a discussion of the overall architecture of the XMP API. /// the Overview for a discussion of the overall architecture of the XMP API.
// ================================================================================================= // =================================================================================================
@ -28,7 +28,7 @@
/// @brief API for access to the XMP Toolkit utility services. /// @brief API for access to the XMP Toolkit utility services.
/// ///
/// \c TXMPUtils is a template class which must be instantiated with a string class such as /// \c TXMPUtils is a template class which must be instantiated with a string class such as
/// \c std::string. See the instructions in XMP.hpp, and the Overview for a discussion of the overall /// \c std::string. See the instructions in XMPSDK.hpp, and the Overview for a discussion of the overall
/// architecture of the XMP API. /// architecture of the XMP API.
/// ///
/// This class defines helper functions that support the basic metadata manipulation provided by /// This class defines helper functions that support the basic metadata manipulation provided by
@ -320,7 +320,7 @@ public:
/// ///
/// Strings can be specified as null-terminated UTF-8 (\c #XMP_StringPtr), or as string /// Strings can be specified as null-terminated UTF-8 (\c #XMP_StringPtr), or as string
/// objects (\c tStringObj) of the type declared when instantiating the XMP classes; see /// objects (\c tStringObj) of the type declared when instantiating the XMP classes; see
/// \c XMP.hpp. Alternate forms of each conversion function allow either type of string. /// \c XMPSDK.hpp. Alternate forms of each conversion function allow either type of string.
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c ConvertFromBool() converts a Boolean value to a string. /// @brief \c ConvertFromBool() converts a Boolean value to a string.
@ -399,9 +399,7 @@ public:
/// "0000-00-00...". /// "0000-00-00...".
/// ///
/// @note ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows /// @note ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows
/// any year, even negative ones. The W3C profile also requires a time zone designator if a time /// any year, even negative ones.
/// is present, this API treats the time zone designator as optional. The XMP_DateTime type has
/// an explicit notion of zone-less time.
/// ///
/// @param binValue The date/time value to be converted. /// @param binValue The date/time value to be converted.
/// ///
@ -525,9 +523,7 @@ public:
/// A missing TZD is assumed to be UTC. /// A missing TZD is assumed to be UTC.
/// ///
/// @note ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows /// @note ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows
/// any year, even negative ones. The W3C profile also requires a time zone designator if a time /// any year, even negative ones.
/// is present, this API treats the time zone designator as optional. The XMP_DateTime type has
/// an explicit notion of zone-less time.
/// ///
/// @param strValue The ISO 8601 string representation of the date/time, specified as a /// @param strValue The ISO 8601 string representation of the date/time, specified as a
/// null-terminated UTF-8 string. /// null-terminated UTF-8 string.
@ -585,8 +581,8 @@ public:
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c ConvertToUTCTime() ensures that a time is UTC. /// @brief \c ConvertToUTCTime() ensures that a time is UTC.
/// ///
/// If the time zone is not UTC, the time is adjusted and the time zone set to be UTC. The value /// If the time zone is not UTC, the time is adjusted and the time zone set to be UTC. If the
/// is not modified if the time zone is already UTC or if the value has no time zone. /// time zone is already UTC, the value is not modified.
/// ///
/// @param time A pointer to the date-time value, which is modified in place. /// @param time A pointer to the date-time value, which is modified in place.
@ -596,8 +592,7 @@ public:
/// @brief \c ConvertToLocalTime() ensures that a time is local. /// @brief \c ConvertToLocalTime() ensures that a time is local.
/// ///
/// If the time zone is not the local zone, the time is adjusted and the time zone set to be local. /// If the time zone is not the local zone, the time is adjusted and the time zone set to be local.
/// The value is not modified if the time zone is already the local zone or if the value has no /// If the time zone is already the local zone, the value is not modified.
/// time zone.
/// ///
/// @param time A pointer to the date-time value, which is modified in place. /// @param time A pointer to the date-time value, which is modified in place.
@ -606,8 +601,6 @@ public:
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c CompareDateTime() compares the order of two date/time values. /// @brief \c CompareDateTime() compares the order of two date/time values.
/// ///
/// Both values are treated as in the same time zone if either has no time zone.
///
/// @param left The left-side date/time value. /// @param left The left-side date/time value.
/// ///
/// @param right The right-side date/time value. /// @param right The right-side date/time value.
@ -816,75 +809,6 @@ public:
XMP_OptionBits options, XMP_OptionBits options,
const tStringObj & catedStr ); const tStringObj & catedStr );
/// @brief \c ApplyTemplate() modifies a working XMP object according to a template object.
///
/// The XMP template can be used to add, replace or delete properties from the working XMP object.
/// This function replaces the previous \c AppendProperties() function, which is no longer available.
/// The actions that you specify determine how the template is applied. Each action can be applied
/// individually or combined; if you do not specify any actions, the properties and values in the working
/// XMP object do not change.
///
/// These actions are available:
/// \li Clear (\c #kXMPTemplate_ClearUnnamedProperties): Deletes top-level properties.
/// Any top-level property that is present in the template (even with empty value)
/// is retained. All other top-level properties in the working object are deleted.
///
/// \li Add (\c #kXMPTemplate_AddNewProperties): Adds new properties to the working object if the
/// template properties have values. See additional detail below.
///
/// \li Replace (\c #kXMPTemplate_ReplaceExistingProperties): Replaces the values of existing top-level
/// properties in the working XMP if the value forms match those in the template. Properties
/// with empty values in the template are ignored. If combined with Clear or Add actions,
/// those take precedence; values are cleared or added, rather than replaced.
///
/// \li Replace/Delete empty (\c #kXMPTemplate_ReplaceWithDeleteEmpty): Replaces values in the same way
/// as the simple Replace action, and also deletes properties if the value in the template is empty.
/// If combined with Clear or Add actions, those take precedence; values are cleared or added,
/// rather than replaced.
///
/// \li Include internal (\c #kXMPTemplate_IncludeInternalProperties): Performs specified action
/// on internal properties as well as external properties. By default, internal properties
/// are ignored for all actions.
///
/// The Add behavior depends on the type of property:
/// <ul>
/// <li> If a top-level property is not in the working XMP, and has a value in the template,
/// the property and value are added. Empty properties are not added. </li>
/// <li> If a property is in both the working XMP and template, the value forms must match, otherwise
/// the template is ignored for that property.</li>
/// <li> If a struct is present in both the working XMP and template, the individual fields of the
/// template struct are added as appropriate; that is, the logic is recursively applied to the fields.
/// Struct values are equivalent if they have the same fields with equivalent values. </li>
/// <li> If an array is present in both the working XMP and template, items from the template are
/// added if the value forms match. Array values match if they have sets of equivalent items,
/// regardless of order.</li>
/// <li> Alt-text arrays use the \c xml:lang qualifier as a key, adding languages that are missing. </li>
/// </ul>
/// Array item checking is n-squared; this can be time-intensive if the Replace option is
/// not specified. Each source item is checked to see if it already exists in the destination,
/// without regard to order or duplicates. Simple items are compared by value and \c xml:lang
/// qualifier; other qualifiers are ignored. Structs are recursively compared by field names,
/// without regard to field order. Arrays are compared by recursively comparing all items.
/// @param workingXMP The destination XMP object.
///
/// @param templateXMP The template to apply to the destination XMP object.
///
/// @param actions Option flags to control the copying. If none are specified, the properties and values
/// in the working XMP do not change. A logical OR of these bit-flag constants:
/// \li \c #kXMPTemplate_ClearUnnamedProperties -- Delete anything that is not in the template
/// \li \c #kXMPTemplate_AddNewProperties -- Add properties; see detailed description.
/// \li \c #kXMPTemplate_ReplaceExistingProperties -- Replace the values of existing properties.
/// \li \c #kXMPTemplate_ReplaceWithDeleteEmpty -- Replace the values of existing properties
/// and delete properties if the new value is empty.
/// \li \c #kXMPTemplate_IncludeInternalProperties -- Operate on internal properties as well as
/// external properties.
///
static void ApplyTemplate ( TXMPMeta<tStringObj> * workingXMP,
const TXMPMeta<tStringObj> & templateXMP,
XMP_OptionBits actions );
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c RemoveProperties() removes multiple properties from an XMP object. /// @brief \c RemoveProperties() removes multiple properties from an XMP object.
/// ///
@ -922,6 +846,82 @@ public:
XMP_StringPtr propName = 0, XMP_StringPtr propName = 0,
XMP_OptionBits options = 0 ); XMP_OptionBits options = 0 );
// ---------------------------------------------------------------------------------------------
/// @brief \c AppendProperties() adds or moves properties from one XMP object to another.
///
/// The default operation is to append only external properties that do not already exist in the
/// destination. Option flags allow you to add internal properties, and to merge values of
/// properties that exist in both the source and destination.
///
/// \li \c #kXMPUtil_DoAllProperties: Operate on all top-level properties, external and
/// internal. You can use this flag together with \c #kXMPUtil_ReplaceOldValues to replace the
/// values of existing top-level properties.
///
/// \li \c #kXMPUtil_ReplaceOldValues: Propagate all top-level properties from the source to
/// the destination, replacing any existing values. The values of properties in the
/// destination that are not in the source are not modified.<br>
/// The keep-or-replace-old notion also applies within structs and arrays. Top-level
/// properties are added to the destination if they do not already exist. If they do exist but
/// differ in form (simple/struct/array) then the destination is not modified. If the forms
/// match, simple properties are left unchanged, while structs and arrays are merged.<br>
/// Do not use this option when the processing is more complicated. <<than what??>>
///
/// \li \c #kXMPUtil_DeleteEmptyValues: An empty value in the source XMP causes the
/// corresponding destination property to be deleted. By default, empty values are treated in
/// the same way as non-empty values. An empty value is a simple empty string, an array with
/// no items,or a struct with no fields. Qualifiers are ignored.
///
/// The detailed behavior is defined by the following pseudo-code:
///
/// <pre>
/// AppendProperties ( sourceXMP, destXMP, options ):
/// doAll = options & kXMPUtil_DoAllProperties
/// replaceOld = options & kXMPUtil_ReplaceOldValues
/// deleteEmpty = options & kXMPUtil_DeleteEmptyValues
/// for all source schema (top level namespaces):
/// for all top level properties in sourceSchema:
/// if doAll or prop is external:
/// AppendSubtree ( sourceNode, destSchema, replaceOld, deleteEmpty )
///
/// AppendSubtree ( sourceNode, destParent, replaceOld, deleteEmpty ):
/// if deleteEmpty and source value is empty:
/// delete the corresponding child from destParent
/// else if sourceNode not in destParent (by name):
/// copy sourceNode's subtree to destParent
/// else if replaceOld:
/// delete subtree from destParent
/// copy sourceNode's subtree to destParent
/// else: // (Already exists in dest and not replacing, merge structs and arrays)
/// if sourceNode and destNode forms differ:
/// return, leave the destNode alone
/// else if form is a struct:
/// for each field in sourceNode:
/// AppendSubtree ( sourceNode.field, destNode, replaceOld )
/// else if form is an alt-text array:
/// copy new items by xml:lang value into the destination
/// else if form is an array:
/// copy new items by value into the destination, ignoring order and duplicates
/// </pre>
///
/// Array item checking is n-squared; this can be time-intensive if the replace-old options is
/// not specified. Each source item is checked to see if it already exists in the destination,
/// without regard to order or duplicates. Simple items are compared by value and \c xml:lang
/// qualifier; other qualifiers are ignored. Structs are recursively compared by field names,
/// without regard to field order. Arrays are compared by recursively comparing all items.
///
/// @param source The source XMP object.
///
/// @param dest The destination XMP object.
///
/// @param options Option flags to control the copying. A logical OR of these bit-flag constants:
/// \li \c kXMPUtil_DoAllProperties - Operate on internal properties in addition to external properties.
/// \li \c kXMPUtil_ReplaceOldValues - Replace the values of existing properties.
/// \li \c kXMPUtil_DeleteEmptyValues - Delete properties if the new value is empty.
static void AppendProperties ( const TXMPMeta<tStringObj> & source,
TXMPMeta<tStringObj> * dest,
XMP_OptionBits options = 0 );
// --------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------
/// @brief \c DuplicateSubtree() replicates a subtree from one XMP object into another. /// @brief \c DuplicateSubtree() replicates a subtree from one XMP object into another.
/// ///
@ -956,9 +956,7 @@ public:
// ============================================================================================= // =============================================================================================
private: // =============================================================================================
static void SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
}; // class TXMPUtils }; // class TXMPUtils

@ -3,7 +3,7 @@
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -28,18 +28,16 @@
/// \endcode /// \endcode
#include "XMP.hpp" // ! This must be the first include! #include "XMPSDK.hpp" // ! This must be the first include!
#define XMP_ClientBuild 1 #define XMP_ClientBuild 1
#if XMP_WinBuild #ifdef _MSC_VER
#if XMP_DebugBuild #if XMP_DebugBuild
#pragma warning ( push, 4 ) #pragma warning ( push, 4 )
#else #else
#pragma warning ( push, 3 ) #pragma warning ( push, 3 )
#endif #endif
#pragma warning ( disable : 4127 ) // conditional expression is constant
#pragma warning ( disable : 4189 ) // local variable is initialized but not referenced #pragma warning ( disable : 4189 ) // local variable is initialized but not referenced
#pragma warning ( disable : 4702 ) // unreachable code #pragma warning ( disable : 4702 ) // unreachable code
#pragma warning ( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning) #pragma warning ( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning)
@ -55,14 +53,10 @@
template class TXMPMeta <TXMP_STRING_TYPE>; template class TXMPMeta <TXMP_STRING_TYPE>;
template class TXMPIterator <TXMP_STRING_TYPE>; template class TXMPIterator <TXMP_STRING_TYPE>;
template class TXMPUtils <TXMP_STRING_TYPE>; template class TXMPUtils <TXMP_STRING_TYPE>;
#if XMP_INCLUDE_XMPFILES
#include "client-glue/TXMPFiles.incl_cpp"
template class TXMPFiles <TXMP_STRING_TYPE>;
#endif
#endif #endif
#if XMP_WinBuild #ifdef _MSC_VER
#pragma warning ( pop ) #pragma warning ( pop )
#endif #endif

@ -2,7 +2,7 @@
#define __XMP_Const_h__ 1 #define __XMP_Const_h__ 1
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -13,16 +13,9 @@
#include <stddef.h> #include <stddef.h>
#if XMP_MacBuild | XMP_iOSBuild // ! No stdint.h on Windows and some UNIXes. #if XMP_MacBuild // ! No stdint.h on Windows and some UNIXes.
#include <stdint.h> #include <stdint.h>
#endif #endif
#if XMP_UNIXBuild // hopefully an inttypes.h on all UNIXes...
#include <inttypes.h>
#endif
#ifndef XMP_MARKER_EXTENSIBILITY_BACKWARD_COMPATIBILITY
#define XMP_MARKER_EXTENSIBILITY_BACKWARD_COMPATIBILITY 1
#endif
#if __cplusplus #if __cplusplus
extern "C" { extern "C" {
@ -41,7 +34,7 @@ extern "C" {
// case only the declarations of the XMP_... types needs to change, not all of the uses. These // case only the declarations of the XMP_... types needs to change, not all of the uses. These
// types are used where fixed sizes are required in order to have a known ABI for a DLL build. // types are used where fixed sizes are required in order to have a known ABI for a DLL build.
#if XMP_MacBuild | XMP_iOSBuild #if XMP_MacBuild
typedef int8_t XMP_Int8; typedef int8_t XMP_Int8;
typedef int16_t XMP_Int16; typedef int16_t XMP_Int16;
@ -53,21 +46,7 @@ extern "C" {
typedef uint32_t XMP_Uns32; typedef uint32_t XMP_Uns32;
typedef uint64_t XMP_Uns64; typedef uint64_t XMP_Uns64;
#elif XMP_WinBuild #else
typedef signed char XMP_Int8;
typedef signed short XMP_Int16;
typedef signed long XMP_Int32;
typedef signed long long XMP_Int64;
typedef unsigned char XMP_Uns8;
typedef unsigned short XMP_Uns16;
typedef unsigned long XMP_Uns32;
typedef unsigned long long XMP_Uns64;
#elif XMP_UNIXBuild
#if ! XMP_64
typedef signed char XMP_Int8; typedef signed char XMP_Int8;
typedef signed short XMP_Int16; typedef signed short XMP_Int16;
@ -79,65 +58,23 @@ extern "C" {
typedef unsigned long XMP_Uns32; typedef unsigned long XMP_Uns32;
typedef unsigned long long XMP_Uns64; typedef unsigned long long XMP_Uns64;
#else
typedef signed char XMP_Int8;
typedef signed short XMP_Int16;
typedef signed int XMP_Int32;
typedef signed long long XMP_Int64;
typedef unsigned char XMP_Uns8;
typedef unsigned short XMP_Uns16;
typedef unsigned int XMP_Uns32;
typedef unsigned long long XMP_Uns64;
#endif
#else
#error "XMP environment error - must define one of XMP_MacBuild, XMP_WinBuild, XMP_UNIXBuild or XMP_iOSBuild"
#endif #endif
typedef XMP_Uns8 XMP_Bool; typedef XMP_Uns8 XMP_Bool;
const XMP_Uns8 kXMP_Bool_False = 0; /// An "ABI safe" pointer to the internal part of an XMP object. Use to pass an XMP object across
#define ConvertXMP_BoolToBool(a) (a) != kXMP_Bool_False
#define ConvertBoolToXMP_Bool(a) (a) ? !kXMP_Bool_False : kXMP_Bool_False
static const XMP_Uns8 Min_XMP_Uns8 = ( (XMP_Uns8) 0x00 );
static const XMP_Uns8 Max_XMP_Uns8 = ( (XMP_Uns8) 0xFF );
static const XMP_Uns16 Min_XMP_Uns16 = ( (XMP_Uns16) 0x00 );
static const XMP_Uns16 Max_XMP_Uns16 = ( (XMP_Uns16) 0xFFFF );
static const XMP_Uns32 Min_XMP_Uns32 = ( (XMP_Uns32) 0x00 );
static const XMP_Uns32 Max_XMP_Uns32 = ( (XMP_Uns32) 0xFFFFFFFF );
static const XMP_Uns64 Min_XMP_Uns64 = ( (XMP_Uns64) 0x00 );
static const XMP_Uns64 Max_XMP_Uns64 = ( (XMP_Uns64) 0xFFFFFFFFFFFFFFFFLL );
static const XMP_Int8 Min_XMP_Int8 = ( (XMP_Int8) 0x80 );
static const XMP_Int8 Max_XMP_Int8 = ( (XMP_Int8) 0x7F );
static const XMP_Int16 Min_XMP_Int16 = ( (XMP_Int16) 0x8000 );
static const XMP_Int16 Max_XMP_Int16 = ( (XMP_Int16) 0x7FFF );
static const XMP_Int32 Min_XMP_Int32 = ( (XMP_Int32) 0x80000000 );
static const XMP_Int32 Max_XMP_Int32 = ( (XMP_Int32) 0x7FFFFFFF );
static const XMP_Int64 Min_XMP_Int64 = ( (XMP_Int64) 0x8000000000000000LL );
static const XMP_Int64 Max_XMP_Int64 = ( (XMP_Int64) 0x7FFFFFFFFFFFFFFFLL );
/// @brief An "ABI safe" pointer to the internal part of an XMP object. Use to pass an XMP object across
/// client DLL boundaries. See \c TXMPMeta::GetInternalRef(). /// client DLL boundaries. See \c TXMPMeta::GetInternalRef().
typedef struct __XMPMeta__ * XMPMetaRef; typedef struct __XMPMeta__ * XMPMetaRef;
/// @brief An "ABI safe" pointer to the internal part of an XMP iteration object. Use to pass an XMP /// An "ABI safe" pointer to the internal part of an XMP iteration object. Use to pass an XMP
/// iteration object across client DLL boundaries. See \c TXMPIterator. /// iteration object across client DLL boundaries. See \c TXMPIterator.
typedef struct __XMPIterator__ * XMPIteratorRef; typedef struct __XMPIterator__ * XMPIteratorRef;
/// @brief An "ABI safe" pointer to the internal part of an XMP document operations object. Use to pass an /// An "ABI safe" pointer to the internal part of an XMP document operations object. Use to pass an
/// XMP document operations object across client DLL boundaries. See \c TXMPDocOps. /// XMP document operations object across client DLL boundaries. See \c TXMPDocOps.
typedef struct __XMPDocOps__ * XMPDocOpsRef; typedef struct __XMPDocOps__ * XMPDocOpsRef;
/// @brief An "ABI safe" pointer to the internal part of an XMP file-handling object. Use to pass an XMP /// An "ABI safe" pointer to the internal part of an XMP file-handling object. Use to pass an XMP
/// file-handling object across client DLL boundaries. See \c TXMPFiles. /// file-handling object across client DLL boundaries. See \c TXMPFiles.
typedef struct __XMPFiles__ * XMPFilesRef; typedef struct __XMPFiles__ * XMPFilesRef;
@ -159,8 +96,7 @@ typedef struct __XMPFiles__ * XMPFilesRef;
/// loop termination. /// loop termination.
/// \typedef XMP_OptionBits /// \typedef XMP_OptionBits
/// \brief The type for a collection of 32 flag bits. /// \brief The type for a collection of 32 flag bits. Individual flags are defined as enum value bit
/// @details Individual flags are defined as enum value bit
/// masks; see \c #kXMP_PropValueIsURI and following. A number of macros provide common set or set /// masks; see \c #kXMP_PropValueIsURI and following. A number of macros provide common set or set
/// operations, such as \c XMP_PropIsSimple. For other tests use an expression like <code>options & /// operations, such as \c XMP_PropIsSimple. For other tests use an expression like <code>options &
/// kXMP_<theOption></code>. When passing multiple option flags use the bitwise-OR operator. '|', /// kXMP_<theOption></code>. When passing multiple option flags use the bitwise-OR operator. '|',
@ -184,8 +120,8 @@ typedef XMP_Uns32 XMP_OptionBits; // Used as 32 individual bits.
#define kXMP_TrueStr "True" // Serialized XMP spellings, not for the type bool. #define kXMP_TrueStr "True" // Serialized XMP spellings, not for the type bool.
#define kXMP_FalseStr "False" #define kXMP_FalseStr "False"
///@brief Type for yes/no/maybe answers. The values are picked to allow Boolean-like usage. The yes /// Type for yes/no/maybe answers. The values are picked to allow Boolean-like usage. The yes and
///values are true (non-zero), the no value is false (zero). /// values are true (non-zero), the no value is false (zero).
enum { enum {
/// The part or parts have definitely changed. /// The part or parts have definitely changed.
kXMPTS_Yes = 1, kXMPTS_Yes = 1,
@ -240,18 +176,9 @@ struct XMP_DateTime {
/// The second in the range 0..59. /// The second in the range 0..59.
XMP_Int32 second; XMP_Int32 second;
/// Is the date portion meaningful?
XMP_Bool hasDate;
/// Is the time portion meaningful?
XMP_Bool hasTime;
/// Is the time zone meaningful?
XMP_Bool hasTimeZone;
/// The "sign" of the time zone, \c #kXMP_TimeIsUTC (0) means UTC, \c #kXMP_TimeWestOfUTC (-1) /// The "sign" of the time zone, \c #kXMP_TimeIsUTC (0) means UTC, \c #kXMP_TimeWestOfUTC (-1)
/// is west, \c #kXMP_TimeEastOfUTC (+1) is east. /// is west, \c #kXMP_TimeEastOfUTC (+1) is east.
XMP_Int8 tzSign; XMP_Int32 tzSign;
/// The time zone hour in the range 0..23. /// The time zone hour in the range 0..23.
XMP_Int32 tzHour; XMP_Int32 tzHour;
@ -262,11 +189,6 @@ struct XMP_DateTime {
/// Nanoseconds within a second, often left as zero. /// Nanoseconds within a second, often left as zero.
XMP_Int32 nanoSecond; XMP_Int32 nanoSecond;
#if __cplusplus
XMP_DateTime() : year(0), month(0), day(0), hour(0), minute(0), second(0),
hasDate(false),hasTime(false), hasTimeZone(false), tzSign(0), tzHour(0), tzMinute(0), nanoSecond(0){};
#endif
}; };
/// Constant values for \c XMP_DateTime::tzSign field. /// Constant values for \c XMP_DateTime::tzSign field.
@ -279,11 +201,6 @@ enum {
kXMP_TimeEastOfUTC = +1 kXMP_TimeEastOfUTC = +1
}; };
#define XMPDateTime_IsDateOnly(dt) ((dt).hasDate & (! (dt).hasTime))
#define XMPDateTime_IsTimeOnly(dt) ((dt).hasTime & (! (dt).hasDate))
#define XMPDateTime_ClearTimeZone(dt) { (dt).hasTimeZone = (dt).tzSign = (dt).tzHour = (dt).tzMinute = 0; }
// ================================================================================================= // =================================================================================================
// Standard namespace URI constants // Standard namespace URI constants
// ================================ // ================================
@ -341,20 +258,14 @@ enum {
#define kXMP_NS_JP2K "http://ns.adobe.com/jp2k/1.0/" #define kXMP_NS_JP2K "http://ns.adobe.com/jp2k/1.0/"
#define kXMP_NS_CameraRaw "http://ns.adobe.com/camera-raw-settings/1.0/" #define kXMP_NS_CameraRaw "http://ns.adobe.com/camera-raw-settings/1.0/"
#define kXMP_NS_DM "http://ns.adobe.com/xmp/1.0/DynamicMedia/" #define kXMP_NS_DM "http://ns.adobe.com/xmp/1.0/DynamicMedia/"
#define kXMP_NS_Script "http://ns.adobe.com/xmp/1.0/Script/"
#define kXMP_NS_ASF "http://ns.adobe.com/asf/1.0/" #define kXMP_NS_ASF "http://ns.adobe.com/asf/1.0/"
#define kXMP_NS_WAV "http://ns.adobe.com/xmp/wav/1.0/" #define kXMP_NS_WAV "http://ns.adobe.com/xmp/wav/1.0/"
#define kXMP_NS_BWF "http://ns.adobe.com/bwf/bext/1.0/"
#define kXMP_NS_AEScart "http://ns.adobe.com/aes/cart/"
#define kXMP_NS_RIFFINFO "http://ns.adobe.com/riff/info/"
#define kXMP_NS_iXML "http://ns.adobe.com/ixml/1.0/"
#define kXMP_NS_XMP_Note "http://ns.adobe.com/xmp/note/" #define kXMP_NS_XMP_Note "http://ns.adobe.com/xmp/note/"
#define kXMP_NS_AdobeStockPhoto "http://ns.adobe.com/StockPhoto/1.0/" #define kXMP_NS_AdobeStockPhoto "http://ns.adobe.com/StockPhoto/1.0/"
#define kXMP_NS_CreatorAtom "http://ns.adobe.com/creatorAtom/1.0/" #define kXMP_NS_CreatorAtom "http://ns.adobe.com/creatorAtom/1.0/"
#define kXMP_NS_ExifEX "http://cipa.jp/exif/1.0/"
/// \name XML namespace constants for qualifiers and structured property fields. /// \name XML namespace constants for qualifiers and structured property fields.
/// @{ /// @{
/// ///
@ -408,9 +319,6 @@ enum {
/// \def kXMP_NS_IPTCCore /// \def kXMP_NS_IPTCCore
/// \brief The XML namespace for the IPTC Core schema. /// \brief The XML namespace for the IPTC Core schema.
/// ///
/// \def kXMP_NS_IPTCExt
/// \brief The XML namespace for the IPTC Extension schema.
///
/// \def kXMP_NS_RDF /// \def kXMP_NS_RDF
/// \brief The XML namespace for RDF. /// \brief The XML namespace for RDF.
/// ///
@ -422,12 +330,9 @@ enum {
#define kXMP_NS_DC "http://purl.org/dc/elements/1.1/" #define kXMP_NS_DC "http://purl.org/dc/elements/1.1/"
#define kXMP_NS_IPTCCore "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" #define kXMP_NS_IPTCCore "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
#define kXMP_NS_IPTCExt "http://iptc.org/std/Iptc4xmpExt/2008-02-29/"
#define kXMP_NS_DICOM "http://ns.adobe.com/DICOM/" #define kXMP_NS_DICOM "http://ns.adobe.com/DICOM/"
#define kXMP_NS_PLUS "http://ns.useplus.org/ldf/xmp/1.0/"
#define kXMP_NS_PDFA_Schema "http://www.aiim.org/pdfa/ns/schema#" #define kXMP_NS_PDFA_Schema "http://www.aiim.org/pdfa/ns/schema#"
#define kXMP_NS_PDFA_Property "http://www.aiim.org/pdfa/ns/property#" #define kXMP_NS_PDFA_Property "http://www.aiim.org/pdfa/ns/property#"
#define kXMP_NS_PDFA_Type "http://www.aiim.org/pdfa/ns/type#" #define kXMP_NS_PDFA_Type "http://www.aiim.org/pdfa/ns/type#"
@ -573,7 +478,7 @@ enum {
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief Option bit flags for the \c TXMPMeta property accessor functions. /// Option bit flags for the \c TXMPMeta property accessor functions.
enum { enum {
/// The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED /// The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED
@ -666,8 +571,8 @@ enum {
#define kXMP_SchemaNode ((XMP_OptionBits)0x80000000UL) #define kXMP_SchemaNode ((XMP_OptionBits)0x80000000UL)
/// @brief Option bit flags for the \c TXMPMeta property setting functions. /// Option bit flags for the \c TXMPMeta property setting functions. These option bits are shared
/// @details These option bits are shared with the accessor functions: /// with the accessor functions:
/// \li \c #kXMP_PropValueIsURI /// \li \c #kXMP_PropValueIsURI
/// \li \c #kXMP_PropValueIsStruct /// \li \c #kXMP_PropValueIsStruct
/// \li \c #kXMP_PropValueIsArray /// \li \c #kXMP_PropValueIsArray
@ -695,7 +600,7 @@ enum {
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief Option bit flags for \c TXMPMeta::ParseFromBuffer(). /// Option bit flags for \c TXMPMeta::ParseFromBuffer().
enum { enum {
/// Require a surrounding \c x:xmpmeta element. /// Require a surrounding \c x:xmpmeta element.
@ -709,7 +614,7 @@ enum {
}; };
/// @brief Option bit flags for \c TXMPMeta::SerializeToBuffer(). /// Option bit flags for \c TXMPMeta::SerializeToBuffer().
enum { enum {
// *** Option to remove empty struct/array, or leaf with empty value? // *** Option to remove empty struct/array, or leaf with empty value?
@ -723,24 +628,21 @@ enum {
/// Use a compact form of RDF. /// Use a compact form of RDF.
kXMP_UseCompactFormat = 0x0040UL, kXMP_UseCompactFormat = 0x0040UL,
/// Use a canonical form of RDF.
kXMP_UseCanonicalFormat = 0x0080UL,
/// Include a padding allowance for a thumbnail image. /// Include a padding allowance for a thumbnail image.
kXMP_IncludeThumbnailPad = 0x0100UL, kXMP_IncludeThumbnailPad = 0x0100UL,
/// The padding parameter is the overall packet length. /// The padding parameter is the overall packet length.
kXMP_ExactPacketLength = 0x0200UL, kXMP_ExactPacketLength = 0x0200UL,
/// Show aliases as XML comments.
kXMP_WriteAliasComments = 0x0400UL,
/// Omit all formatting whitespace. /// Omit all formatting whitespace.
kXMP_OmitAllFormatting = 0x0800UL, kXMP_OmitAllFormatting = 0x0800UL,
/// Omit the x:xmpmeta element surrounding the rdf:RDF element. /// Omit the x:xmpmeta element surrounding the rdf:RDF element.
kXMP_OmitXMPMetaElement = 0x1000UL, kXMP_OmitXMPMetaElement = 0x1000UL,
/// Include a rdf Hash and Merged flag in x:xmpmeta element.
kXMP_IncludeRDFHash = 0x2000UL,
_XMP_LittleEndian_Bit = 0x0001UL, // ! Don't use directly, see the combined values below! _XMP_LittleEndian_Bit = 0x0001UL, // ! Don't use directly, see the combined values below!
_XMP_UTF16_Bit = 0x0002UL, _XMP_UTF16_Bit = 0x0002UL,
_XMP_UTF32_Bit = 0x0004UL, _XMP_UTF32_Bit = 0x0004UL,
@ -767,7 +669,7 @@ enum {
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief Option bit flags for \c TXMPIterator construction. /// Option bit flags for \c TXMPIterator construction.
enum { enum {
/// The low 8 bits are an enum of what data structure to iterate. /// The low 8 bits are an enum of what data structure to iterate.
@ -791,12 +693,15 @@ enum {
/// Return just the leaf part of the path, default is the full path. /// Return just the leaf part of the path, default is the full path.
kXMP_IterJustLeafName = 0x0400UL, kXMP_IterJustLeafName = 0x0400UL,
/// Include aliases, default is just actual properties.
kXMP_IterIncludeAliases = 0x0800UL,
/// Omit all qualifiers. /// Omit all qualifiers.
kXMP_IterOmitQualifiers = 0x1000UL kXMP_IterOmitQualifiers = 0x1000UL
}; };
/// @brief Option bit flags for \c TXMPIterator::Skip(). /// Option bit flags for \c TXMPIterator::Skip().
enum { enum {
/// Skip the subtree below the current node. /// Skip the subtree below the current node.
@ -808,9 +713,8 @@ enum {
}; };
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// Option bit flags for \c TXMPUtils::CatenateArrayItems() and \c TXMPUtils::SeparateArrayItems().
/// @brief Option bit flags for \c TXMPUtils::CatenateArrayItems() and \c TXMPUtils::SeparateArrayItems(). /// These option bits are shared with the accessor functions:
/// @details These option bits are shared with the accessor functions:
/// \li \c #kXMP_PropValueIsArray, /// \li \c #kXMP_PropValueIsArray,
/// \li \c #kXMP_PropArrayIsOrdered, /// \li \c #kXMP_PropArrayIsOrdered,
/// \li \c #kXMP_PropArrayIsAlternate, /// \li \c #kXMP_PropArrayIsAlternate,
@ -822,27 +726,7 @@ enum {
}; };
/// @brief Option bit flags for \c TXMPUtils::ApplyTemplate(). /// Option bit flags for \c TXMPUtils::RemoveProperties() and \c TXMPUtils::AppendProperties().
enum {
/// Do all properties, default is just external properties.
kXMPTemplate_IncludeInternalProperties = 0x0001UL,
/// Perform a Replace operation, add new properties and modify existing ones.
kXMPTemplate_ReplaceExistingProperties = 0x0002UL,
/// Similar to Replace, also delete if the template has an empty value.
kXMPTemplate_ReplaceWithDeleteEmpty = 0x0004UL,
/// Perform an Add operation, add properties if they don't already exist.
kXMPTemplate_AddNewProperties = 0x0008UL,
/// Perform a Clear operation, keep named properties and delete everything else.
kXMPTemplate_ClearUnnamedProperties = 0x0010UL
};
/// @brief Option bit flags for \c TXMPUtils::RemoveProperties() and \c TXMPUtils::AppendProperties().
enum { enum {
/// Do all properties, default is just external properties. /// Do all properties, default is just external properties.
@ -863,10 +747,7 @@ enum {
// Types and Constants for XMPFiles // Types and Constants for XMPFiles
// ================================ // ================================
/// @brief Seek mode constants for use with XMP_IO and inside XMPFiles library code. /// File format constants for use with XMPFiles.
enum SeekMode { kXMP_SeekFromStart, kXMP_SeekFromCurrent, kXMP_SeekFromEnd };
/// @brief File format constants for use with XMPFiles.
enum { enum {
// ! Hex used to avoid gcc warnings. Leave the constants so the text reads big endian. There // ! Hex used to avoid gcc warnings. Leave the constants so the text reads big endian. There
@ -921,14 +802,10 @@ enum {
kXMP_MPEG2File = 0x4D503220UL, kXMP_MPEG2File = 0x4D503220UL,
/// Public file format constant: 'MP4 ', ISO 14494-12 and -14 /// Public file format constant: 'MP4 ', ISO 14494-12 and -14
kXMP_MPEG4File = 0x4D503420UL, kXMP_MPEG4File = 0x4D503420UL,
/// Public file format constant: 'MXF '
kXMP_MXFFile = 0x4D584620UL,
/// Public file format constant: 'WMAV', Windows Media Audio and Video /// Public file format constant: 'WMAV', Windows Media Audio and Video
kXMP_WMAVFile = 0x574D4156UL, kXMP_WMAVFile = 0x574D4156UL,
/// Public file format constant: 'AIFF' /// Public file format constant: 'AIFF'
kXMP_AIFFFile = 0x41494646UL, kXMP_AIFFFile = 0x41494646UL,
/// Public file format constant: 'RED ', RED file format
kXMP_REDFile = 0x52454420UL,
/// Public file format constant: 'P2 ', a collection not really a single file /// Public file format constant: 'P2 ', a collection not really a single file
kXMP_P2File = 0x50322020UL, kXMP_P2File = 0x50322020UL,
/// Public file format constant: 'XDCF', a collection not really a single file /// Public file format constant: 'XDCF', a collection not really a single file
@ -941,10 +818,6 @@ enum {
kXMP_AVCHDFile = 0x41564844UL, kXMP_AVCHDFile = 0x41564844UL,
/// Public file format constant: 'SHDV', a collection not really a single file /// Public file format constant: 'SHDV', a collection not really a single file
kXMP_SonyHDVFile = 0x53484456UL, kXMP_SonyHDVFile = 0x53484456UL,
/// Public file format constant: 'CNXF', a collection not really a single file
kXMP_CanonXFFile = 0x434E5846UL,
/// Public file format constant: 'AVCU', a collection not really a single file
kXMP_AVCUltraFile = 0x41564355UL,
/// Public file format constant: 'HTML' /// Public file format constant: 'HTML'
kXMP_HTMLFile = 0x48544D4CUL, kXMP_HTMLFile = 0x48544D4CUL,
@ -952,8 +825,6 @@ enum {
kXMP_XMLFile = 0x584D4C20UL, kXMP_XMLFile = 0x584D4C20UL,
/// Public file format constant: 'text' /// Public file format constant: 'text'
kXMP_TextFile = 0x74657874UL, kXMP_TextFile = 0x74657874UL,
/// Public file format constant: 'SVG '
kXMP_SVGFile = 0x53564720UL,
// ------------------------------- // -------------------------------
// Adobe application file formats. // Adobe application file formats.
@ -992,14 +863,14 @@ typedef XMP_Uns32 XMP_FileFormat;
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief Byte-order masks, do not use directly /// Byte-order masks, do not use directly
enum { enum {
kXMP_CharLittleEndianMask = 1, kXMP_CharLittleEndianMask = 1,
kXMP_Char16BitMask = 2, kXMP_Char16BitMask = 2,
kXMP_Char32BitMask = 4 kXMP_Char32BitMask = 4
}; };
/// @brief Constants to allow easy testing for 16/32 bit and big/little endian. /// Constants to allow easy testing for 16/32 bit and big/little endian.
enum { enum {
/// 8-bit /// 8-bit
kXMP_Char8Bit = 0, kXMP_Char8Bit = 0,
@ -1064,7 +935,7 @@ enum {
/// \brief Constant for an unknown packet length within a file. /// \brief Constant for an unknown packet length within a file.
#define kXMPFiles_UnknownLength ((XMP_Int32)-1) #define kXMPFiles_UnknownLength ((XMP_Int32)-1)
/// @brief XMP packet description /// XMP packet description
struct XMP_PacketInfo { struct XMP_PacketInfo {
/// Packet offset in the file in bytes, -1 if unknown. /// Packet offset in the file in bytes, -1 if unknown.
@ -1090,7 +961,7 @@ struct XMP_PacketInfo {
}; };
/// @brief Version of the XMP_PacketInfo type /// Version of the XMP_PacketInfo type
enum { enum {
/// Version of the XMP_PacketInfo type /// Version of the XMP_PacketInfo type
kXMP_PacketInfoVersion = 3 kXMP_PacketInfoVersion = 3
@ -1098,15 +969,62 @@ enum {
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief Option bit flags for \c TXMPFiles::Initialize(). /// Values for \c XMP_ThumbnailInfo::tnailFormat.
enum { enum {
/// Ignore non-XMP text that uses an undefined "local" encoding. /// The thumbnail data has an unknown format.
kXMPFiles_IgnoreLocalText = 0x0002, kXMP_UnknownTNail = 0,
/// Combination of flags necessary for server products using XMPFiles. /// The thumbnail data is a JPEG stream, presumably compressed.
kXMPFiles_ServerMode = kXMPFiles_IgnoreLocalText kXMP_JPEGTNail = 1,
/// The thumbnail data is a TIFF stream, presumably uncompressed.
kXMP_TIFFTNail = 2,
/// The thumbnail data is in the format of Photoshop Image Resource 1036.
kXMP_PShopTNail = 3
}; };
/// @brief Option bit flags for \c TXMPFiles::GetFormatInfo(). /// Thumbnail descriptor
struct XMP_ThumbnailInfo {
/// The format of the containing file.
XMP_FileFormat fileFormat;
/// Full image size in pixels.
XMP_Uns32 fullWidth, fullHeight;
/// Thumbnail image size in pixels.
XMP_Uns32 tnailWidth, tnailHeight;
/// Orientation of full image and thumbnail, as defined by Exif for tag 274.
XMP_Uns16 fullOrientation, tnailOrientation;
/// Raw image data from the host file, valid for life of the owning \c XMPFiles object. Do not modify!
const XMP_Uns8 * tnailImage;
/// The size in bytes of the thumbnail image data.
XMP_Uns32 tnailSize;
/// The format of the thumbnail image data.
XMP_Uns8 tnailFormat;
/// Padding to make the struct's size be a multiple 4.
XMP_Uns8 pad1, pad2, pad3;
/// Default constructor.
XMP_ThumbnailInfo() : fileFormat(kXMP_UnknownFile), fullWidth(0), fullHeight(0),
tnailWidth(0), tnailHeight(0), fullOrientation(0), tnailOrientation(0),
tnailImage(0), tnailSize(0), tnailFormat(kXMP_UnknownTNail) {};
};
/// Version of the XMP_ThumbnailInfo type
enum {
/// Version of the XMP_ThumbnailInfo type
kXMP_ThumbnailInfoVersion = 1
};
// -------------------------------------------------------------------------------------------------
/// Option bit flags for \c TXMPFiles::Initialize().
enum {
/// Do not initialize QuickTime, the client will.
kXMPFiles_NoQuickTimeInit = 0x0001
};
/// Option bit flags for \c TXMPFiles::GetFormatInfo().
enum { enum {
/// Can inject first-time XMP into an existing file. /// Can inject first-time XMP into an existing file.
@ -1130,6 +1048,9 @@ enum {
/// File handler returns raw XMP packet information. /// File handler returns raw XMP packet information.
kXMPFiles_ReturnsRawPacket = 0x00000040, kXMPFiles_ReturnsRawPacket = 0x00000040,
/// File handler returns native thumbnail.
kXMPFiles_ReturnsTNail = 0x00000080,
/// The file handler does the file open and close. /// The file handler does the file open and close.
kXMPFiles_HandlerOwnsFile = 0x00000100, kXMPFiles_HandlerOwnsFile = 0x00000100,
@ -1143,17 +1064,11 @@ enum {
kXMPFiles_UsesSidecarXMP = 0x00000800, kXMPFiles_UsesSidecarXMP = 0x00000800,
/// The format is folder oriented, for example the P2 video format. /// The format is folder oriented, for example the P2 video format.
kXMPFiles_FolderBasedFormat = 0x00001000, kXMPFiles_FolderBasedFormat = 0x00001000
/// The file Handler is capable of notifying progress notifications
kXMPFiles_CanNotifyProgress = 0x00002000,
/// The plugin handler is not capable for delay loading
kXMPFiles_NeedsPreloading = 0x00004000,
}; };
/// @brief Option bit flags for \c TXMPFiles::OpenFile(). /// Option bit flags for \c TXMPFiles::OpenFile().
enum { enum {
/// Open for read-only access. /// Open for read-only access.
@ -1165,10 +1080,10 @@ enum {
/// Only the XMP is wanted, allows space/time optimizations. /// Only the XMP is wanted, allows space/time optimizations.
kXMPFiles_OpenOnlyXMP = 0x00000004, kXMPFiles_OpenOnlyXMP = 0x00000004,
/// Force use of the given handler (format), do not even verify the format. /// Cache thumbnail if possible, \c TXMPFiles::GetThumbnail() will be called.
kXMPFiles_ForceGivenHandler = 0x00000008, kXMPFiles_OpenCacheTNail = 0x00000008,
/// Be strict about only attempting to use the designated file handler, no fallback to other handlers. /// Be strict about locating XMP and reconciling with other forms.
kXMPFiles_OpenStrictly = 0x00000010, kXMPFiles_OpenStrictly = 0x00000010,
/// Require the use of a smart handler. /// Require the use of a smart handler.
@ -1183,38 +1098,30 @@ enum {
/// Attempt to repair a file opened for update, default is to not open (throw an exception). /// Attempt to repair a file opened for update, default is to not open (throw an exception).
kXMPFiles_OpenRepairFile = 0x00000100, kXMPFiles_OpenRepairFile = 0x00000100,
/// When updating a file, spend the effort necessary to optimize file layout. /// Set if calling from background thread.
kXMPFiles_OptimizeFileLayout = 0x00000200 kXMPFiles_OpenInBackground = 0x10000000
}; };
/// @brief Option bit flags for \c TXMPFiles::CloseFile(). // A note about kXMPFiles_OpenInBackground. The XMPFiles handler for .mov files currently uses
// QuickTime. On Macintosh, calls to Enter/ExitMovies versus Enter/ExitMoviesOnThread must be made.
// This option is used to signal background use so that the .mov handler can behave appropriately.
/// Option bit flags for \c TXMPFiles::CloseFile().
enum { enum {
/// Write into a temporary file and swap for crash safety. /// Write into a temporary file and swap for crash safety.
kXMPFiles_UpdateSafely = 0x0001 kXMPFiles_UpdateSafely = 0x0001
}; };
// ================================================================================================= // =================================================================================================
// Error notification and Exceptions // Exception codes
// ================================= // ===============
/// \name Error notification and Exceptions /// \name Errors Exception handling
/// @{ /// @{
/// ///
/// @details From the beginning through version 5.5, XMP Tookit errors result in throwing an \c XMP_Error /// XMP Tookit errors result in throwing an \c XMP_Error exception. Any exception thrown within the
/// exception. For the most part exceptions were thrown early and thus API calls aborted as soon as /// XMP Toolkit is caught in the toolkit and rethrown as an \c XMP_Error.
/// an error was detected. Starting in version 5.5, support has been added for notifications of
/// errors arising in calls to \c TXMPMeta and \c TXMPFiles functions.
///
/// A client can register an error notification callback function for a \c TXMPMeta or \c TXMPFiles
/// object. This can be done as a global default or individually to each object. The global default
/// applies to all objects created after it is registered. Within the object there is no difference
/// between the global default or explicitly registered callback. The callback function returns a
/// \c bool value indicating if recovery should be attempted (true) or an exception thrown (false).
/// If no callback is registered, a best effort at recovery and continuation will be made with an
/// exception thrown if recovery is not possible. More details can be found in the \c TXMPMeta and
/// \c TXMPFiles documentation.
/// ///
/// The \c XMP_Error class contains a numeric code and an English explanation. New numeric codes may /// The \c XMP_Error class contains a numeric code and an English explanation. New numeric codes may
/// be added at any time. There are typically many possible explanations for each numeric code. The /// be added at any time. There are typically many possible explanations for each numeric code. The
@ -1222,93 +1129,7 @@ enum {
/// ///
/// \note The explanation string is for debugging use only. It must not be shown to users in a /// \note The explanation string is for debugging use only. It must not be shown to users in a
/// final product. It is written for developers not users, and never localized. /// final product. It is written for developers not users, and never localized.
typedef XMP_Uns8 XMP_ErrorSeverity;
/// @brief Severity codes for error notifications
enum {
/// Partial recovery and continuation is possible.
kXMPErrSev_Recoverable = 0,
/// Recovery is not possible, an exception will be thrown aborting the API call.
kXMPErrSev_OperationFatal = 1,
/// Recovery is not possible, an exception will be thrown, the file is corrupt and possibly unusable.
kXMPErrSev_FileFatal = 2,
/// Recovery is not possible, an exception will be thrown, the entire process should be aborted.
kXMPErrSev_ProcessFatal = 3
};
// -------------------------------------------------------------------------------------------------
/// @brief The signature of a client-defined callback for TXMPMeta error notifications.
///
/// @param context A pointer used to carry client-private context.
///
/// @param severity The severity of the error, see the \c XMP_ErrorSeverity values.
///
/// @param cause A numeric code for the cause of the error, from the XMP_Error exception codes.
/// Codes used with TXMPMeta error notifications:
/// \li \c kXMPErr_BadXML - An XML syntax error found during parsing.
/// \li \c kXMPErr_BadRDF - A syntax or semantic parsing error in the XMP subset of RDF.
/// \li \c kXMPErr_BadXMP - A semantic XMP data model error.
/// \li \c kXMPErr_BadValue - An XMP value error, wrong type, out of range, etc.
/// \li \c kXMPErr_NoMemory - A heap allocation failure.
///
/// @param message An explanation of the error, for debugging use only. This should not be displayed
/// to users in a final product.
///
/// @return True if the operation should continue with a best effort attempt at recovery, false if
/// it should be aborted with an exception thrown from the library back to the original caller.
/// Recovery is possible only if the severity is kXMPErrSev_Recoverable, an exception will be
/// thrown on return from the callback in all other cases.
/// ///
/// @see \c TXMPMeta::SetDefaultErrorCallback() and \c TXMPMeta::SetErrorCallback()
typedef bool (* XMPMeta_ErrorCallbackProc) ( void* context, XMP_ErrorSeverity severity, XMP_Int32 cause, XMP_StringPtr message );
// -------------------------------------------------------------------------------------------------
/// @brief The signature of a client-defined callback for TXMPFiles error notifications.
///
/// @param context A pointer used to carry client-private context.
///
/// @param filePath The path for the file involved in the error.
///
/// @param severity The severity of the error, see the \c XMP_ErrorSeverity values.
///
/// @param cause A numeric code for the cause of the error, from the XMP_Error exception codes.
/// Codes used with TXMPFiles error notifications:
/// \li \c kXMPErr_NoFile - A file does not exist
/// \li \c kXMPErr_FilePermission - A file exists but cannot be opened
/// \li \c kXMPErr_FilePathNotAFile - A path exists which is not a file
/// \li \c dXMPErr_RejectedFileExtension - Any Operation called on rejected file extension
/// \li \c KXMPErr_NoFileHandler - No suitable handler is found for the file
/// \li \c kXMPErr_DiskSpace - A file write fails due to lack of disk space
/// \li \c kXMPErr_ReadError - A file read fails
/// \li \c kXMPErr_WriteError - A file write fails for some other reason than space
/// \li \c kXMPErr_BadFileFormat - A file is corrupt or ill-formed
/// \li \c kXMPErr_BadBlockFormat - A portion of a file is corrupt or ill-formed
/// \li \c kXMPErr_BadValue - An XMP or non-XMP metadata item has an invalid value
/// \li \c kXMPErr_NoMemory - A heap allocation failure
///
/// @param message An explanation of the error, for debugging use only. This should not be displayed
/// to users in a final product.
///
/// @return True if the operation should continue with a best effort attempt at recovery, false if
/// it should be aborted with an exception thrown from the library back to the original caller.
/// Recovery is possible only if the severity is kXMPErrSev_Recoverable, an exception will be
/// thrown on return from the callback in all other cases.
///
/// @see \c TXMPFiles::SetDefaultErrorCallback() and \c TXMPFiles::SetErrorCallback()
typedef bool (* XMPFiles_ErrorCallbackProc) ( void* context, XMP_StringPtr filePath, XMP_ErrorSeverity severity, XMP_Int32 cause, XMP_StringPtr message );
// -------------------------------------------------------------------------------------------------
/// Internal: The signatures of client-side wrappers for the error notification callbacks.
typedef XMP_Bool (* XMPMeta_ErrorCallbackWrapper) ( XMPMeta_ErrorCallbackProc clientProc, void* context,
XMP_ErrorSeverity severity, XMP_Int32 cause, XMP_StringPtr message );
typedef XMP_Bool (* XMPFiles_ErrorCallbackWrapper) ( XMPFiles_ErrorCallbackProc clientProc, void* context,
XMP_StringPtr filePath, XMP_ErrorSeverity severity,
XMP_Int32 cause, XMP_StringPtr message );
/// XMP Toolkit error, associates an error code with a descriptive error string. /// XMP Toolkit error, associates an error code with a descriptive error string.
class XMP_Error { class XMP_Error {
@ -1320,7 +1141,7 @@ public:
/// ///
/// @param _errMsg The descriptive string, for debugging use only. It must not be shown to users /// @param _errMsg The descriptive string, for debugging use only. It must not be shown to users
/// in a final product. It is written for developers, not users, and never localized. /// in a final product. It is written for developers, not users, and never localized.
XMP_Error ( XMP_Int32 _id, XMP_StringPtr _errMsg ) : id(_id), errMsg(_errMsg), notified(false) {}; XMP_Error ( XMP_Int32 _id, XMP_StringPtr _errMsg ) : id(_id), errMsg(_errMsg) {};
/// Retrieves the numeric code from an XMP_Error. /// Retrieves the numeric code from an XMP_Error.
inline XMP_Int32 GetID() const { return id; }; inline XMP_Int32 GetID() const { return id; };
@ -1328,30 +1149,19 @@ public:
/// Retrieves the descriptive string from an XMP_Error. /// Retrieves the descriptive string from an XMP_Error.
inline XMP_StringPtr GetErrMsg() const { return errMsg; }; inline XMP_StringPtr GetErrMsg() const { return errMsg; };
/// Retrieves the information whether particular error is notified or not
inline XMP_Bool IsNotified() const { return notified; }
/// Sets the notification status for an error
inline void SetNotified() { notified = true; };
private: private:
/// Exception code. See constants \c #kXMPErr_Unknown and following. /// Exception code. See constants \c #kXMPErr_Unknown and following.
XMP_Int32 id; XMP_Int32 id;
/// Descriptive string, for debugging use only. It must not be shown to users in a final /// Descriptive string, for debugging use only. It must not be shown to users in a final
/// product. It is written for developers, not users, and never localized. /// product. It is written for developers, not users, and never localized.
XMP_StringPtr errMsg; XMP_StringPtr errMsg;
/// Variable to store whether this particular error is notified to user or not
XMP_Bool notified;
}; };
/// @brief XMP_Error exception code constants /// Exception code constants
enum { enum {
// -------------------- // --------------------
/// Generic error codes. // Generic error codes.
/// No error
kXMPErr_NoError = -1,
/// Generic unknown error /// Generic unknown error
kXMPErr_Unknown = 0, kXMPErr_Unknown = 0,
@ -1385,8 +1195,6 @@ enum {
kXMPErr_UnknownException = 14, kXMPErr_UnknownException = 14,
/// Generic out-of-memory error /// Generic out-of-memory error
kXMPErr_NoMemory = 15, kXMPErr_NoMemory = 15,
/// Progress reporting callback requested abort
kXMPErr_ProgressAbort = 16,
// ------------------------------------ // ------------------------------------
// More specific parameter error codes. // More specific parameter error codes.
@ -1401,7 +1209,7 @@ enum {
kXMPErr_BadIndex = 104, kXMPErr_BadIndex = 104,
/// Bad iteration position /// Bad iteration position
kXMPErr_BadIterPosition = 105, kXMPErr_BadIterPosition = 105,
/// XML parsing error (deprecated) /// XML parsing error
kXMPErr_BadParse = 106, kXMPErr_BadParse = 106,
/// Serialization error /// Serialization error
kXMPErr_BadSerialize = 107, kXMPErr_BadSerialize = 107,
@ -1411,22 +1219,6 @@ enum {
kXMPErr_NoFileHandler = 109, kXMPErr_NoFileHandler = 109,
/// Data too large for JPEG file format /// Data too large for JPEG file format
kXMPErr_TooLargeForJPEG = 110, kXMPErr_TooLargeForJPEG = 110,
/// A file does not exist
kXMPErr_NoFile = 111,
/// A file exists but cannot be opened
kXMPErr_FilePermission = 112,
/// A file write failed due to lack of disk space
kXMPErr_DiskSpace = 113,
/// A file read failed
kXMPErr_ReadError = 114,
/// A file write failed for a reason other than lack of disk space
kXMPErr_WriteError = 115,
/// A block of a file is ill-formed, e.g. invalid IPTC-IIM in a photo
kXMPErr_BadBlockFormat = 116,
/// File Path is not a file
kXMPErr_FilePathNotAFile = 117,
/// Rejected File extension
kXMPErr_RejectedFileExtension = 118,
// ----------------------------------------------- // -----------------------------------------------
// File format and internal structure error codes. // File format and internal structure error codes.
@ -1466,7 +1258,7 @@ enum {
/// \name Special purpose callback functions /// \name Special purpose callback functions
/// @{ /// @{
/// @brief A signed 32-bit integer used as a status result for the output callback routine, /// A signed 32-bit integer used as a status result for the output callback routine,
/// \c XMP_TextOutputProc. Zero means no error, all other values except -1 are private to the callback. /// \c XMP_TextOutputProc. Zero means no error, all other values except -1 are private to the callback.
/// The callback is wrapped to prevent exceptions being thrown across DLL boundaries. Any exceptions /// The callback is wrapped to prevent exceptions being thrown across DLL boundaries. Any exceptions
/// thrown out of the callback cause a return status of -1. /// thrown out of the callback cause a return status of -1.
@ -1474,9 +1266,8 @@ enum {
typedef XMP_Int32 XMP_Status; typedef XMP_Int32 XMP_Status;
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief The signature of a client-defined callback for text output from XMP Toolkit debugging /// The signature of a client-defined callback for text output from XMP Toolkit debugging
/// operations. /// operations. The callback is invoked one or more times for each line of output. The end of a line
/// @details The callback is invoked one or more times for each line of output. The end of a line
/// is signaled by a '\\n' character at the end of the buffer. Formatting newlines are never present /// is signaled by a '\\n' character at the end of the buffer. Formatting newlines are never present
/// in the middle of a buffer, but values of properties might contain any UTF-8 characters. /// in the middle of a buffer, but values of properties might contain any UTF-8 characters.
/// ///
@ -1495,7 +1286,7 @@ typedef XMP_Status (* XMP_TextOutputProc) ( void * refCon,
XMP_StringLen bufferSize ); XMP_StringLen bufferSize );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
/// @brief The signature of a client-defined callback to check for a user request to abort a time-consuming /// The signature of a client-defined callback to check for a user request to abort a time-consuming
/// operation within XMPFiles. /// operation within XMPFiles.
/// ///
/// @param arg A pointer to caller-defined data passed from the registration call. /// @param arg A pointer to caller-defined data passed from the registration call.
@ -1504,36 +1295,7 @@ typedef XMP_Status (* XMP_TextOutputProc) ( void * refCon,
/// ///
/// @see \c TXMPFiles::SetAbortProc() /// @see \c TXMPFiles::SetAbortProc()
typedef bool (* XMP_AbortProc) ( void * arg ); typedef bool (* XMP_AbortProc) ( void * arg ); // Used by .
// -------------------------------------------------------------------------------------------------
/// @brief The signature of a client-defined callback for progress report notifications.
///
/// @param context A pointer used to carry client-private context.
///
/// @param elapsedTime The time in seconds since the progress reporting started.
///
/// @param fractionDone A float value estimating the amount of work already done, in the range of
/// 0.0 to 1.0. A value of 0.0 is given if the amount is not known, this happens if there is no
/// estimate total for the total work. The units of work are not defined, but should usually be
/// related to the number of bytes of I/O. This will go backwards if total work estimate changes.
///
/// @param secondsToGo A float value estimating the number of seconds left to complete the file
/// operation. A value of 0.0 is given if the amount is not known, this happens if the amount of
/// total work is unknown. This can go backwards according to throughput or if work estimate changes.
///
/// @return True if the file operation should continue, false if it should be aborted with an
/// exception being thrown from the XMPFiles library back to the original caller.
///
/// @see \c TXMPFiles::SetDefaultProgressCallback() and \c TXMPFiles::SetProgressCallback()
typedef bool (* XMP_ProgressReportProc) ( void * context, float elapsedTime, float fractionDone, float secondsToGo );
// -------------------------------------------------------------------------------------------------
/// Internal: The signature of a client-side wrapper for the progress report callback.
typedef XMP_Bool (* XMP_ProgressReportWrapper) ( XMP_ProgressReportProc proc, void * context,
float elapsedTime, float fractionDone, float secondsToGo );
/// @} /// @}
@ -1565,5 +1327,4 @@ typedef struct XMP_VersionInfo {
} // extern "C" } // extern "C"
#endif #endif
#include <vector>
#endif // __XMP_Const_h__ #endif // __XMP_Const_h__

@ -11,7 +11,7 @@
// ================================================================================================= // =================================================================================================
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -22,10 +22,31 @@
// Determine the Platform // Determine the Platform
// ====================== // ======================
// One of MAC_ENV, WIN_ENV, UNIX_ENV or IOS_ENV must be defined by the client. Since some other code // One of MAC_ENV, WIN_ENV, or UNIX_ENV must be defined by the client. Since some other code
// requires these to be defined without values, they are only used here to define XMP-specific // requires these to be defined without values, they are only used here to define XMP-specific
// macros with 0 or 1 values. // macros with 0 or 1 values.
/* 20-Oct-07, ahu: Determine the platform, set the above defines accordingly. */
#if !defined(_FILE_OFFSET_BITS)
#define _FILE_OFFSET_BITS 64
#endif
#if defined __CYGWIN32__ && !defined __CYGWIN__
/* For backwards compatibility with Cygwin b19 and
earlier, we define __CYGWIN__ here, so that
we can rely on checking just for that macro. */
# define __CYGWIN__ __CYGWIN32__
#endif
#if defined WIN32 && !defined __CYGWIN__
# define WIN_ENV 1
/* Todo: How to correctly recognize a Mac platform? */
#elif defined macintosh || defined MACOS_CLASSIC || defined MACOS_X_UNIX || defined MACOS_X || defined MACOS
# define MAC_ENV 1
#else
# define UNIX_ENV 1
#endif
// ! Tempting though it might be to have a standard macro for big or little endian, there seems to // ! Tempting though it might be to have a standard macro for big or little endian, there seems to
// ! be no decent way to do that on our own in UNIX. Forcing it on the client isn't acceptable. // ! be no decent way to do that on our own in UNIX. Forcing it on the client isn't acceptable.
@ -35,14 +56,13 @@
#error "MAC_ENV must be defined so that \"#if MAC_ENV\" is true" #error "MAC_ENV must be defined so that \"#if MAC_ENV\" is true"
#endif #endif
#if defined ( WIN_ENV ) || defined ( UNIX_ENV ) || defined ( IOS_ENV ) #if defined ( WIN_ENV ) || defined ( UNIX_ENV )
#error "XMP environment error - must define only one of MAC_ENV, WIN_ENV, UNIX_ENV or IOS_ENV" #error "XMP environment error - must define only one of MAC_ENV, WIN_ENV, or UNIX_ENV"
#endif #endif
#define XMP_MacBuild 1 #define XMP_MacBuild 1
#define XMP_WinBuild 0 #define XMP_WinBuild 0
#define XMP_UNIXBuild 0 #define XMP_UNIXBuild 0
#define XMP_iOSBuild 0
#elif defined ( WIN_ENV ) #elif defined ( WIN_ENV )
@ -50,14 +70,13 @@
#error "WIN_ENV must be defined so that \"#if WIN_ENV\" is true" #error "WIN_ENV must be defined so that \"#if WIN_ENV\" is true"
#endif #endif
#if defined ( MAC_ENV ) || defined ( UNIX_ENV ) || defined ( IOS_ENV ) #if defined ( UNIX_ENV )
#error "XMP environment error - must define only one of MAC_ENV, WIN_ENV, UNIX_ENV or IOS_ENV" #error "XMP environment error - must define only one of MAC_ENV, WIN_ENV, or UNIX_ENV"
#endif #endif
#define XMP_MacBuild 0 #define XMP_MacBuild 0
#define XMP_WinBuild 1 #define XMP_WinBuild 1
#define XMP_UNIXBuild 0 #define XMP_UNIXBuild 0
#define XMP_iOSBuild 0
#elif defined ( UNIX_ENV ) #elif defined ( UNIX_ENV )
@ -65,33 +84,13 @@
#error "UNIX_ENV must be defined so that \"#if UNIX_ENV\" is true" #error "UNIX_ENV must be defined so that \"#if UNIX_ENV\" is true"
#endif #endif
#if defined ( MAC_ENV ) || defined ( WIN_ENV ) || defined ( IOS_ENV )
#error "XMP environment error - must define only one of MAC_ENV, WIN_ENV, UNIX_ENV or IOS_ENV"
#endif
#define XMP_MacBuild 0 #define XMP_MacBuild 0
#define XMP_WinBuild 0 #define XMP_WinBuild 0
#define XMP_UNIXBuild 1 #define XMP_UNIXBuild 1
#define XMP_iOSBuild 0
#elif defined ( IOS_ENV )
#if 0 // ! maybe someday - ! IOS_ENV
#error "IOS_ENV must be defined so that \"#if IOS_ENV\" is true"
#endif
#if defined ( MAC_ENV ) || defined ( WIN_ENV ) || defined ( UNIX_ENV )
#error "XMP environment error - must define only one of MAC_ENV, WIN_ENV, UNIX_ENV or IOS_ENV"
#endif
#define XMP_MacBuild 0
#define XMP_WinBuild 0
#define XMP_UNIXBuild 0
#define XMP_iOSBuild 1
#else #else
#error "XMP environment error - must define one of MAC_ENV, WIN_ENV, UNIX_ENV or IOS_ENV" #error "XMP environment error - must define one of MAC_ENV, WIN_ENV, or UNIX_ENV"
#endif #endif
@ -101,7 +100,10 @@
#if defined ( DEBUG ) #if defined ( DEBUG )
#if defined ( NDEBUG ) #if defined ( NDEBUG )
#error "XMP environment error - both DEBUG and NDEBUG are defined" #undef NDEBUG
#warning
#warning "XMP environment - DEBUG and NDEBUG defined. NDEBUG has been undefined"
#warning
#endif #endif
#define XMP_DebugBuild 1 #define XMP_DebugBuild 1
#endif #endif
@ -118,75 +120,45 @@
#include <stdio.h> // The assert macro needs printf. #include <stdio.h> // The assert macro needs printf.
#endif #endif
#ifndef DISABLE_SERIALIZED_IMPORT_EXPORT
#define DISABLE_SERIALIZED_IMPORT_EXPORT 0
#endif
#ifndef XMP_64 #ifndef XMP_64
#if _WIN64 || defined(_LP64) #if _WIN64
#define XMP_64 1 #define XMP_64 1
#else #else
#define XMP_64 0 #define XMP_64 0
#endif #endif
#endif #endif
#define UNUSED(x) (void)(x)
// ================================================================================================= // =================================================================================================
// Macintosh Specific Settings // Macintosh Specific Settings
// =========================== // ===========================
#if (XMP_MacBuild)
#define XMP_HELPER_DLL_IMPORT __attribute__((visibility("default")))
#define XMP_HELPER_DLL_EXPORT __attribute__((visibility("default")))
#define XMP_HELPER_DLL_PRIVATE __attribute__((visibility("hidden")))
#define APICALL
#endif
// ================================================================================================= // =================================================================================================
// Windows Specific Settings // Windows Specific Settings
// ========================= // =========================
#if (XMP_WinBuild)
#define XMP_HELPER_DLL_IMPORT
#define XMP_HELPER_DLL_EXPORT
#define XMP_HELPER_DLL_PRIVATE
#define APICALL __stdcall
#endif
// ================================================================================================= // =================================================================================================
// UNIX Specific Settings // UNIX Specific Settings
// ====================== // ======================
#if (XMP_UNIXBuild)
#define XMP_HELPER_DLL_IMPORT
#define XMP_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
#define XMP_HELPER_DLL_PRIVATE __attribute__ ((visibility ("hidden")))
#define APICALL
#endif
// ================================================================================================= // =================================================================================================
// IOS Specific Settings
// ===========================
#if (XMP_iOSBuild)
#include <TargetConditionals.h>
#if (TARGET_CPU_ARM)
#define XMP_IOS_ARM 1
#else
#define XMP_IOS_ARM 0
#endif
#define XMP_HELPER_DLL_IMPORT __attribute__((visibility("default")))
#define XMP_HELPER_DLL_EXPORT __attribute__((visibility("default")))
#define XMP_HELPER_DLL_PRIVATE __attribute__((visibility("hidden")))
#define APICALL
#endif
// ================================================================================================= #endif // __XMP_Environment_h__
#if (XMP_DynamicBuild) /*
#define XMP_PUBLIC XMP_HELPER_DLL_EXPORT If you're using Solaris and the Solaris Studio compiler, then you really
#define XMP_PRIVATE XMP_HELPER_DLL_PRIVATE do need to use -library=stdcxx4 along with these inclusions below
#elif (XMP_StaticBuild) */
#define XMP_PUBLIC #if defined(OS_SOLARIS)
#define XMP_PRIVATE #include <stdio.h>
#else #include <string.h>
#define XMP_PUBLIC XMP_HELPER_DLL_IMPORT #include <strings.h>
#define XMP_PRIVATE XMP_HELPER_DLL_PRIVATE #include <stdlib.h>
#include <math.h>
#if defined(__cplusplus)
#include <ios>
#include <fstream>
#endif
#endif #endif
#endif // __XMP_Environment_h__

@ -7,7 +7,7 @@
/* /*
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -33,19 +33,12 @@ versions.
*/ */
/* ============================================================================================= */ /* ============================================================================================= */
#define XMPCORE_API_VERSION_MAJOR 5 #define XMP_API_VERSION_MAJOR 4
#define XMPCORE_API_VERSION_MINOR 6 #define XMP_API_VERSION_MINOR 4
#define XMPCORE_API_VERSION_MICRO 0 #define XMP_API_VERSION_MICRO 0
#define XMPCORE_API_VERSION 5.6.0 #define XMP_API_VERSION 4.4
#define XMPCORE_API_VERSION_STRING "5.6.0" #define XMP_API_VERSION_STRING "4.4.0-Exiv2"
#define XMPFILES_API_VERSION_MAJOR 5
#define XMPFILES_API_VERSION_MINOR 7
#define XMPFILES_API_VERSION_MICRO 0
#define XMPFILES_API_VERSION 5.7.0
#define XMPFILES_API_VERSION_STRING "5.7.0"
/* ============================================================================================= */ /* ============================================================================================= */

@ -1,6 +1,6 @@
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -11,7 +11,7 @@
/// \file TXMPIterator.incl_cpp /// \file TXMPIterator.incl_cpp
/// \brief The implementation of the TXMPIterator template class. /// \brief The implementation of the TXMPIterator template class.
#include "XMP.hpp" #include "XMPSDK.hpp"
#include "client-glue/WXMP_Common.hpp" #include "client-glue/WXMP_Common.hpp"
#include "client-glue/WXMPIterator.hpp" #include "client-glue/WXMPIterator.hpp"
@ -79,15 +79,6 @@
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPIterator,void)::
SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen )
{
tStringObj * clientStr = (tStringObj*) clientPtr;
clientStr->assign ( valuePtr, valueLen );
}
// -------------------------------------------------------------------------------------------------
XMP_CTorDTorIntro(TXMPIterator):: XMP_CTorDTorIntro(TXMPIterator)::
TXMPIterator ( const TXMPIterator<tStringObj> & original ) : iterRef(original.iterRef) TXMPIterator ( const TXMPIterator<tStringObj> & original ) : iterRef(original.iterRef)
{ {
@ -208,7 +199,19 @@ Next ( tStringObj * schemaNS /* = 0 */,
tStringObj * propValue /* = 0 */, tStringObj * propValue /* = 0 */,
XMP_OptionBits * options /* = 0 */ ) XMP_OptionBits * options /* = 0 */ )
{ {
WrapCheckBool ( found, zXMPIterator_Next_1 ( schemaNS, propPath, propValue, options, SetClientString ) ); XMP_StringPtr schemaPtr = 0;
XMP_StringLen schemaLen = 0;
XMP_StringPtr pathPtr = 0;
XMP_StringLen pathLen = 0;
XMP_StringPtr valuePtr = 0;
XMP_StringLen valueLen = 0;
WrapCheckBool ( found, zXMPIterator_Next_1 ( &schemaPtr, &schemaLen, &pathPtr, &pathLen, &valuePtr, &valueLen, options ) );
if ( found ) {
if ( schemaNS != 0 ) schemaNS->assign ( schemaPtr, schemaLen );
if ( propPath != 0 ) propPath->assign ( pathPtr, pathLen );
if ( propValue != 0 ) propValue->assign ( valuePtr, valueLen );
WXMPUtils_UnlockIter_1 ( this->iterRef, 0 );
}
return found; return found;
} }

@ -1,6 +1,6 @@
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -11,20 +11,10 @@
/// \file TXMPMeta.incl_cpp /// \file TXMPMeta.incl_cpp
/// \brief The implementation of the TXMPMeta template class. /// \brief The implementation of the TXMPMeta template class.
#include "XMP.hpp" #include "XMPSDK.hpp"
#include "client-glue/WXMP_Common.hpp" #include "client-glue/WXMP_Common.hpp"
#include "client-glue/WXMPMeta.hpp" #include "client-glue/WXMPMeta.hpp"
#include "XMPCore/XMPCoreDefines.h"
#if ENABLE_CPP_DOM_MODEL
#include "XMPCore/Interfaces/IMetadata.h"
#include "XMPCore/Interfaces/ICoreObjectFactory.h"
#endif
// ================================================================================================= // =================================================================================================
// Implementation Guidelines // Implementation Guidelines
// ========================= // =========================
@ -50,6 +40,8 @@
// Local utilities // Local utilities
// =============== // ===============
// -------------------------------------------------------------------------------------------------
class TOPW_Info { class TOPW_Info {
public: public:
XMP_TextOutputProc clientProc; XMP_TextOutputProc clientProc;
@ -75,15 +67,6 @@ static XMP_Status TextOutputProcWrapper ( void * refCon,
// Initialization and termination // Initialization and termination
// ============================== // ==============================
XMP_MethodIntro(TXMPMeta,void)::
SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen )
{
tStringObj * clientStr = (tStringObj*) clientPtr;
clientStr->assign ( valuePtr, valueLen );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void):: XMP_MethodIntro(TXMPMeta,void)::
GetVersionInfo ( XMP_VersionInfo * info ) GetVersionInfo ( XMP_VersionInfo * info )
{ {
@ -92,62 +75,18 @@ GetVersionInfo ( XMP_VersionInfo * info )
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
#if XMP_TraceClientCalls
FILE * xmpClientLog = stderr;
#endif
#ifndef XMP_TypeCheck
#if ! XMP_DebugBuild
#define XMP_TypeCheck(e,msg) /* nothing */
#else
#define XMP_TypeCheck(e,msg) if ( ! (e) ) throw XMP_Error ( kXMPErr_AssertFailure, msg );
#endif
#endif
XMP_MethodIntro(TXMPMeta,bool):: XMP_MethodIntro(TXMPMeta,bool)::
Initialize() Initialize()
{ {
// Verify critical type sizes.
XMP_TypeCheck ( (sizeof(XMP_Int8) == 1), "Size wrong for critical type XMP_Int8" );
XMP_TypeCheck ( (sizeof(XMP_Int16) == 2), "Size wrong for critical type XMP_Int16" );
XMP_TypeCheck ( (sizeof(XMP_Int32) == 4), "Size wrong for critical type XMP_Int32" );
XMP_TypeCheck ( (sizeof(XMP_Int64) == 8), "Size wrong for critical type XMP_Int64" );
XMP_TypeCheck ( (sizeof(XMP_Uns8) == 1), "Size wrong for critical type XMP_Uns8" );
XMP_TypeCheck ( (sizeof(XMP_Uns16) == 2), "Size wrong for critical type XMP_Uns16" );
XMP_TypeCheck ( (sizeof(XMP_Uns32) == 4), "Size wrong for critical type XMP_Uns32" );
XMP_TypeCheck ( (sizeof(XMP_Uns64) == 8), "Size wrong for critical type XMP_Uns64" );
XMP_TypeCheck ( (sizeof(XMP_Bool) == 1), "Size wrong for critical type XMP_Bool" );
#if XMP_TraceClientCallsToFile
xmpClientLog = fopen ( "XMPClientLog.txt", "w" );
if ( xmpClientLog == 0 ) xmpClientLog = stderr;
#endif
WrapCheckBool ( ok, zXMPMeta_Initialize_1() ); WrapCheckBool ( ok, zXMPMeta_Initialize_1() );
#if ENABLE_CPP_DOM_MODEL
AdobeXMPCore::ICoreObjectFactory::SetupCoreObjectFactory();
#endif
return ok; return ok;
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void):: XMP_MethodIntro(TXMPMeta,void)::
Terminate() Terminate()
{ {
#if ENABLE_CPP_DOM_MODEL
AdobeXMPCore::ICoreObjectFactory::DestroyCoreObjectFactory();
#endif
WrapNoCheckVoid ( zXMPMeta_Terminate_1() ); WrapNoCheckVoid ( zXMPMeta_Terminate_1() );
#if XMP_TraceClientCallsToFile
if ( xmpClientLog != stderr ) fclose ( xmpClientLog );
xmpClientLog = stderr;
#endif
} }
// ================================================================================================= // =================================================================================================
@ -184,6 +123,7 @@ TXMPMeta ( const TXMPMeta<tStringObj> & original ) : xmpRef(original.xmpRef)
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void):: XMP_MethodIntro(TXMPMeta,void)::
operator= ( const TXMPMeta<tStringObj> & rhs ) operator= ( const TXMPMeta<tStringObj> & rhs )
{ {
@ -282,13 +222,22 @@ DumpNamespaces ( XMP_TextOutputProc outProc,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,bool):: XMP_MethodIntro(TXMPMeta,XMP_Status)::
DumpAliases ( XMP_TextOutputProc outProc,
void * refCon )
{
TOPW_Info info ( outProc, refCon );
WrapCheckStatus ( status, zXMPMeta_DumpAliases_1 ( TextOutputProcWrapper, &info ) );
return status;
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
RegisterNamespace ( XMP_StringPtr namespaceURI, RegisterNamespace ( XMP_StringPtr namespaceURI,
XMP_StringPtr suggestedPrefix, XMP_StringPtr prefix )
tStringObj * registeredPrefix )
{ {
WrapCheckBool ( prefixMatch, zXMPMeta_RegisterNamespace_1 ( namespaceURI, suggestedPrefix, registeredPrefix, SetClientString ) ); WrapCheckVoid ( zXMPMeta_RegisterNamespace_1 ( namespaceURI, prefix ) );
return prefixMatch;
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -297,7 +246,13 @@ XMP_MethodIntro(TXMPMeta,bool)::
GetNamespacePrefix ( XMP_StringPtr namespaceURI, GetNamespacePrefix ( XMP_StringPtr namespaceURI,
tStringObj * namespacePrefix ) tStringObj * namespacePrefix )
{ {
WrapCheckBool ( found, zXMPMeta_GetNamespacePrefix_1 ( namespaceURI, namespacePrefix, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckBool ( found, zXMPMeta_GetNamespacePrefix_1 ( namespaceURI, &resultPtr, &resultLen ) );
if ( found ) {
if ( namespacePrefix != 0 ) namespacePrefix->assign ( resultPtr, resultLen );
WXMPMeta_Unlock_1 ( 0 );
}
return found; return found;
} }
@ -307,7 +262,13 @@ XMP_MethodIntro(TXMPMeta,bool)::
GetNamespaceURI ( XMP_StringPtr namespacePrefix, GetNamespaceURI ( XMP_StringPtr namespacePrefix,
tStringObj * namespaceURI ) tStringObj * namespaceURI )
{ {
WrapCheckBool ( found, zXMPMeta_GetNamespaceURI_1 ( namespacePrefix, namespaceURI, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckBool ( found, zXMPMeta_GetNamespaceURI_1 ( namespacePrefix, &resultPtr, &resultLen ) );
if ( found ) {
if ( namespaceURI != 0 ) namespaceURI->assign ( resultPtr, resultLen );
WXMPMeta_Unlock_1 ( 0 );
}
return found; return found;
} }
@ -319,6 +280,57 @@ DeleteNamespace ( XMP_StringPtr namespaceURI )
WrapCheckVoid ( zXMPMeta_DeleteNamespace_1 ( namespaceURI ) ); WrapCheckVoid ( zXMPMeta_DeleteNamespace_1 ( namespaceURI ) );
} }
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
RegisterAlias ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp,
XMP_StringPtr actualNS,
XMP_StringPtr actualProp,
XMP_OptionBits arrayForm )
{
WrapCheckVoid ( zXMPMeta_RegisterAlias_1 ( aliasNS, aliasProp, actualNS, actualProp, arrayForm ) );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,bool)::
ResolveAlias ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp,
tStringObj * actualNS,
tStringObj * actualProp,
XMP_OptionBits * arrayForm )
{
XMP_StringPtr nsPtr = 0;
XMP_StringLen nsLen = 0;
XMP_StringPtr propPtr = 0;
XMP_StringLen propLen = 0;
WrapCheckBool ( found, zXMPMeta_ResolveAlias_1 ( aliasNS, aliasProp, &nsPtr, &nsLen, &propPtr, &propLen, arrayForm ) );
if ( found ) {
if ( actualNS != 0 ) actualNS->assign ( nsPtr, nsLen );
if ( actualProp != 0 ) actualProp->assign ( propPtr, propLen );
WXMPMeta_Unlock_1 ( 0 );
}
return found;
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
DeleteAlias ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp )
{
WrapCheckVoid ( zXMPMeta_DeleteAlias_1 ( aliasNS, aliasProp ) );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
RegisterStandardAliases ( XMP_StringPtr schemaNS )
{
WrapCheckVoid ( zXMPMeta_RegisterStandardAliases_1 ( schemaNS ) );
}
// ================================================================================================= // =================================================================================================
// Basic property manipulation functions // Basic property manipulation functions
// ===================================== // =====================================
@ -329,7 +341,13 @@ GetProperty ( XMP_StringPtr schemaNS,
tStringObj * propValue, tStringObj * propValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
WrapCheckBool ( found, zXMPMeta_GetProperty_1 ( schemaNS, propName, propValue, options, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckBool ( found, zXMPMeta_GetProperty_1 ( schemaNS, propName, &resultPtr, &resultLen, options ) );
if ( found ) {
if ( propValue != 0 ) propValue->assign ( resultPtr, resultLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, 0 );
}
return found; return found;
} }
@ -342,7 +360,13 @@ GetArrayItem ( XMP_StringPtr schemaNS,
tStringObj * itemValue, tStringObj * itemValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
WrapCheckBool ( found, zXMPMeta_GetArrayItem_1 ( schemaNS, arrayName, itemIndex, itemValue, options, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckBool ( found, zXMPMeta_GetArrayItem_1 ( schemaNS, arrayName, itemIndex, &resultPtr, &resultLen, options ) );
if ( found ) {
if ( itemValue != 0 ) itemValue->assign ( resultPtr, resultLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, 0 );
}
return found; return found;
} }
@ -356,7 +380,13 @@ GetStructField ( XMP_StringPtr schemaNS,
tStringObj * fieldValue, tStringObj * fieldValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
WrapCheckBool ( found, zXMPMeta_GetStructField_1 ( schemaNS, structName, fieldNS, fieldName, fieldValue, options, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckBool ( found, zXMPMeta_GetStructField_1 ( schemaNS, structName, fieldNS, fieldName, &resultPtr, &resultLen, options ) );
if ( found ) {
if ( fieldValue != 0 ) fieldValue->assign ( resultPtr, resultLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, 0 );
}
return found; return found;
} }
@ -370,7 +400,13 @@ GetQualifier ( XMP_StringPtr schemaNS,
tStringObj * qualValue, tStringObj * qualValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
WrapCheckBool ( found, zXMPMeta_GetQualifier_1 ( schemaNS, propName, qualNS, qualName, qualValue, options, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckBool ( found, zXMPMeta_GetQualifier_1 ( schemaNS, propName, qualNS, qualName, &resultPtr, &resultLen, options ) );
if ( found ) {
if ( qualValue != 0 ) qualValue->assign ( resultPtr, resultLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, 0 );
}
return found; return found;
} //GetQualifier () } //GetQualifier ()
@ -595,8 +631,17 @@ GetLocalizedText ( XMP_StringPtr schemaNS,
tStringObj * itemValue, tStringObj * itemValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
XMP_StringPtr langPtr = 0;
XMP_StringLen langLen = 0;
XMP_StringPtr itemPtr = 0;
XMP_StringLen itemLen = 0;
WrapCheckBool ( found, zXMPMeta_GetLocalizedText_1 ( schemaNS, altTextName, genericLang, specificLang, WrapCheckBool ( found, zXMPMeta_GetLocalizedText_1 ( schemaNS, altTextName, genericLang, specificLang,
actualLang, itemValue, options, SetClientString ) ); &langPtr, &langLen, &itemPtr, &itemLen, options ) );
if ( found ) {
if ( actualLang != 0 ) actualLang->assign ( langPtr, langLen );
if ( itemValue != 0 ) itemValue->assign ( itemPtr, itemLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, kXMP_NoOptions );
}
return found; return found;
} }
@ -628,17 +673,6 @@ SetLocalizedText ( XMP_StringPtr schemaNS,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
DeleteLocalizedText ( XMP_StringPtr schemaNS,
XMP_StringPtr altTextName,
XMP_StringPtr genericLang,
XMP_StringPtr specificLang )
{
WrapCheckVoid ( zXMPMeta_DeleteLocalizedText_1 ( schemaNS, altTextName, genericLang, specificLang ) );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,bool):: XMP_MethodIntro(TXMPMeta,bool)::
GetProperty_Bool ( XMP_StringPtr schemaNS, GetProperty_Bool ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
@ -656,10 +690,12 @@ GetProperty_Bool ( XMP_StringPtr schemaNS,
XMP_MethodIntro(TXMPMeta,bool):: XMP_MethodIntro(TXMPMeta,bool)::
GetProperty_Int ( XMP_StringPtr schemaNS, GetProperty_Int ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int32 * propValue, long * propValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
WrapCheckBool ( found, zXMPMeta_GetProperty_Int_1 ( schemaNS, propName, propValue, options ) ); XMP_Int32 abiValue;
WrapCheckBool ( found, zXMPMeta_GetProperty_Int_1 ( schemaNS, propName, &abiValue, options ) );
if ( found && (propValue != 0) ) *propValue = abiValue;
return found; return found;
} }
@ -668,10 +704,12 @@ GetProperty_Int ( XMP_StringPtr schemaNS,
XMP_MethodIntro(TXMPMeta,bool):: XMP_MethodIntro(TXMPMeta,bool)::
GetProperty_Int64 ( XMP_StringPtr schemaNS, GetProperty_Int64 ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int64 * propValue, long long * propValue,
XMP_OptionBits * options ) const XMP_OptionBits * options ) const
{ {
WrapCheckBool ( found, zXMPMeta_GetProperty_Int64_1 ( schemaNS, propName, propValue, options ) ); XMP_Int64 abiValue;
WrapCheckBool ( found, zXMPMeta_GetProperty_Int64_1 ( schemaNS, propName, &abiValue, options ) );
if ( found && (propValue != 0) ) *propValue = abiValue;
return found; return found;
} }
@ -715,7 +753,7 @@ SetProperty_Bool ( XMP_StringPtr schemaNS,
XMP_MethodIntro(TXMPMeta,void):: XMP_MethodIntro(TXMPMeta,void)::
SetProperty_Int ( XMP_StringPtr schemaNS, SetProperty_Int ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int32 propValue, long propValue,
XMP_OptionBits options /* = 0 */ ) XMP_OptionBits options /* = 0 */ )
{ {
WrapCheckVoid ( zXMPMeta_SetProperty_Int_1 ( schemaNS, propName, propValue, options ) ); WrapCheckVoid ( zXMPMeta_SetProperty_Int_1 ( schemaNS, propName, propValue, options ) );
@ -726,7 +764,7 @@ SetProperty_Int ( XMP_StringPtr schemaNS,
XMP_MethodIntro(TXMPMeta,void):: XMP_MethodIntro(TXMPMeta,void)::
SetProperty_Int64 ( XMP_StringPtr schemaNS, SetProperty_Int64 ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int64 propValue, long long propValue,
XMP_OptionBits options /* = 0 */ ) XMP_OptionBits options /* = 0 */ )
{ {
WrapCheckVoid ( zXMPMeta_SetProperty_Int64_1 ( schemaNS, propName, propValue, options ) ); WrapCheckVoid ( zXMPMeta_SetProperty_Int64_1 ( schemaNS, propName, propValue, options ) );
@ -767,9 +805,13 @@ GetInternalRef() const
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void):: XMP_MethodIntro(TXMPMeta,void)::
GetObjectName ( tStringObj * nameStr ) const GetObjectName ( tStringObj * name ) const
{ {
WrapCheckVoid ( zXMPMeta_GetObjectName_1 ( nameStr, SetClientString ) ); XMP_StringPtr namePtr = 0;
XMP_StringLen nameLen = 0;
WrapCheckVoid ( zXMPMeta_GetObjectName_1 ( &namePtr, &nameLen ) );
if ( name != 0 ) name->assign ( namePtr, nameLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -871,7 +913,11 @@ SerializeToBuffer ( tStringObj * pktString,
XMP_StringPtr indent, XMP_StringPtr indent,
XMP_Index baseIndent /* = 0 */ ) const XMP_Index baseIndent /* = 0 */ ) const
{ {
WrapCheckVoid ( zXMPMeta_SerializeToBuffer_1 ( pktString, options, padding, newline, indent, baseIndent, SetClientString ) ); XMP_StringPtr resultPtr = 0;
XMP_StringLen resultLen = 0;
WrapCheckVoid ( zXMPMeta_SerializeToBuffer_1 ( &resultPtr, &resultLen, options, padding, newline, indent, baseIndent ) );
if ( pktString != 0 ) pktString->assign ( resultPtr, resultLen );
WXMPMeta_UnlockObject_1 ( this->xmpRef, 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -886,32 +932,4 @@ SerializeToBuffer ( tStringObj * pktString,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
SetDefaultErrorCallback ( XMPMeta_ErrorCallbackProc proc,
void * context /* = 0 */,
XMP_Uns32 limit /* = 1 */ )
{
WrapCheckVoid ( zXMPMeta_SetDefaultErrorCallback_1 ( proc, context, limit ) );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
SetErrorCallback ( XMPMeta_ErrorCallbackProc proc,
void * context /* = 0 */,
XMP_Uns32 limit /* = 1 */ )
{
WrapCheckVoid ( zXMPMeta_SetErrorCallback_1 ( proc, context, limit ) );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPMeta,void)::
ResetErrorCallbackLimit ( XMP_Uns32 limit /* = 1 */ )
{
WrapCheckVoid ( zXMPMeta_ResetErrorCallbackLimit_1 ( limit ) );
}
// ================================================================================================= // =================================================================================================

@ -1,6 +1,6 @@
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -11,7 +11,7 @@
/// \file TXMPUtils.incl_cpp /// \file TXMPUtils.incl_cpp
/// \brief The implementation of the TXMPUtils template class. /// \brief The implementation of the TXMPUtils template class.
#include "XMP.hpp" #include "XMPSDK.hpp"
#include "client-glue/WXMP_Common.hpp" #include "client-glue/WXMP_Common.hpp"
#include "client-glue/WXMPUtils.hpp" #include "client-glue/WXMPUtils.hpp"
@ -23,22 +23,17 @@
// //
// ================================================================================================= // =================================================================================================
XMP_MethodIntro(TXMPUtils,void)::
SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen )
{
tStringObj * clientStr = (tStringObj*) clientPtr;
clientStr->assign ( valuePtr, valueLen );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPUtils,void):: XMP_MethodIntro(TXMPUtils,void)::
ComposeArrayItemPath ( XMP_StringPtr schemaNS, ComposeArrayItemPath ( XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_Index itemIndex, XMP_Index itemIndex,
tStringObj * fullPath ) tStringObj * fullPath )
{ {
WrapCheckVoid ( zXMPUtils_ComposeArrayItemPath_1 ( schemaNS, arrayName, itemIndex, fullPath, SetClientString ) ); XMP_StringPtr pathPtr = 0;
XMP_StringLen pathLen = 0;
WrapCheckVoid ( zXMPUtils_ComposeArrayItemPath_1 ( schemaNS, arrayName, itemIndex, &pathPtr, &pathLen ) );
if ( fullPath != 0 ) fullPath->assign ( pathPtr, pathLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -50,7 +45,11 @@ ComposeStructFieldPath ( XMP_StringPtr schemaNS,
XMP_StringPtr fieldName, XMP_StringPtr fieldName,
tStringObj * fullPath ) tStringObj * fullPath )
{ {
WrapCheckVoid ( zXMPUtils_ComposeStructFieldPath_1 ( schemaNS, structName, fieldNS, fieldName, fullPath, SetClientString ) ); XMP_StringPtr pathPtr = 0;
XMP_StringLen pathLen = 0;
WrapCheckVoid ( zXMPUtils_ComposeStructFieldPath_1 ( schemaNS, structName, fieldNS, fieldName, &pathPtr, &pathLen ) );
if ( fullPath != 0 ) fullPath->assign ( pathPtr, pathLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -62,7 +61,11 @@ ComposeQualifierPath ( XMP_StringPtr schemaNS,
XMP_StringPtr qualName, XMP_StringPtr qualName,
tStringObj * fullPath ) tStringObj * fullPath )
{ {
WrapCheckVoid ( zXMPUtils_ComposeQualifierPath_1 ( schemaNS, propName, qualNS, qualName, fullPath, SetClientString ) ); XMP_StringPtr pathPtr = 0;
XMP_StringLen pathLen = 0;
WrapCheckVoid ( zXMPUtils_ComposeQualifierPath_1 ( schemaNS, propName, qualNS, qualName, &pathPtr, &pathLen ) );
if ( fullPath != 0 ) fullPath->assign ( pathPtr, pathLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -73,7 +76,11 @@ ComposeLangSelector ( XMP_StringPtr schemaNS,
XMP_StringPtr langName, XMP_StringPtr langName,
tStringObj * fullPath ) tStringObj * fullPath )
{ {
WrapCheckVoid ( zXMPUtils_ComposeLangSelector_1 ( schemaNS, arrayName, langName, fullPath, SetClientString ) ); XMP_StringPtr pathPtr = 0;
XMP_StringLen pathLen = 0;
WrapCheckVoid ( zXMPUtils_ComposeLangSelector_1 ( schemaNS, arrayName, langName, &pathPtr, &pathLen ) );
if ( fullPath != 0 ) fullPath->assign ( pathPtr, pathLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -97,7 +104,12 @@ ComposeFieldSelector ( XMP_StringPtr schemaNS,
XMP_StringPtr fieldValue, XMP_StringPtr fieldValue,
tStringObj * fullPath ) tStringObj * fullPath )
{ {
WrapCheckVoid ( zXMPUtils_ComposeFieldSelector_1 ( schemaNS, arrayName, fieldNS, fieldName, fieldValue, fullPath, SetClientString ) ); XMP_StringPtr pathPtr = 0;
XMP_StringLen pathLen = 0;
WrapCheckVoid ( zXMPUtils_ComposeFieldSelector_1 ( schemaNS, arrayName, fieldNS, fieldName, fieldValue,
&pathPtr, &pathLen ) );
if ( fullPath != 0 ) fullPath->assign ( pathPtr, pathLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -120,7 +132,11 @@ XMP_MethodIntro(TXMPUtils,void)::
ConvertFromBool ( bool binValue, ConvertFromBool ( bool binValue,
tStringObj * strValue ) tStringObj * strValue )
{ {
WrapCheckVoid ( zXMPUtils_ConvertFromBool_1 ( binValue, strValue, SetClientString ) ); XMP_StringPtr strPtr = 0;
XMP_StringLen strLen = 0;
WrapCheckVoid ( zXMPUtils_ConvertFromBool_1 ( binValue, &strPtr, &strLen ) );
if ( strValue != 0 ) strValue->assign ( strPtr, strLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -130,12 +146,11 @@ ConvertFromInt ( long binValue,
XMP_StringPtr format, XMP_StringPtr format,
tStringObj * strValue ) tStringObj * strValue )
{ {
#if XMP_MacBuild & XMP_64 // This is checked because on Mac 64 bit environment, long is of 64 bit and hence gives a warning during implicit XMP_StringPtr strPtr = 0;
// typecasting to XMP_Int32. Now doing it explicitly in that case. XMP_StringLen strLen = 0;
WrapCheckVoid ( zXMPUtils_ConvertFromInt_1 ( (XMP_Int32)binValue, format, strValue, SetClientString ) ); WrapCheckVoid ( zXMPUtils_ConvertFromInt_1 ( binValue, format, &strPtr, &strLen ) );
#else if ( strValue != 0 ) strValue->assign ( strPtr, strLen );
WrapCheckVoid ( zXMPUtils_ConvertFromInt_1 ( binValue, format, strValue, SetClientString ) ); WXMPUtils_Unlock_1 ( 0 );
#endif
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -145,7 +160,11 @@ ConvertFromInt64 ( long long binValue,
XMP_StringPtr format, XMP_StringPtr format,
tStringObj * strValue ) tStringObj * strValue )
{ {
WrapCheckVoid ( zXMPUtils_ConvertFromInt64_1 ( binValue, format, strValue, SetClientString ) ); XMP_StringPtr strPtr = 0;
XMP_StringLen strLen = 0;
WrapCheckVoid ( zXMPUtils_ConvertFromInt64_1 ( binValue, format, &strPtr, &strLen ) );
if ( strValue != 0 ) strValue->assign ( strPtr, strLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -155,7 +174,11 @@ ConvertFromFloat ( double binValue,
XMP_StringPtr format, XMP_StringPtr format,
tStringObj * strValue ) tStringObj * strValue )
{ {
WrapCheckVoid ( zXMPUtils_ConvertFromFloat_1 ( binValue, format, strValue, SetClientString ) ); XMP_StringPtr strPtr = 0;
XMP_StringLen strLen = 0;
WrapCheckVoid ( zXMPUtils_ConvertFromFloat_1 ( binValue, format, &strPtr, &strLen ) );
if ( strValue != 0 ) strValue->assign ( strPtr, strLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -164,7 +187,11 @@ XMP_MethodIntro(TXMPUtils,void)::
ConvertFromDate ( const XMP_DateTime & binValue, ConvertFromDate ( const XMP_DateTime & binValue,
tStringObj * strValue ) tStringObj * strValue )
{ {
WrapCheckVoid ( zXMPUtils_ConvertFromDate_1 ( binValue, strValue, SetClientString ) ); XMP_StringPtr strPtr = 0;
XMP_StringLen strLen = 0;
WrapCheckVoid ( zXMPUtils_ConvertFromDate_1 ( binValue, &strPtr, &strLen ) );
if ( strValue != 0 ) strValue->assign ( strPtr, strLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -304,7 +331,11 @@ EncodeToBase64 ( XMP_StringPtr rawStr,
XMP_StringLen rawLen, XMP_StringLen rawLen,
tStringObj * encodedStr ) tStringObj * encodedStr )
{ {
WrapCheckVoid ( zXMPUtils_EncodeToBase64_1 ( rawStr, rawLen, encodedStr, SetClientString ) ); XMP_StringPtr encPtr = 0;
XMP_StringLen encLen = 0;
WrapCheckVoid ( zXMPUtils_EncodeToBase64_1 ( rawStr, rawLen, &encPtr, &encLen ) );
if ( encodedStr != 0 ) encodedStr->assign ( encPtr, encLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -323,7 +354,11 @@ DecodeFromBase64 ( XMP_StringPtr encodedStr,
XMP_StringLen encodedLen, XMP_StringLen encodedLen,
tStringObj * rawStr ) tStringObj * rawStr )
{ {
WrapCheckVoid ( zXMPUtils_DecodeFromBase64_1 ( encodedStr, encodedLen, rawStr, SetClientString ) ); XMP_StringPtr rawPtr = 0;
XMP_StringLen rawLen = 0;
WrapCheckVoid ( zXMPUtils_DecodeFromBase64_1 ( encodedStr, encodedLen, &rawPtr, &rawLen ) );
if ( rawStr != 0 ) rawStr->assign ( rawPtr, rawLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -346,7 +381,18 @@ PackageForJPEG ( const TXMPMeta<tStringObj> & xmpObj,
tStringObj * extendedXMP, tStringObj * extendedXMP,
tStringObj * extendedDigest ) tStringObj * extendedDigest )
{ {
WrapCheckVoid ( zXMPUtils_PackageForJPEG_1 ( xmpObj.GetInternalRef(), standardXMP, extendedXMP, extendedDigest, SetClientString ) ); XMP_StringPtr stdStr = 0;
XMP_StringLen stdLen = 0;
XMP_StringPtr extStr = 0;
XMP_StringLen extLen = 0;
XMP_StringPtr digestStr = 0;
XMP_StringLen digestLen = 0;
WrapCheckVoid ( zXMPUtils_PackageForJPEG_1 ( xmpObj.GetInternalRef(),
&stdStr, &stdLen, &extStr, &extLen, &digestStr, &digestLen ) );
if ( standardXMP != 0 ) standardXMP->assign ( stdStr, stdLen );
if ( extendedXMP != 0 ) extendedXMP->assign ( extStr, extLen );
if ( extendedDigest != 0 ) extendedDigest->assign ( digestStr, digestLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -370,8 +416,12 @@ CatenateArrayItems ( const TXMPMeta<tStringObj> & xmpObj,
XMP_OptionBits options, XMP_OptionBits options,
tStringObj * catedStr ) tStringObj * catedStr )
{ {
XMP_StringPtr catedPtr = 0;
XMP_StringLen catedLen = 0;
WrapCheckVoid ( zXMPUtils_CatenateArrayItems_1 ( xmpObj.GetInternalRef(), schemaNS, arrayName, WrapCheckVoid ( zXMPUtils_CatenateArrayItems_1 ( xmpObj.GetInternalRef(), schemaNS, arrayName,
separator, quotes, options, catedStr, SetClientString ) ); separator, quotes, options, &catedPtr, &catedLen ) );
if ( catedStr != 0 ) catedStr->assign ( catedPtr, catedLen );
WXMPUtils_Unlock_1 ( 0 );
} }
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
@ -401,17 +451,6 @@ SeparateArrayItems ( TXMPMeta<tStringObj> * xmpObj,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPUtils,void)::
ApplyTemplate ( TXMPMeta<tStringObj> * workingXMP,
const TXMPMeta<tStringObj> & templateXMP,
XMP_OptionBits actions )
{
if ( workingXMP == 0 ) throw XMP_Error ( kXMPErr_BadParam, "Null working SXMPMeta pointer" );
WrapCheckVoid ( zXMPUtils_ApplyTemplate_1 ( workingXMP->GetInternalRef(), templateXMP.GetInternalRef(), actions ) );
}
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPUtils,void):: XMP_MethodIntro(TXMPUtils,void)::
RemoveProperties ( TXMPMeta<tStringObj> * xmpObj, RemoveProperties ( TXMPMeta<tStringObj> * xmpObj,
XMP_StringPtr schemaNS /* = 0 */, XMP_StringPtr schemaNS /* = 0 */,
@ -424,6 +463,15 @@ RemoveProperties ( TXMPMeta<tStringObj> * xmpObj,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPUtils,void)::
AppendProperties ( const TXMPMeta<tStringObj> & source,
TXMPMeta<tStringObj> * dest,
XMP_OptionBits options /* = 0 */ )
{
if ( dest == 0 ) throw XMP_Error ( kXMPErr_BadParam, "Null output SXMPMeta pointer" );
WrapCheckVoid ( zXMPUtils_AppendProperties_1 ( source.GetInternalRef(), dest->GetInternalRef(), options ) );
}
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPUtils,void):: XMP_MethodIntro(TXMPUtils,void)::

@ -3,7 +3,7 @@
// ================================================================================================= // =================================================================================================
// ADOBE SYSTEMS INCORPORATED // ADOBE SYSTEMS INCORPORATED
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved // All Rights Reserved
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -12,16 +12,12 @@
#include "client-glue/WXMP_Common.hpp" #include "client-glue/WXMP_Common.hpp"
#if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds.
#include "XMP_IO.hpp"
#endif
#if __cplusplus #if __cplusplus
extern "C" { extern "C" {
#endif #endif
// ================================================================================================= // =================================================================================================
/// \file WXMPFiles.hpp /// \file WXMPFiles.h
/// \brief High level support to access metadata in files of interest to Adobe applications. /// \brief High level support to access metadata in files of interest to Adobe applications.
/// ///
/// This header ... /// This header ...
@ -36,42 +32,16 @@ extern "C" {
PropagateException ( wResult ); \ PropagateException ( wResult ); \
XMPFilesRef result = XMPFilesRef(wResult.ptrResult) XMPFilesRef result = XMPFilesRef(wResult.ptrResult)
static XMP_Bool WrapProgressReport ( XMP_ProgressReportProc proc, void * context,
float elapsedTime, float fractionDone, float secondsToGo )
{
bool ok;
try {
ok = (*proc) ( context, elapsedTime, fractionDone, secondsToGo );
} catch ( ... ) {
ok = false;
}
return ConvertBoolToXMP_Bool( ok );
}
// =================================================================================================
static XMP_Bool WrapFilesErrorNotify ( XMPFiles_ErrorCallbackProc proc, void * context,
XMP_StringPtr filePath, XMP_ErrorSeverity severity, XMP_Int32 cause, XMP_StringPtr message )
{
bool ok;
try {
ok = (*proc) ( context, filePath, severity, cause, message );
} catch ( ... ) {
ok = false;
}
return ConvertBoolToXMP_Bool( ok );
}
// ================================================================================================= // =================================================================================================
#define zXMPFiles_GetVersionInfo_1(versionInfo) \ #define zXMPFiles_GetVersionInfo_1(versionInfo) \
WXMPFiles_GetVersionInfo_1 ( versionInfo /* no wResult */ ) WXMPFiles_GetVersionInfo_1 ( versionInfo /* no wResult */ )
#define zXMPFiles_Initialize_1(options) \ #define zXMPFiles_Initialize_1() \
WXMPFiles_Initialize_1 ( options, &wResult ) WXMPFiles_Initialize_1 ( &wResult )
#define zXMPFiles_Initialize_2(options,pluginFolder,plugins) \ #define zXMPFiles_Initialize_2(options) \
WXMPFiles_Initialize_2 ( options, pluginFolder, plugins, &wResult ) WXMPFiles_Initialize_2 ( options, &wResult )
#define zXMPFiles_Terminate_1() \ #define zXMPFiles_Terminate_1() \
WXMPFiles_Terminate_1 ( /* no wResult */ ) WXMPFiles_Terminate_1 ( /* no wResult */ )
@ -88,34 +58,23 @@ static XMP_Bool WrapFilesErrorNotify ( XMPFiles_ErrorCallbackProc proc, void * c
#define zXMPFiles_CheckPackageFormat_1(folderPath) \ #define zXMPFiles_CheckPackageFormat_1(folderPath) \
WXMPFiles_CheckPackageFormat_1 ( folderPath, &wResult ) WXMPFiles_CheckPackageFormat_1 ( folderPath, &wResult )
#define zXMPFiles_GetFileModDate_1(filePath,modDate,format,options) \
WXMPFiles_GetFileModDate_1 ( filePath, modDate, format, options, &wResult )
#define zXMPFiles_GetAssociatedResources_1( filePath, resourceList, format, options, SetClientStringVector ) \
WXMPFiles_GetAssociatedResources_1 ( filePath, resourceList, format, options, SetClientStringVector, &wResult )
#define zXMPFiles_IsMetadataWritable_1( filePath, writable, format, options ) \
WXMPFiles_IsMetadataWritable_1 ( filePath, writable, format, options, &wResult )
#define zXMPFiles_OpenFile_1(filePath,format,openFlags) \ #define zXMPFiles_OpenFile_1(filePath,format,openFlags) \
WXMPFiles_OpenFile_1 ( this->xmpFilesRef, filePath, format, openFlags, &wResult ) WXMPFiles_OpenFile_1 ( this->xmpFilesRef, filePath, format, openFlags, &wResult )
#if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds.
#define zXMPFiles_OpenFile_2(clientIO,format,openFlags) \
WXMPFiles_OpenFile_2 ( this->xmpFilesRef, clientIO, format, openFlags, &wResult )
#endif
#define zXMPFiles_CloseFile_1(closeFlags) \ #define zXMPFiles_CloseFile_1(closeFlags) \
WXMPFiles_CloseFile_1 ( this->xmpFilesRef, closeFlags, &wResult ) WXMPFiles_CloseFile_1 ( this->xmpFilesRef, closeFlags, &wResult )
#define zXMPFiles_GetFileInfo_1(clientPath,openFlags,format,handlerFlags,SetClientString) \ #define zXMPFiles_GetFileInfo_1(filePath,filePathLen,openFlags,format,handlerFlags) \
WXMPFiles_GetFileInfo_1 ( this->xmpFilesRef, clientPath, openFlags, format, handlerFlags, SetClientString, &wResult ) WXMPFiles_GetFileInfo_1 ( this->xmpFilesRef, filePath, filePathLen, openFlags, format, handlerFlags, &wResult )
#define zXMPFiles_SetAbortProc_1(abortProc,abortArg) \ #define zXMPFiles_SetAbortProc_1(abortProc,abortArg) \
WXMPFiles_SetAbortProc_1 ( this->xmpFilesRef, abortProc, abortArg, &wResult ) WXMPFiles_SetAbortProc_1 ( this->xmpFilesRef, abortProc, abortArg, &wResult )
#define zXMPFiles_GetXMP_1(xmpRef,clientPacket,packetInfo,SetClientString) \ #define zXMPFiles_GetXMP_1(xmpRef,xmpPacket,xmpPacketLen,packetInfo) \
WXMPFiles_GetXMP_1 ( this->xmpFilesRef, xmpRef, clientPacket, packetInfo, SetClientString, &wResult ) WXMPFiles_GetXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, packetInfo, &wResult )
#define zXMPFiles_GetThumbnail_1(tnailInfo) \
WXMPFiles_GetThumbnail_1 ( this->xmpFilesRef, tnailInfo, &wResult )
#define zXMPFiles_PutXMP_1(xmpRef,xmpPacket,xmpPacketLen) \ #define zXMPFiles_PutXMP_1(xmpRef,xmpPacket,xmpPacketLen) \
WXMPFiles_PutXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, &wResult ) WXMPFiles_PutXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, &wResult )
@ -123,37 +82,22 @@ static XMP_Bool WrapFilesErrorNotify ( XMPFiles_ErrorCallbackProc proc, void * c
#define zXMPFiles_CanPutXMP_1(xmpRef,xmpPacket,xmpPacketLen) \ #define zXMPFiles_CanPutXMP_1(xmpRef,xmpPacket,xmpPacketLen) \
WXMPFiles_CanPutXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, &wResult ) WXMPFiles_CanPutXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, &wResult )
#define zXMPFiles_SetDefaultProgressCallback_1(proc,context,interval,sendStartStop) \
WXMPFiles_SetDefaultProgressCallback_1 ( WrapProgressReport, proc, context, interval, sendStartStop, &wResult )
#define zXMPFiles_SetProgressCallback_1(proc,context,interval,sendStartStop) \
WXMPFiles_SetProgressCallback_1 ( this->xmpFilesRef, WrapProgressReport, proc, context, interval, sendStartStop, &wResult )
#define zXMPFiles_SetDefaultErrorCallback_1(proc,context,limit) \
WXMPFiles_SetDefaultErrorCallback_1 ( WrapFilesErrorNotify, proc, context, limit, &wResult )
#define zXMPFiles_SetErrorCallback_1(proc,context,limit) \
WXMPFiles_SetErrorCallback_1 ( this->xmpFilesRef, WrapFilesErrorNotify, proc, context, limit, &wResult )
#define zXMPFiles_ResetErrorCallbackLimit_1(limit) \
WXMPFiles_ResetErrorCallbackLimit_1 ( this->xmpFilesRef, limit, &wResult )
// ================================================================================================= // =================================================================================================
extern void WXMPFiles_GetVersionInfo_1 ( XMP_VersionInfo * versionInfo ); extern void WXMPFiles_GetVersionInfo_1 ( XMP_VersionInfo * versionInfo );
extern void WXMPFiles_Initialize_1 ( XMP_OptionBits options, extern void WXMPFiles_Initialize_1 ( WXMP_Result * result );
WXMP_Result * result );
extern void WXMPFiles_Initialize_2 ( XMP_OptionBits options, extern void WXMPFiles_Initialize_2 ( XMP_OptionBits options, WXMP_Result * result );
const char* pluginFolder,
const char* plugins,
WXMP_Result * result );
extern void WXMPFiles_Terminate_1(); extern void WXMPFiles_Terminate_1();
extern void WXMPFiles_CTor_1 ( WXMP_Result * result ); extern void WXMPFiles_CTor_1 ( WXMP_Result * result );
extern void WXMPFiles_UnlockLib_1();
extern void WXMPFiles_UnlockObj_1 ( XMPFilesRef xmpFilesRef );
extern void WXMPFiles_IncrementRefCount_1 ( XMPFilesRef xmpFilesRef ); extern void WXMPFiles_IncrementRefCount_1 ( XMPFilesRef xmpFilesRef );
extern void WXMPFiles_DecrementRefCount_1 ( XMPFilesRef xmpFilesRef ); extern void WXMPFiles_DecrementRefCount_1 ( XMPFilesRef xmpFilesRef );
@ -168,50 +112,22 @@ extern void WXMPFiles_CheckFileFormat_1 ( XMP_StringPtr filePath,
extern void WXMPFiles_CheckPackageFormat_1 ( XMP_StringPtr folderPath, extern void WXMPFiles_CheckPackageFormat_1 ( XMP_StringPtr folderPath,
WXMP_Result * result ); WXMP_Result * result );
extern void WXMPFiles_GetFileModDate_1 ( XMP_StringPtr filePath,
XMP_DateTime * modDate,
XMP_FileFormat * format, // ! Can be null.
XMP_OptionBits options,
WXMP_Result * result );
extern void WXMPFiles_GetAssociatedResources_1 ( XMP_StringPtr filePath,
void * resourceList,
XMP_FileFormat format,
XMP_OptionBits options,
SetClientStringVectorProc SetClientStringVector,
WXMP_Result * result );
extern void WXMPFiles_IsMetadataWritable_1 ( XMP_StringPtr filePath,
XMP_Bool * writable,
XMP_FileFormat format,
XMP_OptionBits options,
WXMP_Result * result );
extern void WXMPFiles_OpenFile_1 ( XMPFilesRef xmpFilesRef, extern void WXMPFiles_OpenFile_1 ( XMPFilesRef xmpFilesRef,
XMP_StringPtr filePath, XMP_StringPtr filePath,
XMP_FileFormat format, XMP_FileFormat format,
XMP_OptionBits openFlags, XMP_OptionBits openFlags,
WXMP_Result * result ); WXMP_Result * result );
#if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds.
extern void WXMPFiles_OpenFile_2 ( XMPFilesRef xmpFilesRef,
XMP_IO * clientIO,
XMP_FileFormat format,
XMP_OptionBits openFlags,
WXMP_Result * result );
#endif
extern void WXMPFiles_CloseFile_1 ( XMPFilesRef xmpFilesRef, extern void WXMPFiles_CloseFile_1 ( XMPFilesRef xmpFilesRef,
XMP_OptionBits closeFlags, XMP_OptionBits closeFlags,
WXMP_Result * result ); WXMP_Result * result );
extern void WXMPFiles_GetFileInfo_1 ( XMPFilesRef xmpFilesRef, extern void WXMPFiles_GetFileInfo_1 ( XMPFilesRef xmpFilesRef,
void * clientPath, XMP_StringPtr * filePath,
XMP_StringLen * filePathLen,
XMP_OptionBits * openFlags, // ! Can be null. XMP_OptionBits * openFlags, // ! Can be null.
XMP_FileFormat * format, // ! Can be null. XMP_FileFormat * format, // ! Can be null.
XMP_OptionBits * handlerFlags, // ! Can be null. XMP_OptionBits * handlerFlags, // ! Can be null.
SetClientStringProc SetClientString,
WXMP_Result * result ); WXMP_Result * result );
extern void WXMPFiles_SetAbortProc_1 ( XMPFilesRef xmpFilesRef, extern void WXMPFiles_SetAbortProc_1 ( XMPFilesRef xmpFilesRef,
@ -221,9 +137,13 @@ extern void WXMPFiles_SetAbortProc_1 ( XMPFilesRef xmpFilesRef,
extern void WXMPFiles_GetXMP_1 ( XMPFilesRef xmpFilesRef, extern void WXMPFiles_GetXMP_1 ( XMPFilesRef xmpFilesRef,
XMPMetaRef xmpRef, // ! Can be null. XMPMetaRef xmpRef, // ! Can be null.
void * clientPacket, XMP_StringPtr * xmpPacket,
XMP_StringLen * xmpPacketLen,
XMP_PacketInfo * packetInfo, // ! Can be null. XMP_PacketInfo * packetInfo, // ! Can be null.
SetClientStringProc SetClientString, WXMP_Result * result );
extern void WXMPFiles_GetThumbnail_1 ( XMPFilesRef xmpFilesRef,
XMP_ThumbnailInfo * tnailInfo, // ! Can be null.
WXMP_Result * result ); WXMP_Result * result );
extern void WXMPFiles_PutXMP_1 ( XMPFilesRef xmpFilesRef, extern void WXMPFiles_PutXMP_1 ( XMPFilesRef xmpFilesRef,
@ -238,40 +158,6 @@ extern void WXMPFiles_CanPutXMP_1 ( XMPFilesRef xmpFilesRef,
XMP_StringLen xmpPacketLen, XMP_StringLen xmpPacketLen,
WXMP_Result * result ); WXMP_Result * result );
extern void WXMPFiles_SetDefaultProgressCallback_1 ( XMP_ProgressReportWrapper wrapperproc,
XMP_ProgressReportProc clientProc,
void * context,
float interval,
XMP_Bool sendStartStop,
WXMP_Result * result );
extern void WXMPFiles_SetProgressCallback_1 ( XMPFilesRef xmpFilesRef,
XMP_ProgressReportWrapper wrapperproc,
XMP_ProgressReportProc clientProc,
void * context,
float interval,
XMP_Bool sendStartStop,
WXMP_Result * result );
// -------------------------------------------------------------------------------------------------
extern void WXMPFiles_SetDefaultErrorCallback_1 ( XMPFiles_ErrorCallbackWrapper wrapperProc,
XMPFiles_ErrorCallbackProc clientProc,
void * context,
XMP_Uns32 limit,
WXMP_Result * wResult );
extern void WXMPFiles_SetErrorCallback_1 ( XMPFilesRef xmpRef,
XMPFiles_ErrorCallbackWrapper wrapperProc,
XMPFiles_ErrorCallbackProc clientProc,
void * context,
XMP_Uns32 limit,
WXMP_Result * wResult );
extern void WXMPFiles_ResetErrorCallbackLimit_1 ( XMPFilesRef xmpRef,
XMP_Uns32 limit,
WXMP_Result * wResult );
// ================================================================================================= // =================================================================================================
#if __cplusplus #if __cplusplus

@ -2,7 +2,7 @@
#define __WXMPIterator_hpp__ 1 #define __WXMPIterator_hpp__ 1
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -24,8 +24,8 @@ extern "C" {
WXMPIterator_TableCTor_1 ( schemaNS, propName, options, &wResult ); WXMPIterator_TableCTor_1 ( schemaNS, propName, options, &wResult );
#define zXMPIterator_Next_1(schemaNS,propPath,propValue,options,SetClientString) \ #define zXMPIterator_Next_1(schemaNS,nsSize,propPath,pathSize,propValue,valueSize,options) \
WXMPIterator_Next_1 ( this->iterRef, schemaNS, propPath, propValue, options, SetClientString, &wResult ); WXMPIterator_Next_1 ( this->iterRef, schemaNS, nsSize, propPath, pathSize, propValue, valueSize, options, &wResult );
#define zXMPIterator_Skip_1(options) \ #define zXMPIterator_Skip_1(options) \
WXMPIterator_Skip_1 ( this->iterRef, options, &wResult ); WXMPIterator_Skip_1 ( this->iterRef, options, &wResult );
@ -33,38 +33,47 @@ extern "C" {
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPIterator_PropCTor_1 ( XMPMetaRef xmpRef, WXMPIterator_PropCTor_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPIterator_TableCTor_1 ( XMP_StringPtr schemaNS, WXMPIterator_TableCTor_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPIterator_IncrementRefCount_1 ( XMPIteratorRef iterRef ); WXMPIterator_IncrementRefCount_1 ( XMPIteratorRef iterRef );
extern void extern void
XMP_PUBLIC WXMPIterator_DecrementRefCount_1 ( XMPIteratorRef iterRef ); WXMPIterator_DecrementRefCount_1 ( XMPIteratorRef iterRef );
extern void extern void
XMP_PUBLIC WXMPIterator_Next_1 ( XMPIteratorRef iterRef, WXMPIterator_Unlock_1 ( XMP_OptionBits options );
void * schemaNS,
void * propPath, extern void
void * propValue, WXMPIterator_Next_1 ( XMPIteratorRef iterRef,
XMP_StringPtr * schemaNS,
XMP_StringLen * nsSize,
XMP_StringPtr * propPath,
XMP_StringLen * pathSize,
XMP_StringPtr * propValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options, XMP_OptionBits * options,
SetClientStringProc SetClientString,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPIterator_Skip_1 ( XMPIteratorRef iterRef, WXMPIterator_Skip_1 ( XMPIteratorRef iterRef,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void
WXMPUtils_UnlockIter_1 ( XMPIteratorRef iterRef,
XMP_OptionBits options );
// ================================================================================================= // =================================================================================================
#if __cplusplus #if __cplusplus

@ -2,7 +2,7 @@
#define __WXMPMeta_hpp__ 1 #define __WXMPMeta_hpp__ 1
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -16,21 +16,6 @@ extern "C" {
#endif #endif
// ================================================================================================= // =================================================================================================
static XMP_Bool WrapErrorNotify ( XMPMeta_ErrorCallbackProc proc, void * context,
XMP_ErrorSeverity severity, XMP_Int32 cause, XMP_StringPtr message )
{
bool ok;
try {
ok = (*proc) ( context, severity, cause, message );
} catch ( ... ) {
ok = false;
}
return ConvertBoolToXMP_Bool( ok );
}
// =================================================================================================
#define zXMPMeta_GetVersionInfo_1(info) \ #define zXMPMeta_GetVersionInfo_1(info) \
WXMPMeta_GetVersionInfo_1 ( info /* no wResult */ ) WXMPMeta_GetVersionInfo_1 ( info /* no wResult */ )
@ -51,34 +36,44 @@ static XMP_Bool WrapErrorNotify ( XMPMeta_ErrorCallbackProc proc, void * context
#define zXMPMeta_DumpNamespaces_1(outProc,refCon) \ #define zXMPMeta_DumpNamespaces_1(outProc,refCon) \
WXMPMeta_DumpNamespaces_1 ( outProc, refCon, &wResult ) WXMPMeta_DumpNamespaces_1 ( outProc, refCon, &wResult )
#define zXMPMeta_Use_CPP_DOM_APIs_1(useNewCoreAPIs) \ #define zXMPMeta_DumpAliases_1(outProc,refCon) \
WXMPMeta_Use_CPP_DOM_APIs_1( useNewCoreAPIs, &wResult ) WXMPMeta_DumpAliases_1 ( outProc, refCon, &wResult )
#define zXMPMeta_RegisterNamespace_1(namespaceURI,suggestedPrefix,actualPrefix,SetClientString) \
WXMPMeta_RegisterNamespace_1 ( namespaceURI, suggestedPrefix, actualPrefix, SetClientString, &wResult ) #define zXMPMeta_RegisterNamespace_1(namespaceURI,prefix) \
WXMPMeta_RegisterNamespace_1 ( namespaceURI, prefix, &wResult )
#define zXMPMeta_GetNamespacePrefix_1(namespaceURI,namespacePrefix,SetClientString) \ #define zXMPMeta_GetNamespacePrefix_1(namespaceURI,namespacePrefix,prefixSize) \
WXMPMeta_GetNamespacePrefix_1 ( namespaceURI, namespacePrefix, SetClientString, &wResult ) WXMPMeta_GetNamespacePrefix_1 ( namespaceURI, namespacePrefix, prefixSize, &wResult )
#define zXMPMeta_GetNamespaceURI_1(namespacePrefix,namespaceURI,SetClientString) \ #define zXMPMeta_GetNamespaceURI_1(namespacePrefix,namespaceURI,uriSize) \
WXMPMeta_GetNamespaceURI_1 ( namespacePrefix, namespaceURI, SetClientString, &wResult ) WXMPMeta_GetNamespaceURI_1 ( namespacePrefix, namespaceURI, uriSize, &wResult )
#define zXMPMeta_DeleteNamespace_1(namespaceURI) \ #define zXMPMeta_DeleteNamespace_1(namespaceURI) \
WXMPMeta_DeleteNamespace_1 ( namespaceURI, &wResult ) WXMPMeta_DeleteNamespace_1 ( namespaceURI, &wResult )
#define zXMPMeta_GetIXMPMetadata_1() \ #define zXMPMeta_RegisterAlias_1(aliasNS,aliasProp,actualNS,actualProp,arrayForm) \
WXMPMeta_GetIXMPMetadata_1( this->xmpRef, &wResult ) WXMPMeta_RegisterAlias_1 ( aliasNS, aliasProp, actualNS, actualProp, arrayForm, &wResult )
#define zXMPMeta_ResolveAlias_1(aliasNS,aliasProp,actualNS,nsSize,actualProp,propSize,arrayForm) \
WXMPMeta_ResolveAlias_1 ( aliasNS, aliasProp, actualNS, nsSize, actualProp, propSize, arrayForm, &wResult )
#define zXMPMeta_GetProperty_1(schemaNS,propName,propValue,options,SetClientString) \ #define zXMPMeta_DeleteAlias_1(aliasNS,aliasProp) \
WXMPMeta_GetProperty_1 ( this->xmpRef, schemaNS, propName, propValue, options, SetClientString, &wResult ) WXMPMeta_DeleteAlias_1 ( aliasNS, aliasProp, &wResult )
#define zXMPMeta_GetArrayItem_1(schemaNS,arrayName,itemIndex,itemValue,options,SetClientString) \ #define zXMPMeta_RegisterStandardAliases_1(schemaNS) \
WXMPMeta_GetArrayItem_1 ( this->xmpRef, schemaNS, arrayName, itemIndex, itemValue, options, SetClientString, &wResult ) WXMPMeta_RegisterStandardAliases_1 ( schemaNS, &wResult )
#define zXMPMeta_GetStructField_1(schemaNS,structName,fieldNS,fieldName,fieldValue,options,SetClientString) \ #define zXMPMeta_GetProperty_1(schemaNS,propName,propValue,valueSize,options) \
WXMPMeta_GetStructField_1 ( this->xmpRef, schemaNS, structName, fieldNS, fieldName, fieldValue, options, SetClientString, &wResult ) WXMPMeta_GetProperty_1 ( this->xmpRef, schemaNS, propName, propValue, valueSize, options, &wResult )
#define zXMPMeta_GetQualifier_1(schemaNS,propName,qualNS,qualName,qualValue,options,SetClientString) \ #define zXMPMeta_GetArrayItem_1(schemaNS,arrayName,itemIndex,itemValue,valueSize,options) \
WXMPMeta_GetQualifier_1 ( this->xmpRef, schemaNS, propName, qualNS, qualName, qualValue, options, SetClientString, &wResult ) WXMPMeta_GetArrayItem_1 ( this->xmpRef, schemaNS, arrayName, itemIndex, itemValue, valueSize, options, &wResult )
#define zXMPMeta_GetStructField_1(schemaNS,structName,fieldNS,fieldName,fieldValue,valueSize,options) \
WXMPMeta_GetStructField_1 ( this->xmpRef, schemaNS, structName, fieldNS, fieldName, fieldValue, valueSize, options, &wResult )
#define zXMPMeta_GetQualifier_1(schemaNS,propName,qualNS,qualName,qualValue,valueSize,options) \
WXMPMeta_GetQualifier_1 ( this->xmpRef, schemaNS, propName, qualNS, qualName, qualValue, valueSize, options, &wResult )
#define zXMPMeta_SetProperty_1(schemaNS,propName,propValue,options) \ #define zXMPMeta_SetProperty_1(schemaNS,propName,propValue,options) \
WXMPMeta_SetProperty_1 ( this->xmpRef, schemaNS, propName, propValue, options, &wResult ) WXMPMeta_SetProperty_1 ( this->xmpRef, schemaNS, propName, propValue, options, &wResult )
@ -119,14 +114,12 @@ static XMP_Bool WrapErrorNotify ( XMPMeta_ErrorCallbackProc proc, void * context
#define zXMPMeta_DoesQualifierExist_1(schemaNS,propName,qualNS,qualName) \ #define zXMPMeta_DoesQualifierExist_1(schemaNS,propName,qualNS,qualName) \
WXMPMeta_DoesQualifierExist_1 ( this->xmpRef, schemaNS, propName, qualNS, qualName, &wResult ) WXMPMeta_DoesQualifierExist_1 ( this->xmpRef, schemaNS, propName, qualNS, qualName, &wResult )
#define zXMPMeta_GetLocalizedText_1(schemaNS,altTextName,genericLang,specificLang,clientLang,clientValue,options,SetClientString) \ #define zXMPMeta_GetLocalizedText_1(schemaNS,altTextName,genericLang,specificLang,actualLang,langSize,itemValue,valueSize,options) \
WXMPMeta_GetLocalizedText_1 ( this->xmpRef, schemaNS, altTextName, genericLang, specificLang, clientLang, clientValue, options, SetClientString, &wResult ) WXMPMeta_GetLocalizedText_1 ( this->xmpRef, schemaNS, altTextName, genericLang, specificLang, actualLang, langSize, itemValue, valueSize, options, &wResult )
#define zXMPMeta_SetLocalizedText_1(schemaNS,altTextName,genericLang,specificLang,itemValue,options) \ #define zXMPMeta_SetLocalizedText_1(schemaNS,altTextName,genericLang,specificLang,itemValue,options) \
WXMPMeta_SetLocalizedText_1 ( this->xmpRef, schemaNS, altTextName, genericLang, specificLang, itemValue, options, &wResult ) WXMPMeta_SetLocalizedText_1 ( this->xmpRef, schemaNS, altTextName, genericLang, specificLang, itemValue, options, &wResult )
#define zXMPMeta_DeleteLocalizedText_1(schemaNS,altTextName,genericLang,specificLang) \
WXMPMeta_DeleteLocalizedText_1 ( this->xmpRef, schemaNS, altTextName, genericLang, specificLang, &wResult )
#define zXMPMeta_GetProperty_Bool_1(schemaNS,propName,propValue,options) \ #define zXMPMeta_GetProperty_Bool_1(schemaNS,propName,propValue,options) \
WXMPMeta_GetProperty_Bool_1 ( this->xmpRef, schemaNS, propName, propValue, options, &wResult ) WXMPMeta_GetProperty_Bool_1 ( this->xmpRef, schemaNS, propName, propValue, options, &wResult )
@ -157,8 +150,8 @@ static XMP_Bool WrapErrorNotify ( XMPMeta_ErrorCallbackProc proc, void * context
#define zXMPMeta_SetProperty_Date_1(schemaNS,propName,propValue,options) \ #define zXMPMeta_SetProperty_Date_1(schemaNS,propName,propValue,options) \
WXMPMeta_SetProperty_Date_1 ( this->xmpRef, schemaNS, propName, propValue, options, &wResult ) WXMPMeta_SetProperty_Date_1 ( this->xmpRef, schemaNS, propName, propValue, options, &wResult )
#define zXMPMeta_GetObjectName_1(objName,SetClientString) \ #define zXMPMeta_GetObjectName_1(namePtr,nameLen) \
WXMPMeta_GetObjectName_1 ( this->xmpRef, objName, SetClientString, &wResult ) WXMPMeta_GetObjectName_1 ( this->xmpRef, namePtr, nameLen, &wResult )
#define zXMPMeta_SetObjectName_1(name) \ #define zXMPMeta_SetObjectName_1(name) \
WXMPMeta_SetObjectName_1 ( this->xmpRef, name, &wResult ) WXMPMeta_SetObjectName_1 ( this->xmpRef, name, &wResult )
@ -187,136 +180,159 @@ static XMP_Bool WrapErrorNotify ( XMPMeta_ErrorCallbackProc proc, void * context
#define zXMPMeta_ParseFromBuffer_1(buffer,bufferSize,options) \ #define zXMPMeta_ParseFromBuffer_1(buffer,bufferSize,options) \
WXMPMeta_ParseFromBuffer_1 ( this->xmpRef, buffer, bufferSize, options, &wResult ) WXMPMeta_ParseFromBuffer_1 ( this->xmpRef, buffer, bufferSize, options, &wResult )
#define zXMPMeta_SerializeToBuffer_1(pktString,options,padding,newline,indent,baseIndent,SetClientString) \ #define zXMPMeta_SerializeToBuffer_1(pktString,pktSize,options,padding,newline,indent,baseIndent) \
WXMPMeta_SerializeToBuffer_1 ( this->xmpRef, pktString, options, padding, newline, indent, baseIndent, SetClientString, &wResult ) WXMPMeta_SerializeToBuffer_1 ( this->xmpRef, pktString, pktSize, options, padding, newline, indent, baseIndent, &wResult )
#define zXMPMeta_SetDefaultErrorCallback_1(proc,context,limit) \
WXMPMeta_SetDefaultErrorCallback_1 ( WrapErrorNotify, proc, context, limit, &wResult )
#define zXMPMeta_SetErrorCallback_1(proc,context,limit) \
WXMPMeta_SetErrorCallback_1 ( this->xmpRef, WrapErrorNotify, proc, context, limit, &wResult )
#define zXMPMeta_ResetErrorCallbackLimit_1(limit) \
WXMPMeta_ResetErrorCallbackLimit_1 ( this->xmpRef, limit, &wResult )
// ================================================================================================= // =================================================================================================
extern void extern void
XMP_PUBLIC WXMPMeta_GetVersionInfo_1 ( XMP_VersionInfo * info ); WXMPMeta_GetVersionInfo_1 ( XMP_VersionInfo * info );
extern void extern void
XMP_PUBLIC WXMPMeta_Initialize_1 ( WXMP_Result * wResult ); WXMPMeta_Initialize_1 ( WXMP_Result * wResult );
extern void
WXMPMeta_Terminate_1();
extern void extern void
XMP_PUBLIC WXMPMeta_Terminate_1(); WXMPMeta_Unlock_1 ( XMP_OptionBits options );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_CTor_1 ( WXMP_Result * wResult ); WXMPMeta_CTor_1 ( WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_IncrementRefCount_1 ( XMPMetaRef xmpRef ); WXMPMeta_IncrementRefCount_1 ( XMPMetaRef xmpRef );
extern void extern void
XMP_PUBLIC WXMPMeta_DecrementRefCount_1 ( XMPMetaRef xmpRef ); WXMPMeta_DecrementRefCount_1 ( XMPMetaRef xmpRef );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_GetGlobalOptions_1 ( WXMP_Result * wResult ); WXMPMeta_GetGlobalOptions_1 ( WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetGlobalOptions_1 ( XMP_OptionBits options, WXMPMeta_SetGlobalOptions_1 ( XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_DumpNamespaces_1 ( XMP_TextOutputProc outProc, WXMPMeta_DumpNamespaces_1 ( XMP_TextOutputProc outProc,
void * refCon, void * refCon,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_Use_CPP_DOM_APIs_1( XMP_Bool useNewCoreAPIs, WXMPMeta_DumpAliases_1 ( XMP_TextOutputProc outProc,
void * refCon,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_RegisterNamespace_1 ( XMP_StringPtr namespaceURI, WXMPMeta_RegisterNamespace_1 ( XMP_StringPtr namespaceURI,
XMP_StringPtr suggestedPrefix, XMP_StringPtr prefix,
void * actualPrefix,
SetClientStringProc SetClientString,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_GetNamespacePrefix_1 ( XMP_StringPtr namespaceURI, WXMPMeta_GetNamespacePrefix_1 ( XMP_StringPtr namespaceURI,
void * namespacePrefix, XMP_StringPtr * namespacePrefix,
SetClientStringProc SetClientString, XMP_StringLen * prefixSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_GetNamespaceURI_1 ( XMP_StringPtr namespacePrefix, WXMPMeta_GetNamespaceURI_1 ( XMP_StringPtr namespacePrefix,
void * namespaceURI, XMP_StringPtr * namespaceURI,
SetClientStringProc SetClientString, XMP_StringLen * uriSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_DeleteNamespace_1 ( XMP_StringPtr namespaceURI, WXMPMeta_DeleteNamespace_1 ( XMP_StringPtr namespaceURI,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_GetIXMPMetadata_1(XMPMetaRef xmpObjRef, WXMPMeta_RegisterAlias_1 ( XMP_StringPtr aliasNS,
WXMP_Result * wResult ); XMP_StringPtr aliasProp,
XMP_StringPtr actualNS,
XMP_StringPtr actualProp,
XMP_OptionBits arrayForm,
WXMP_Result * wResult );
extern void
WXMPMeta_ResolveAlias_1 ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp,
XMP_StringPtr * actualNS,
XMP_StringLen * nsSize,
XMP_StringPtr * actualProp,
XMP_StringLen * propSize,
XMP_OptionBits * arrayForm,
WXMP_Result * wResult );
extern void
WXMPMeta_DeleteAlias_1 ( XMP_StringPtr aliasNS,
XMP_StringPtr aliasProp,
WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_GetProperty_1 ( XMPMetaRef xmpRef, WXMPMeta_RegisterStandardAliases_1 ( XMP_StringPtr schemaNS,
WXMP_Result * wResult );
// -------------------------------------------------------------------------------------------------
extern void
WXMPMeta_UnlockObject_1 ( XMPMetaRef xmpRef,
XMP_OptionBits options );
// -------------------------------------------------------------------------------------------------
extern void
WXMPMeta_GetProperty_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
void * propValue, XMP_StringPtr * propValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options, XMP_OptionBits * options,
SetClientStringProc SetClientString,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetArrayItem_1 ( XMPMetaRef xmpRef, WXMPMeta_GetArrayItem_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_Index itemIndex, XMP_Index itemIndex,
void * itemValue, XMP_StringPtr * itemValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options, XMP_OptionBits * options,
SetClientStringProc SetClientString,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetStructField_1 ( XMPMetaRef xmpRef, WXMPMeta_GetStructField_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr structName, XMP_StringPtr structName,
XMP_StringPtr fieldNS, XMP_StringPtr fieldNS,
XMP_StringPtr fieldName, XMP_StringPtr fieldName,
void * fieldValue, XMP_StringPtr * fieldValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options, XMP_OptionBits * options,
SetClientStringProc SetClientString,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetQualifier_1 ( XMPMetaRef xmpRef, WXMPMeta_GetQualifier_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_StringPtr qualNS, XMP_StringPtr qualNS,
XMP_StringPtr qualName, XMP_StringPtr qualName,
void * qualValue, XMP_StringPtr * qualValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options, XMP_OptionBits * options,
SetClientStringProc SetClientString,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_SetProperty_1 ( XMPMetaRef xmpRef, WXMPMeta_SetProperty_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_StringPtr propValue, XMP_StringPtr propValue,
@ -324,7 +340,7 @@ XMP_PUBLIC WXMPMeta_SetProperty_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetArrayItem_1 ( XMPMetaRef xmpRef, WXMPMeta_SetArrayItem_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_Index itemIndex, XMP_Index itemIndex,
@ -333,7 +349,7 @@ XMP_PUBLIC WXMPMeta_SetArrayItem_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_AppendArrayItem_1 ( XMPMetaRef xmpRef, WXMPMeta_AppendArrayItem_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_OptionBits arrayOptions, XMP_OptionBits arrayOptions,
@ -342,7 +358,7 @@ XMP_PUBLIC WXMPMeta_AppendArrayItem_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetStructField_1 ( XMPMetaRef xmpRef, WXMPMeta_SetStructField_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr structName, XMP_StringPtr structName,
XMP_StringPtr fieldNS, XMP_StringPtr fieldNS,
@ -352,7 +368,7 @@ XMP_PUBLIC WXMPMeta_SetStructField_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetQualifier_1 ( XMPMetaRef xmpRef, WXMPMeta_SetQualifier_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_StringPtr qualNS, XMP_StringPtr qualNS,
@ -364,20 +380,20 @@ XMP_PUBLIC WXMPMeta_SetQualifier_1 ( XMPMetaRef xmpRef,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_DeleteProperty_1 ( XMPMetaRef xmpRef, WXMPMeta_DeleteProperty_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_DeleteArrayItem_1 ( XMPMetaRef xmpRef, WXMPMeta_DeleteArrayItem_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_Index itemIndex, XMP_Index itemIndex,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_DeleteStructField_1 ( XMPMetaRef xmpRef, WXMPMeta_DeleteStructField_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr structName, XMP_StringPtr structName,
XMP_StringPtr fieldNS, XMP_StringPtr fieldNS,
@ -385,7 +401,7 @@ XMP_PUBLIC WXMPMeta_DeleteStructField_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_DeleteQualifier_1 ( XMPMetaRef xmpRef, WXMPMeta_DeleteQualifier_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_StringPtr qualNS, XMP_StringPtr qualNS,
@ -395,20 +411,20 @@ XMP_PUBLIC WXMPMeta_DeleteQualifier_1 ( XMPMetaRef xmpRef,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_DoesPropertyExist_1 ( XMPMetaRef xmpRef, WXMPMeta_DoesPropertyExist_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_DoesArrayItemExist_1 ( XMPMetaRef xmpRef, WXMPMeta_DoesArrayItemExist_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_Index itemIndex, XMP_Index itemIndex,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_DoesStructFieldExist_1 ( XMPMetaRef xmpRef, WXMPMeta_DoesStructFieldExist_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr structName, XMP_StringPtr structName,
XMP_StringPtr fieldNS, XMP_StringPtr fieldNS,
@ -416,7 +432,7 @@ XMP_PUBLIC WXMPMeta_DoesStructFieldExist_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_DoesQualifierExist_1 ( XMPMetaRef xmpRef, WXMPMeta_DoesQualifierExist_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_StringPtr qualNS, XMP_StringPtr qualNS,
@ -426,19 +442,20 @@ XMP_PUBLIC WXMPMeta_DoesQualifierExist_1 ( XMPMetaRef xmpRef,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_GetLocalizedText_1 ( XMPMetaRef xmpRef, WXMPMeta_GetLocalizedText_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr altTextName, XMP_StringPtr altTextName,
XMP_StringPtr genericLang, XMP_StringPtr genericLang,
XMP_StringPtr specificLang, XMP_StringPtr specificLang,
void * clientLang, XMP_StringPtr * actualLang,
void * clientValue, XMP_StringLen * langSize,
XMP_StringPtr * itemValue,
XMP_StringLen * valueSize,
XMP_OptionBits * options, XMP_OptionBits * options,
SetClientStringProc SetClientString,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_SetLocalizedText_1 ( XMPMetaRef xmpRef, WXMPMeta_SetLocalizedText_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr altTextName, XMP_StringPtr altTextName,
XMP_StringPtr genericLang, XMP_StringPtr genericLang,
@ -447,18 +464,10 @@ XMP_PUBLIC WXMPMeta_SetLocalizedText_1 ( XMPMetaRef xmpRef,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void
XMP_PUBLIC WXMPMeta_DeleteLocalizedText_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS,
XMP_StringPtr altTextName,
XMP_StringPtr genericLang,
XMP_StringPtr specificLang,
WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_GetProperty_Bool_1 ( XMPMetaRef xmpRef, WXMPMeta_GetProperty_Bool_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Bool * propValue, XMP_Bool * propValue,
@ -466,7 +475,7 @@ XMP_PUBLIC WXMPMeta_GetProperty_Bool_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetProperty_Int_1 ( XMPMetaRef xmpRef, WXMPMeta_GetProperty_Int_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int32 * propValue, XMP_Int32 * propValue,
@ -474,7 +483,7 @@ XMP_PUBLIC WXMPMeta_GetProperty_Int_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetProperty_Int64_1 ( XMPMetaRef xmpRef, WXMPMeta_GetProperty_Int64_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int64 * propValue, XMP_Int64 * propValue,
@ -482,7 +491,7 @@ XMP_PUBLIC WXMPMeta_GetProperty_Int64_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetProperty_Float_1 ( XMPMetaRef xmpRef, WXMPMeta_GetProperty_Float_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
double * propValue, double * propValue,
@ -490,7 +499,7 @@ XMP_PUBLIC WXMPMeta_GetProperty_Float_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_GetProperty_Date_1 ( XMPMetaRef xmpRef, WXMPMeta_GetProperty_Date_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_DateTime * propValue, XMP_DateTime * propValue,
@ -498,7 +507,7 @@ XMP_PUBLIC WXMPMeta_GetProperty_Date_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_SetProperty_Bool_1 ( XMPMetaRef xmpRef, WXMPMeta_SetProperty_Bool_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Bool propValue, XMP_Bool propValue,
@ -506,7 +515,7 @@ XMP_PUBLIC WXMPMeta_SetProperty_Bool_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetProperty_Int_1 ( XMPMetaRef xmpRef, WXMPMeta_SetProperty_Int_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int32 propValue, XMP_Int32 propValue,
@ -514,7 +523,7 @@ XMP_PUBLIC WXMPMeta_SetProperty_Int_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetProperty_Int64_1 ( XMPMetaRef xmpRef, WXMPMeta_SetProperty_Int64_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_Int64 propValue, XMP_Int64 propValue,
@ -522,7 +531,7 @@ XMP_PUBLIC WXMPMeta_SetProperty_Int64_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetProperty_Float_1 ( XMPMetaRef xmpRef, WXMPMeta_SetProperty_Float_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
double propValue, double propValue,
@ -530,7 +539,7 @@ XMP_PUBLIC WXMPMeta_SetProperty_Float_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SetProperty_Date_1 ( XMPMetaRef xmpRef, WXMPMeta_SetProperty_Date_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
const XMP_DateTime & propValue, const XMP_DateTime & propValue,
@ -540,46 +549,46 @@ XMP_PUBLIC WXMPMeta_SetProperty_Date_1 ( XMPMetaRef xmpRef,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_GetObjectName_1 ( XMPMetaRef xmpRef, WXMPMeta_GetObjectName_1 ( XMPMetaRef xmpRef,
void * objName, XMP_StringPtr * namePtr,
SetClientStringProc SetClientString, XMP_StringLen * nameLen,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_SetObjectName_1 ( XMPMetaRef xmpRef, WXMPMeta_SetObjectName_1 ( XMPMetaRef xmpRef,
XMP_StringPtr name, XMP_StringPtr name,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_GetObjectOptions_1 ( XMPMetaRef xmpRef, WXMPMeta_GetObjectOptions_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_SetObjectOptions_1 ( XMPMetaRef xmpRef, WXMPMeta_SetObjectOptions_1 ( XMPMetaRef xmpRef,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_Sort_1 ( XMPMetaRef xmpRef, WXMPMeta_Sort_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_Erase_1 ( XMPMetaRef xmpRef, WXMPMeta_Erase_1 ( XMPMetaRef xmpRef,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_Clone_1 ( XMPMetaRef xmpRef, WXMPMeta_Clone_1 ( XMPMetaRef xmpRef,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_CountArrayItems_1 ( XMPMetaRef xmpRef, WXMPMeta_CountArrayItems_1 ( XMPMetaRef xmpRef,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
extern void extern void
XMP_PUBLIC WXMPMeta_DumpObject_1 ( XMPMetaRef xmpRef, WXMPMeta_DumpObject_1 ( XMPMetaRef xmpRef,
XMP_TextOutputProc outProc, XMP_TextOutputProc outProc,
void * refCon, void * refCon,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
@ -587,45 +596,23 @@ XMP_PUBLIC WXMPMeta_DumpObject_1 ( XMPMetaRef xmpRef,
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPMeta_ParseFromBuffer_1 ( XMPMetaRef xmpRef, WXMPMeta_ParseFromBuffer_1 ( XMPMetaRef xmpRef,
XMP_StringPtr buffer, XMP_StringPtr buffer,
XMP_StringLen bufferSize, XMP_StringLen bufferSize,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPMeta_SerializeToBuffer_1 ( XMPMetaRef xmpRef, WXMPMeta_SerializeToBuffer_1 ( XMPMetaRef xmpRef,
void * pktString, XMP_StringPtr * pktString,
XMP_StringLen * pktSize,
XMP_OptionBits options, XMP_OptionBits options,
XMP_StringLen padding, XMP_StringLen padding,
XMP_StringPtr newline, XMP_StringPtr newline,
XMP_StringPtr indent, XMP_StringPtr indent,
XMP_Index baseIndent, XMP_Index baseIndent,
SetClientStringProc SetClientString,
WXMP_Result * wResult ) /* const */ ; WXMP_Result * wResult ) /* const */ ;
// -------------------------------------------------------------------------------------------------
extern void
XMP_PUBLIC WXMPMeta_SetDefaultErrorCallback_1 ( XMPMeta_ErrorCallbackWrapper wrapperProc,
XMPMeta_ErrorCallbackProc clientProc,
void * context,
XMP_Uns32 limit,
WXMP_Result * wResult );
extern void
XMP_PUBLIC WXMPMeta_SetErrorCallback_1 ( XMPMetaRef xmpRef,
XMPMeta_ErrorCallbackWrapper wrapperProc,
XMPMeta_ErrorCallbackProc clientProc,
void * context,
XMP_Uns32 limit,
WXMP_Result * wResult );
extern void
XMP_PUBLIC WXMPMeta_ResetErrorCallbackLimit_1 ( XMPMetaRef xmpRef,
XMP_Uns32 limit,
WXMP_Result * wResult );
// ================================================================================================= // =================================================================================================
#if __cplusplus #if __cplusplus

@ -2,7 +2,7 @@
#define __WXMPUtils_hpp__ 1 #define __WXMPUtils_hpp__ 1
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2008 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -10,41 +10,42 @@
// ================================================================================================= // =================================================================================================
#include "client-glue/WXMP_Common.hpp" #include "client-glue/WXMP_Common.hpp"
#if __cplusplus #if __cplusplus
extern "C" { extern "C" {
#endif #endif
// ================================================================================================= // =================================================================================================
#define zXMPUtils_ComposeArrayItemPath_1(schemaNS,arrayName,itemIndex,itemPath,SetClientString) \ #define zXMPUtils_ComposeArrayItemPath_1(schemaNS,arrayName,itemIndex,fullPath,pathSize) \
WXMPUtils_ComposeArrayItemPath_1 ( schemaNS, arrayName, itemIndex, itemPath, SetClientString, &wResult ); WXMPUtils_ComposeArrayItemPath_1 ( schemaNS, arrayName, itemIndex, fullPath, pathSize, &wResult );
#define zXMPUtils_ComposeStructFieldPath_1(schemaNS,structName,fieldNS,fieldName,fieldPath,SetClientString) \ #define zXMPUtils_ComposeStructFieldPath_1(schemaNS,structName,fieldNS,fieldName,fullPath,pathSize) \
WXMPUtils_ComposeStructFieldPath_1 ( schemaNS, structName, fieldNS, fieldName, fieldPath, SetClientString, &wResult ); WXMPUtils_ComposeStructFieldPath_1 ( schemaNS, structName, fieldNS, fieldName, fullPath, pathSize, &wResult );
#define zXMPUtils_ComposeQualifierPath_1(schemaNS,propName,qualNS,qualName,qualPath,SetClientString) \ #define zXMPUtils_ComposeQualifierPath_1(schemaNS,propName,qualNS,qualName,fullPath,pathSize) \
WXMPUtils_ComposeQualifierPath_1 ( schemaNS, propName, qualNS, qualName, qualPath, SetClientString, &wResult ); WXMPUtils_ComposeQualifierPath_1 ( schemaNS, propName, qualNS, qualName, fullPath, pathSize, &wResult );
#define zXMPUtils_ComposeLangSelector_1(schemaNS,arrayName,langName,selPath,SetClientString) \ #define zXMPUtils_ComposeLangSelector_1(schemaNS,arrayName,langName,fullPath,pathSize) \
WXMPUtils_ComposeLangSelector_1 ( schemaNS, arrayName, langName, selPath, SetClientString, &wResult ); WXMPUtils_ComposeLangSelector_1 ( schemaNS, arrayName, langName, fullPath, pathSize, &wResult );
#define zXMPUtils_ComposeFieldSelector_1(schemaNS,arrayName,fieldNS,fieldName,fieldValue,selPath,SetClientString) \ #define zXMPUtils_ComposeFieldSelector_1(schemaNS,arrayName,fieldNS,fieldName,fieldValue,fullPath,pathSize) \
WXMPUtils_ComposeFieldSelector_1 ( schemaNS, arrayName, fieldNS, fieldName, fieldValue, selPath, SetClientString, &wResult ); WXMPUtils_ComposeFieldSelector_1 ( schemaNS, arrayName, fieldNS, fieldName, fieldValue, fullPath, pathSize, &wResult );
#define zXMPUtils_ConvertFromBool_1(binValue,strValue,SetClientString) \ #define zXMPUtils_ConvertFromBool_1(binValue,strValue,strSize) \
WXMPUtils_ConvertFromBool_1 ( binValue, strValue, SetClientString, &wResult ); WXMPUtils_ConvertFromBool_1 ( binValue, strValue, strSize, &wResult );
#define zXMPUtils_ConvertFromInt_1(binValue,format,strValue,SetClientString) \ #define zXMPUtils_ConvertFromInt_1(binValue,format,strValue,strSize) \
WXMPUtils_ConvertFromInt_1 ( binValue, format, strValue, SetClientString, &wResult ); WXMPUtils_ConvertFromInt_1 ( binValue, format, strValue, strSize, &wResult );
#define zXMPUtils_ConvertFromInt64_1(binValue,format,strValue,SetClientString) \ #define zXMPUtils_ConvertFromInt64_1(binValue,format,strValue,strSize) \
WXMPUtils_ConvertFromInt64_1 ( binValue, format, strValue, SetClientString, &wResult ); WXMPUtils_ConvertFromInt64_1 ( binValue, format, strValue, strSize, &wResult );
#define zXMPUtils_ConvertFromFloat_1(binValue,format,strValue,SetClientString) \ #define zXMPUtils_ConvertFromFloat_1(binValue,format,strValue,strSize) \
WXMPUtils_ConvertFromFloat_1 ( binValue, format, strValue, SetClientString, &wResult ); WXMPUtils_ConvertFromFloat_1 ( binValue, format, strValue, strSize, &wResult );
#define zXMPUtils_ConvertFromDate_1(binValue,strValue,SetClientString) \ #define zXMPUtils_ConvertFromDate_1(binValue,strValue,strSize) \
WXMPUtils_ConvertFromDate_1 ( binValue, strValue, SetClientString, &wResult ); WXMPUtils_ConvertFromDate_1 ( binValue, strValue, strSize, &wResult );
#define zXMPUtils_ConvertToBool_1(strValue) \ #define zXMPUtils_ConvertToBool_1(strValue) \
WXMPUtils_ConvertToBool_1 ( strValue, &wResult ); WXMPUtils_ConvertToBool_1 ( strValue, &wResult );
@ -76,206 +77,213 @@ extern "C" {
#define zXMPUtils_CompareDateTime_1(left,right) \ #define zXMPUtils_CompareDateTime_1(left,right) \
WXMPUtils_CompareDateTime_1 ( left, right, &wResult ); WXMPUtils_CompareDateTime_1 ( left, right, &wResult );
#define zXMPUtils_EncodeToBase64_1(rawStr,rawLen,encodedStr,SetClientString) \ #define zXMPUtils_EncodeToBase64_1(rawStr,rawLen,encodedStr,encodedLen) \
WXMPUtils_EncodeToBase64_1 ( rawStr, rawLen, encodedStr, SetClientString, &wResult ); WXMPUtils_EncodeToBase64_1 ( rawStr, rawLen, encodedStr, encodedLen, &wResult );
#define zXMPUtils_DecodeFromBase64_1(encodedStr,encodedLen,rawStr,SetClientString) \ #define zXMPUtils_DecodeFromBase64_1(encodedStr,encodedLen,rawStr,rawLen) \
WXMPUtils_DecodeFromBase64_1 ( encodedStr, encodedLen, rawStr, SetClientString, &wResult ); WXMPUtils_DecodeFromBase64_1 ( encodedStr, encodedLen, rawStr, rawLen, &wResult );
#define zXMPUtils_PackageForJPEG_1(xmpObj,stdStr,extStr,digestStr,SetClientString) \ #define zXMPUtils_PackageForJPEG_1(xmpObj,stdStr,stdLen,extStr,extLen,digestStr,digestLen) \
WXMPUtils_PackageForJPEG_1 ( xmpObj, stdStr, extStr, digestStr, SetClientString, &wResult ); WXMPUtils_PackageForJPEG_1 ( xmpObj, stdStr, stdLen, extStr, extLen, digestStr, digestLen, &wResult );
#define zXMPUtils_MergeFromJPEG_1(fullXMP,extendedXMP) \ #define zXMPUtils_MergeFromJPEG_1(fullXMP,extendedXMP) \
WXMPUtils_MergeFromJPEG_1 ( fullXMP, extendedXMP, &wResult ); WXMPUtils_MergeFromJPEG_1 ( fullXMP, extendedXMP, &wResult );
#define zXMPUtils_CatenateArrayItems_1(xmpObj,schemaNS,arrayName,separator,quotes,options,catedStr,SetClientString) \ #define zXMPUtils_CatenateArrayItems_1(xmpObj,schemaNS,arrayName,separator,quotes,options,catedPtr,catedLen) \
WXMPUtils_CatenateArrayItems_1 ( xmpObj, schemaNS, arrayName, separator, quotes, options, catedStr, SetClientString, &wResult ); WXMPUtils_CatenateArrayItems_1 ( xmpObj, schemaNS, arrayName, separator, quotes, options, catedPtr, catedLen, &wResult );
#define zXMPUtils_SeparateArrayItems_1(xmpObj,schemaNS,arrayName,options,catedStr) \ #define zXMPUtils_SeparateArrayItems_1(xmpObj,schemaNS,arrayName,options,catedStr) \
WXMPUtils_SeparateArrayItems_1 ( xmpObj, schemaNS, arrayName, options, catedStr, &wResult ); WXMPUtils_SeparateArrayItems_1 ( xmpObj, schemaNS, arrayName, options, catedStr, &wResult );
#define zXMPUtils_ApplyTemplate_1(workingXMP,templateXMP,actions) \
WXMPUtils_ApplyTemplate_1 ( workingXMP, templateXMP, actions, &wResult );
#define zXMPUtils_RemoveProperties_1(xmpObj,schemaNS,propName,options) \ #define zXMPUtils_RemoveProperties_1(xmpObj,schemaNS,propName,options) \
WXMPUtils_RemoveProperties_1 ( xmpObj, schemaNS, propName, options, &wResult ); WXMPUtils_RemoveProperties_1 ( xmpObj, schemaNS, propName, options, &wResult );
#define zXMPUtils_AppendProperties_1(source,dest,options) \
WXMPUtils_AppendProperties_1 ( source, dest, options, &wResult );
#define zXMPUtils_DuplicateSubtree_1(source,dest,sourceNS,sourceRoot,destNS,destRoot,options) \ #define zXMPUtils_DuplicateSubtree_1(source,dest,sourceNS,sourceRoot,destNS,destRoot,options) \
WXMPUtils_DuplicateSubtree_1 ( source, dest, sourceNS, sourceRoot, destNS, destRoot, options, &wResult ); WXMPUtils_DuplicateSubtree_1 ( source, dest, sourceNS, sourceRoot, destNS, destRoot, options, &wResult );
// ================================================================================================= // =================================================================================================
extern void extern void
XMP_PUBLIC WXMPUtils_ComposeArrayItemPath_1 ( XMP_StringPtr schemaNS, WXMPUtils_Unlock_1 ( XMP_OptionBits options );
// -------------------------------------------------------------------------------------------------
extern void
WXMPUtils_ComposeArrayItemPath_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_Index itemIndex, XMP_Index itemIndex,
void * itemPath, XMP_StringPtr * fullPath,
SetClientStringProc SetClientString, XMP_StringLen * pathSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ComposeStructFieldPath_1 ( XMP_StringPtr schemaNS, WXMPUtils_ComposeStructFieldPath_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr structName, XMP_StringPtr structName,
XMP_StringPtr fieldNS, XMP_StringPtr fieldNS,
XMP_StringPtr fieldName, XMP_StringPtr fieldName,
void * fieldPath, XMP_StringPtr * fullPath,
SetClientStringProc SetClientString, XMP_StringLen * pathSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ComposeQualifierPath_1 ( XMP_StringPtr schemaNS, WXMPUtils_ComposeQualifierPath_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr propName, XMP_StringPtr propName,
XMP_StringPtr qualNS, XMP_StringPtr qualNS,
XMP_StringPtr qualName, XMP_StringPtr qualName,
void * qualPath, XMP_StringPtr * fullPath,
SetClientStringProc SetClientString, XMP_StringLen * pathSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ComposeLangSelector_1 ( XMP_StringPtr schemaNS, WXMPUtils_ComposeLangSelector_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_StringPtr langName, XMP_StringPtr langName,
void * selPath, XMP_StringPtr * fullPath,
SetClientStringProc SetClientString, XMP_StringLen * pathSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ComposeFieldSelector_1 ( XMP_StringPtr schemaNS, WXMPUtils_ComposeFieldSelector_1 ( XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_StringPtr fieldNS, XMP_StringPtr fieldNS,
XMP_StringPtr fieldName, XMP_StringPtr fieldName,
XMP_StringPtr fieldValue, XMP_StringPtr fieldValue,
void * selPath, XMP_StringPtr * fullPath,
SetClientStringProc SetClientString, XMP_StringLen * pathSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertFromBool_1 ( XMP_Bool binValue, WXMPUtils_ConvertFromBool_1 ( XMP_Bool binValue,
void * strValue, XMP_StringPtr * strValue,
SetClientStringProc SetClientString, XMP_StringLen * strSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertFromInt_1 ( XMP_Int32 binValue, WXMPUtils_ConvertFromInt_1 ( XMP_Int32 binValue,
XMP_StringPtr format, XMP_StringPtr format,
void * strValue, XMP_StringPtr * strValue,
SetClientStringProc SetClientString, XMP_StringLen * strSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertFromInt64_1 ( XMP_Int64 binValue, WXMPUtils_ConvertFromInt64_1 ( XMP_Int64 binValue,
XMP_StringPtr format, XMP_StringPtr format,
void * strValue, XMP_StringPtr * strValue,
SetClientStringProc SetClientString, XMP_StringLen * strSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertFromFloat_1 ( double binValue, WXMPUtils_ConvertFromFloat_1 ( double binValue,
XMP_StringPtr format, XMP_StringPtr format,
void * strValue, XMP_StringPtr * strValue,
SetClientStringProc SetClientString, XMP_StringLen * strSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertFromDate_1 ( const XMP_DateTime & binValue, WXMPUtils_ConvertFromDate_1 ( const XMP_DateTime & binValue,
void * strValue, XMP_StringPtr * strValue,
SetClientStringProc SetClientString, XMP_StringLen * strSize,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToBool_1 ( XMP_StringPtr strValue, WXMPUtils_ConvertToBool_1 ( XMP_StringPtr strValue,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToInt_1 ( XMP_StringPtr strValue, WXMPUtils_ConvertToInt_1 ( XMP_StringPtr strValue,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToInt64_1 ( XMP_StringPtr strValue, WXMPUtils_ConvertToInt64_1 ( XMP_StringPtr strValue,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToFloat_1 ( XMP_StringPtr strValue, WXMPUtils_ConvertToFloat_1 ( XMP_StringPtr strValue,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToDate_1 ( XMP_StringPtr strValue, WXMPUtils_ConvertToDate_1 ( XMP_StringPtr strValue,
XMP_DateTime * binValue, XMP_DateTime * binValue,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPUtils_CurrentDateTime_1 ( XMP_DateTime * time, WXMPUtils_CurrentDateTime_1 ( XMP_DateTime * time,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_SetTimeZone_1 ( XMP_DateTime * time, WXMPUtils_SetTimeZone_1 ( XMP_DateTime * time,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToUTCTime_1 ( XMP_DateTime * time, WXMPUtils_ConvertToUTCTime_1 ( XMP_DateTime * time,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ConvertToLocalTime_1 ( XMP_DateTime * time, WXMPUtils_ConvertToLocalTime_1 ( XMP_DateTime * time,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_CompareDateTime_1 ( const XMP_DateTime & left, WXMPUtils_CompareDateTime_1 ( const XMP_DateTime & left,
const XMP_DateTime & right, const XMP_DateTime & right,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPUtils_EncodeToBase64_1 ( XMP_StringPtr rawStr, WXMPUtils_EncodeToBase64_1 ( XMP_StringPtr rawStr,
XMP_StringLen rawLen, XMP_StringLen rawLen,
void * encodedStr, XMP_StringPtr * encodedStr,
SetClientStringProc SetClientString, XMP_StringLen * encodedLen,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_DecodeFromBase64_1 ( XMP_StringPtr encodedStr, WXMPUtils_DecodeFromBase64_1 ( XMP_StringPtr encodedStr,
XMP_StringLen encodedLen, XMP_StringLen encodedLen,
void * rawStr, XMP_StringPtr * rawStr,
SetClientStringProc SetClientString, XMP_StringLen * rawLen,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPUtils_PackageForJPEG_1 ( XMPMetaRef xmpObj, WXMPUtils_PackageForJPEG_1 ( XMPMetaRef xmpObj,
void * stdStr, XMP_StringPtr * stdStr,
void * extStr, XMP_StringLen * stdLen,
void * digestStr, XMP_StringPtr * extStr,
SetClientStringProc SetClientString, XMP_StringLen * extLen,
XMP_StringPtr * digestStr,
XMP_StringLen * digestLen,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_MergeFromJPEG_1 ( XMPMetaRef fullXMP, WXMPUtils_MergeFromJPEG_1 ( XMPMetaRef fullXMP,
XMPMetaRef extendedXMP, XMPMetaRef extendedXMP,
WXMP_Result * wResult ); WXMP_Result * wResult );
// ------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
extern void extern void
XMP_PUBLIC WXMPUtils_CatenateArrayItems_1 ( XMPMetaRef xmpObj, WXMPUtils_CatenateArrayItems_1 ( XMPMetaRef xmpObj,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_StringPtr separator, XMP_StringPtr separator,
XMP_StringPtr quotes, XMP_StringPtr quotes,
XMP_OptionBits options, XMP_OptionBits options,
void * catedStr, XMP_StringPtr * catedStr,
SetClientStringProc SetClientString, XMP_StringLen * catedLen,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_SeparateArrayItems_1 ( XMPMetaRef xmpObj, WXMPUtils_SeparateArrayItems_1 ( XMPMetaRef xmpObj,
XMP_StringPtr schemaNS, XMP_StringPtr schemaNS,
XMP_StringPtr arrayName, XMP_StringPtr arrayName,
XMP_OptionBits options, XMP_OptionBits options,
@ -283,20 +291,20 @@ XMP_PUBLIC WXMPUtils_SeparateArrayItems_1 ( XMPMetaRef xmpObj,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_ApplyTemplate_1 ( XMPMetaRef workingXMP, WXMPUtils_RemoveProperties_1 ( XMPMetaRef xmpObj,
XMPMetaRef templateXMP, XMP_StringPtr schemaNS,
XMP_StringPtr propName,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_RemoveProperties_1 ( XMPMetaRef xmpObj, WXMPUtils_AppendProperties_1 ( XMPMetaRef source,
XMP_StringPtr schemaNS, XMPMetaRef dest,
XMP_StringPtr propName,
XMP_OptionBits options, XMP_OptionBits options,
WXMP_Result * wResult ); WXMP_Result * wResult );
extern void extern void
XMP_PUBLIC WXMPUtils_DuplicateSubtree_1 ( XMPMetaRef source, WXMPUtils_DuplicateSubtree_1 ( XMPMetaRef source,
XMPMetaRef dest, XMPMetaRef dest,
XMP_StringPtr sourceNS, XMP_StringPtr sourceNS,
XMP_StringPtr sourceRoot, XMP_StringPtr sourceRoot,

@ -2,7 +2,7 @@
#define __WXMP_Common_hpp__ 1 #define __WXMP_Common_hpp__ 1
// ================================================================================================= // =================================================================================================
// Copyright 2002 Adobe Systems Incorporated // Copyright 2002-2007 Adobe Systems Incorporated
// All Rights Reserved. // All Rights Reserved.
// //
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@ -20,16 +20,13 @@
#define XMP_CTorDTorIntro(Class) template <class tStringObj> XMP_Inline Class<tStringObj> #define XMP_CTorDTorIntro(Class) template <class tStringObj> XMP_Inline Class<tStringObj>
#define XMP_MethodIntro(Class,ResultType) template <class tStringObj> XMP_Inline ResultType Class<tStringObj> #define XMP_MethodIntro(Class,ResultType) template <class tStringObj> XMP_Inline ResultType Class<tStringObj>
typedef void (* SetClientStringProc) ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
typedef void (* SetClientStringVectorProc) ( void * clientPtr, XMP_StringPtr * arrayPtr, XMP_Uns32 stringCount );
struct WXMP_Result { struct WXMP_Result {
XMP_StringPtr errMessage; XMP_StringPtr errMessage;
void * ptrResult; void * ptrResult;
double floatResult; double floatResult;
XMP_Uns64 int64Result; XMP_Uns64 int64Result;
XMP_Uns32 int32Result; XMP_Uns32 int32Result;
WXMP_Result() : errMessage(0),ptrResult(NULL),floatResult(0),int64Result(0),int32Result(0){}; WXMP_Result() : errMessage(0) {};
}; };
#if __cplusplus #if __cplusplus
@ -39,37 +36,35 @@ extern "C" {
#define PropagateException(res) \ #define PropagateException(res) \
if ( res.errMessage != 0 ) throw XMP_Error ( res.int32Result, res.errMessage ); if ( res.errMessage != 0 ) throw XMP_Error ( res.int32Result, res.errMessage );
#ifndef XMP_TraceClientCalls #ifndef TraceXMPCalls
#define XMP_TraceClientCalls 0 #define TraceXMPCalls 0
#define XMP_TraceClientCallsToFile 0
#endif #endif
#if ! XMP_TraceClientCalls #if ! TraceXMPCalls
#define InvokeCheck(WCallProto) \ #define InvokeCheck(WCallProto) \
WXMP_Result wResult; \ WXMP_Result wResult; \
WCallProto; \ WCallProto; \
PropagateException ( wResult ) PropagateException ( wResult )
#else #else
extern FILE * xmpClientLog;
#define InvokeCheck(WCallProto) \ #define InvokeCheck(WCallProto) \
WXMP_Result wResult; \ WXMP_Result wResult; \
fprintf ( xmpClientLog, "WXMP calling: %s\n", #WCallProto ); fflush ( xmpClientLog ); \ fprintf ( stderr, "WXMP calling: %s\n", #WCallProto ); fflush ( stderr ); \
WCallProto; \ WCallProto; \
if ( wResult.errMessage == 0 ) { \ if ( wResult.errMessage == 0 ) { \
fprintf ( xmpClientLog, "WXMP back, no error\n" ); fflush ( xmpClientLog ); \ fprintf ( stderr, "WXMP back, no error\n" ); fflush ( stderr ); \
} else { \ } else { \
fprintf ( xmpClientLog, "WXMP back, error: %s\n", wResult.errMessage ); fflush ( xmpClientLog ); \ fprintf ( stderr, "WXMP back, error: %s\n", wResult.errMessage ); fflush ( stderr ); \
} \ } \
PropagateException ( wResult ) PropagateException ( wResult )
#endif #endif
// ================================================================================================= // -------------------------------------------------------------------------------------------------
#define WrapNoCheckVoid(WCallProto) \ #define WrapNoCheckVoid(WCallProto) \
WCallProto; WCallProto;
#define WrapCheckVoid(WCallProto) \ #define WrapCheckVoid(WCallProto) \
InvokeCheck(WCallProto); InvokeCheck(WCallProto)
#define WrapCheckMetaRef(result,WCallProto) \ #define WrapCheckMetaRef(result,WCallProto) \
InvokeCheck(WCallProto); \ InvokeCheck(WCallProto); \
@ -83,10 +78,6 @@ extern "C" {
InvokeCheck(WCallProto); \ InvokeCheck(WCallProto); \
XMPDocOpsRef result = XMPDocOpsRef(wResult.ptrResult) XMPDocOpsRef result = XMPDocOpsRef(wResult.ptrResult)
#define WrapCheckNewMetadata(result,WCallProto) \
InvokeCheck(WCallProto); \
void * result = wResult.ptrResult
#define WrapCheckBool(result,WCallProto) \ #define WrapCheckBool(result,WCallProto) \
InvokeCheck(WCallProto); \ InvokeCheck(WCallProto); \
bool result = bool(wResult.int32Result) bool result = bool(wResult.int32Result)
@ -126,7 +117,7 @@ extern "C" {
// ================================================================================================= // =================================================================================================
#if __cplusplus #if __cplusplus
} // extern "C" } /* extern "C" */
#endif #endif
#endif // __WXMP_Common_hpp__ #endif // __WXMP_Common_hpp__

Loading…
Cancel
Save