1 #ifndef __TXMPFiles_hpp__ 2 #define __TXMPFiles_hpp__ 1 5 #error "Do not directly include, use XMP.hpp" 61 #if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds. 66 template <
class tStringObj>
134 static bool Initialize (
const char* pluginFolder,
const char* plugins = NULL );
416 std::vector<tStringObj>* resourceList,
512 bool OpenFile (
const tStringObj & filePath,
516 #if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds. 628 bool GetXMP ( SXMPMeta * xmpObj = 0,
629 tStringObj * xmpPacket = 0,
641 void PutXMP (
const SXMPMeta & xmpObj );
652 void PutXMP (
const tStringObj & xmpPacket );
704 bool CanPutXMP (
const SXMPMeta & xmpObj );
715 bool CanPutXMP (
const tStringObj & xmpPacket );
760 float interval = 1.0,
bool sendStartStop =
false );
777 float interval = 1.0,
bool sendStartStop =
false );
854 #endif // __TXMPFiles_hpp__ XMP_Uns32 XMP_StringLen
The type for string length parameters. A 32-bit unsigned integer, as big as will be practically neede...
static bool Initialize()
Initializes the XMPFiles library; must be called before creating an SXMPFiles object.
const char * XMP_StringPtr
The type for input string parameters. A const char *, a null-terminated UTF-8 string.
Abstract base class for client-managed I/O with TXMPFiles.
void CloseFile(XMP_OptionBits closeFlags=0)
CloseFile() explicitly closes an opened file.
*static bool GetFormatInfo(XMP_FileFormat format, XMP_OptionBits *handlerFlags=0)
GetFormatInfo() reports what features are supported for a specific file format.
static void SetDefaultProgressCallback(XMP_ProgressReportProc proc, void *context=0, float interval=1.0, bool sendStartStop=false)
SetDefaultProgressCallback() sets a global default for progress tracking. This is used as a default f...
struct __XMPFiles__ * XMPFilesRef
An "ABI safe" pointer to the internal part of an XMP file-handling object. Use to pass an XMP file-ha...
void SetErrorCallback(XMPFiles_ErrorCallbackProc proc, void *context=0, XMP_Uns32 limit=1)
SetErrorCallback() registers an error notification callback.
XMPFilesRef GetInternalRef()
GetInternalRef() retrieves an internal reference that can be safely passed across DLL boundaries and ...
XMP Toolkit version information.
static bool IsMetadataWritable(XMP_StringPtr filePath, bool *writable, XMP_FileFormat format=kXMP_UnknownFile, XMP_OptionBits options=0)
IsMetadataWritable() returns true if metadata can be updated for the given media path.
static XMP_FileFormat CheckPackageFormat(XMP_StringPtr folderPath)
CheckPackageFormat() tries to determine the format of a "package" folder.
TXMPFiles()
Default constructor initializes an object that is associated with no file.
bool GetXMP(SXMPMeta *xmpObj=0, tStringObj *xmpPacket=0, XMP_PacketInfo *packetInfo=0)
GetXMP() retrieves the XMP metadata from an open file.
#define kXMP_UseNullTermination
Options macro sets string style.
XMP_Uns32 XMP_FileFormat
Type for file format identification constants. See kXMP_PDFFile and following.
The expanded type for a date and time.
XMP_Uns32 XMP_OptionBits
The type for a collection of 32 flag bits.
static void Terminate()
Terminates use of the XMPFiles library.
void PutXMP(const SXMPMeta &xmpObj)
PutXMP() updates the XMP metadata in this object without writing out the file.
void SetAbortProc(XMP_AbortProc abortProc, void *abortArg)
SetAbortProc() registers a callback function used to check for a user-signaled abort.
void ResetErrorCallbackLimit(XMP_Uns32 limit=1)
ResetErrorCallbackLimit() resets the error notification limit and counting. It has no effect if an er...
static void GetVersionInfo(XMP_VersionInfo *versionInfo)
GetVersionInfo() retrieves version information for the XMPFiles component.
Unknown file format constant: ' '.
void SetProgressCallback(XMP_ProgressReportProc proc, void *context=0, float interval=1.0, bool sendStartStop=false)
SetProgressCallback() sets the progress notification callback for the associated XMPFiles (library) o...
static void SetClientStringVector(void *clientPtr, XMP_StringPtr *arrayPtr, XMP_Uns32 stringCount)
bool CanPutXMP(const SXMPMeta &xmpObj)
CanPutXMP() reports whether this file can be updated with a specific XMP packet.
void operator=(const TXMPFiles< tStringObj > &rhs)
Assignment operator.
static void SetDefaultErrorCallback(XMPFiles_ErrorCallbackProc proc, void *context=0, XMP_Uns32 limit=1)
SetDefaultErrorCallback() registers a global default error notification callback. ...
API for access to the main (document-level) metadata in a file.
bool(* XMP_ProgressReportProc)(void *context, float elapsedTime, float fractionDone, float secondsToGo)
The signature of a client-defined callback for progress report notifications.
static bool GetFileModDate(XMP_StringPtr filePath, XMP_DateTime *modDate, XMP_FileFormat *format=0, XMP_OptionBits options=0)
GetFileModDate() returns the last modification date of all files that are returned by GetAssociatedRe...
virtual ~TXMPFiles()
Destructor; typical virtual destructor.
static bool GetAssociatedResources(XMP_StringPtr filePath, std::vector< tStringObj > *resourceList, XMP_FileFormat format=kXMP_UnknownFile, XMP_OptionBits options=0)
GetAssociatedResources() returns a list of files and folders associated to filePath.
bool(* XMP_AbortProc)(void *arg)
The signature of a client-defined callback to check for a user request to abort a time-consuming oper...
bool GetFileInfo(tStringObj *filePath=0, XMP_OptionBits *openFlags=0, XMP_FileFormat *format=0, XMP_OptionBits *handlerFlags=0)
GetFileInfo() retrieves basic information about an opened file.
static XMP_FileFormat CheckFileFormat(XMP_StringPtr filePath)
CheckFileFormat() tries to determine the format of a file.
static void SetClientString(void *clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen)
bool(* XMPFiles_ErrorCallbackProc)(void *context, XMP_StringPtr filePath, XMP_ErrorSeverity severity, XMP_Int32 cause, XMP_StringPtr message)
The signature of a client-defined callback for TXMPFiles error notifications.
bool OpenFile(XMP_StringPtr filePath, XMP_FileFormat format=kXMP_UnknownFile, XMP_OptionBits openFlags=0)
OpenFile() opens a file for metadata access.