diff options
author | Hubert Figuiere <hub@figuiere.net> | 2008-11-17 23:42:00 -0500 |
---|---|---|
committer | Hubert Figuiere <hub@figuiere.net> | 2008-11-17 23:42:00 -0500 |
commit | 88af812fde414aca8f9add90bc800ea3d8e9a281 (patch) | |
tree | 0403dd1897c0b287d4d710dd422827683c59dfcb /source/common/ExpatAdapter.hpp | |
parent | 9d7d7c3caac05db240692ad7e9196fcb7f5a1ce5 (diff) |
upgrade to XMP-SDK 4.4.2
Diffstat (limited to 'source/common/ExpatAdapter.hpp')
-rw-r--r-- | source/common/ExpatAdapter.hpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/source/common/ExpatAdapter.hpp b/source/common/ExpatAdapter.hpp new file mode 100644 index 0000000..9d6c9ec --- /dev/null +++ b/source/common/ExpatAdapter.hpp @@ -0,0 +1,50 @@ +#ifndef __ExpatAdapter_hpp__ +#define __ExpatAdapter_hpp__ + +// ================================================================================================= +// Copyright 2005-2008 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. +// ================================================================================================= + +#include "XMP_Environment.h" // ! Must be the first #include! +#include "XMLParserAdapter.hpp" + +// ================================================================================================= +// Derived XML parser adapter for Expat. +// ================================================================================================= + +#ifndef BanAllEntityUsage + #define BanAllEntityUsage 0 +#endif + +struct XML_ParserStruct; // ! Hack to avoid exposing expat.h to all clients. +typedef struct XML_ParserStruct *XML_Parser; + +class ExpatAdapter : public XMLParserAdapter { +public: + + XML_Parser parser; + + #if BanAllEntityUsage + bool isAborted; + #endif + + #if XMP_DebugBuild + size_t elemNesting; + #endif + + ExpatAdapter(); + virtual ~ExpatAdapter(); + + void ParseBuffer ( const void * buffer, size_t length, bool last = true ); + +}; + +extern "C" ExpatAdapter * XMP_NewExpatAdapter(); + +// ================================================================================================= + +#endif // __ExpatAdapter_hpp__ |