1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
// =================================================================================================
// Copyright Adobe
// Copyright 2011 Adobe
// 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.
// =================================================================================================
#ifndef PLUGINHANDLERINSTANCE_H
#define PLUGINHANDLERINSTANCE_H
#include "FileHandler.h"
namespace XMP_PLUGIN
{
/** @class FileHandlerInstance
* @brief This class is equivalent to the native file handlers like JPEG_MetaHandler or the simialr one.
*
* This class is equivalent to the native file handler. This class is supposed to support all the
* function which a native file handler support.
* As of now, it support only the functions required for OwningFileHandler.
*/
class FileHandlerInstance : public XMPFileHandler
{
public:
FileHandlerInstance ( SessionRef object, FileHandlerSharedPtr handler, XMPFiles * parent );
virtual ~FileHandlerInstance();
virtual bool GetFileModDate ( XMP_DateTime * modDate );
virtual void CacheFileData();
virtual void ProcessXMP();
//virtual XMP_OptionBits GetSerializeOptions(); //It should not be needed as its required only inside updateFile.
virtual void UpdateFile ( bool doSafeUpdate );
virtual void WriteTempFile ( XMP_IO* tempRef );
virtual void FillMetadataFiles ( std::vector<std::string> * metadataFiles );
virtual void FillAssociatedResources ( std::vector<std::string> * resourceList );
virtual bool IsMetadataWritable ( );
virtual void SetErrorCallback ( ErrorCallbackBox errorCallbackBox );
virtual void SetProgressCallback ( XMP_ProgressTracker::CallbackInfo * progCBInfoPtr );
inline SessionRef GetSession() const { return mObject; }
inline FileHandlerSharedPtr GetHandlerInfo() const { return mHandler; }
private:
SessionRef mObject;
FileHandlerSharedPtr mHandler;
};
} //namespace XMP_PLUGIN
#endif
|