diff --git a/xmpsdk/include/MD5.h b/xmpsdk/include/MD5.h new file mode 100644 index 00000000..f6c5e783 --- /dev/null +++ b/xmpsdk/include/MD5.h @@ -0,0 +1,60 @@ +#ifndef __MD5_h__ +#define __MD5_h__ + +/* + * This is the header file for the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5_CTX structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + * + * Changed so as no longer to depend on Colin Plumb's `usual.h' + * header definitions; now uses stuff from dpkg's config.h + * - Ian Jackson . + * Still in the public domain. + */ + +#include + +#ifdef _MSC_VER +// _MSC_VER 1600 == Visual Studio 2010 +# if _MSC_VER < 1600 +# ifdef EXV_HAVE_STDINT_H +# undef EXV_HAVE_STDINT_H +# endif +# endif +#endif + +#if defined(EXV_HAVE_STDINT_H) || defined(__MINGW32__) || defined(__MING64__) +# include +#endif + +/* MSVC doesn't provide C99 types, but it has MS specific variants */ +#ifdef _MSC_VER +typedef unsigned __int32 uint32_t; +#endif + +typedef unsigned char md5byte; +typedef uint32_t UWORD32; + +struct MD5_CTX { + UWORD32 buf[4]; + UWORD32 bytes[2]; + UWORD32 in[16]; +}; + +extern void MD5Init(struct MD5_CTX *context); +extern void MD5Update(struct MD5_CTX *context, md5byte const *buf, unsigned len); +extern void MD5Final(unsigned char digest[16], struct MD5_CTX *context); +extern void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]); + +#endif diff --git a/xmpsdk/include/XMPSDK.hpp b/xmpsdk/include/XMPSDK.hpp new file mode 100644 index 00000000..229714f8 --- /dev/null +++ b/xmpsdk/include/XMPSDK.hpp @@ -0,0 +1,89 @@ +#ifndef __XMP_hpp__ +#define __XMP_hpp__ 1 + +// ================================================================================================= +// Copyright 2002-2007 Adobe Systems Incorporated +// All Rights Reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +// of the Adobe license agreement accompanying it. +// ================================================================================================= + +// ================================================================================================ +/// \file XMPSDK.hpp +/// \brief Overall header file for the XMP Toolkit +/// +/// This is an overall header file, the only one that C++ clients should include. +/// +/// The full client API is in the \c TXMPMeta.hpp, \c TXMPIterator.hpp, \c TXMPUtils.hpp headers. +/// Read these for information, but do not include them directly. The \c TXMP... classes are C++ +/// template classes that must be instantiated with a string class such as \c std::string. The +/// string class is used to return text strings for property values, serialized XMP, and so on. +/// Clients must also compile \c XMP.incl_cpp to ensure that all client-side glue code is generated. +/// This should be done by including it in exactly one client source file. +/// +/// There are two C preprocessor macros that simplify use of the templates: +/// +/// \li \c TXMP_STRING_TYPE - Define this as the string class to use with the template. You will get +/// the template headers included and typedefs (\c SXMPMeta, and so on) to use in your code. +/// +/// \li \c TXMP_EXPAND_INLINE - Define this as 1 if you want to have the template functions expanded +/// inline in your code. Leave it undefined, or defined as 0, to use out-of-line instantiations of +/// the template functions. Compiling \c XMP.incl_cpp generates explicit out-of-line +/// instantiations if \c TXMP_EXPAND_INLINE is off. +/// +/// The template parameter, class \c tStringObj, must have the following member functions (which +/// match those for \c std::string): +/// +///
+///  tStringObj& assign ( const char * str, size_t len )
+///  size_t size() const
+///  const char * c_str() const
+/// 
+/// +/// The string class must be suitable for at least UTF-8. This is the encoding used for all general +/// values, and is the default encoding for serialized XMP. The string type must also be suitable +/// for UTF-16 or UTF-32 if those serialization encodings are used. This mainly means tolerating +/// embedded 0 bytes, which \c std::string does. +// ================================================================================================ + +/// /c XMP_Environment.h must be the first included header. +#include "XMP_Environment.h" + +#include "XMP_Version.h" +#include "XMP_Const.h" + +#ifdef _MSC_VER + #if XMP_DebugBuild + #pragma warning ( push, 4 ) + #else + #pragma warning ( push, 3 ) + #endif + #pragma warning ( disable : 4702 ) // unreachable code + #pragma warning ( disable : 4800 ) // forcing value to bool 'true' or 'false' (performance warning) +#endif + +#if defined ( TXMP_STRING_TYPE ) + + #include "TXMPMeta.hpp" + #include "TXMPIterator.hpp" + #include "TXMPUtils.hpp" + typedef class TXMPMeta SXMPMeta; // For client convenience. + typedef class TXMPIterator SXMPIterator; + typedef class TXMPUtils SXMPUtils; + #if TXMP_EXPAND_INLINE + #error "TXMP_EXPAND_INLINE is not working at present. Please don't use it." + #include "client-glue/TXMPMeta.incl_cpp" + #include "client-glue/TXMPIterator.incl_cpp" + #include "client-glue/TXMPUtils.incl_cpp" + #endif + +#endif // TXMP_STRING_TYPE + +#ifdef _MSC_VER + #pragma warning ( pop ) +#endif + +// ================================================================================================= + +#endif // __XMP_hpp__