TXMPFiles.hpp

Go to the documentation of this file.
00001 #ifndef __TXMPFiles_hpp__
00002 #define __TXMPFiles_hpp__   1
00003 
00004 #if ( ! __XMP_hpp__ )
00005     #error "Do not directly include, use XMP.hpp"
00006 #endif
00007 
00008 // =================================================================================================
00009 // ADOBE SYSTEMS INCORPORATED
00010 // Copyright 2002-2007 Adobe Systems Incorporated
00011 // All Rights Reserved
00012 //
00013 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
00014 // of the Adobe license agreement accompanying it.
00015 // =================================================================================================
00016 
00017 //  ================================================================================================
00033 //  ================================================================================================
00034 
00035 //  ================================================================================================
00060 //  ================================================================================================
00061 
00062 template <class tStringObj>
00063 class TXMPFiles {
00064 
00065 public:
00066     
00067     //  ============================================================================================
00071 
00072     static void GetVersionInfo ( XMP_VersionInfo * versionInfo );
00073 
00076     
00077     static bool Initialize();
00078     static bool Initialize ( XMP_OptionBits options );
00079 
00082 
00083     static void Terminate();
00084 
00086 
00087     //  ============================================================================================
00092     
00094     
00095     TXMPFiles();
00096     virtual ~TXMPFiles() throw();
00097 
00100     
00101     TXMPFiles ( XMP_StringPtr  filePath,
00102                 XMP_FileFormat format = kXMP_UnknownFile,
00103                 XMP_OptionBits openFlags = 0 );
00104 
00105     TXMPFiles ( const tStringObj & filePath,
00106                 XMP_FileFormat     format = kXMP_UnknownFile,
00107                 XMP_OptionBits     openFlags = 0 );
00108 
00111     
00112     TXMPFiles ( const TXMPFiles<tStringObj> & original );
00113 
00114     void operator= ( const TXMPFiles<tStringObj> & rhs );
00115 
00119     
00120     TXMPFiles ( XMPFilesRef xmpFilesObj );
00121     
00122     XMPFilesRef GetInternalRef();
00123 
00125     
00126     //  ============================================================================================
00129     
00130     //  --------------------------------------------------------------------------------------------
00158     
00159     static bool GetFormatInfo ( XMP_FileFormat   format,
00160                                 XMP_OptionBits * handlerFlags = 0 );
00161 
00163     
00164     //  ============================================================================================
00167     
00168     //  --------------------------------------------------------------------------------------------
00223 
00224     bool OpenFile ( XMP_StringPtr  filePath,
00225                     XMP_FileFormat format = kXMP_UnknownFile,
00226                     XMP_OptionBits openFlags = 0 );
00227     
00228     bool OpenFile ( const tStringObj & filePath,
00229                     XMP_FileFormat     format = kXMP_UnknownFile,
00230                     XMP_OptionBits     openFlags = 0 );
00231 
00232     //  --------------------------------------------------------------------------------------------
00243     
00244     void CloseFile ( XMP_OptionBits closeFlags = 0 );
00245     
00246     //  --------------------------------------------------------------------------------------------
00260     
00261     bool GetFileInfo ( tStringObj *     filePath = 0,
00262                        XMP_OptionBits * openFlags = 0,
00263                        XMP_FileFormat * format = 0,
00264                        XMP_OptionBits * handlerFlags = 0 );
00265     
00266     //  --------------------------------------------------------------------------------------------
00274 
00275     void SetAbortProc ( XMP_AbortProc abortProc,
00276                         void *        abortArg );
00277 
00279     
00280     //  ============================================================================================
00283     
00284     //  --------------------------------------------------------------------------------------------
00313     
00314     bool GetXMP ( SXMPMeta *       xmpObj = 0,
00315                   tStringObj *     xmpPacket = 0,
00316                   XMP_PacketInfo * packetInfo = 0 );
00317     
00318     //  --------------------------------------------------------------------------------------------
00347     
00348     bool GetThumbnail ( XMP_ThumbnailInfo * tnailInfo );
00349     
00350     //  --------------------------------------------------------------------------------------------
00357     
00358     void PutXMP ( const SXMPMeta & xmpObj );
00359 
00360     void PutXMP ( const tStringObj & xmpPacket );
00361     
00362     void PutXMP ( XMP_StringPtr xmpPacket,
00363                   XMP_StringLen xmpLength = kXMP_UseNullTermination );
00364     
00365     //  --------------------------------------------------------------------------------------------
00399     
00400     bool CanPutXMP ( const SXMPMeta & xmpObj );
00401 
00402     bool CanPutXMP ( const tStringObj & xmpPacket );
00403     
00404     bool CanPutXMP ( XMP_StringPtr xmpPacket,
00405                      XMP_StringLen xmpLength = kXMP_UseNullTermination );
00406 
00408 
00409     // =============================================================================================
00410 
00411 private:
00412     XMPFilesRef xmpFilesRef;
00413 
00414 };  // class TXMPFiles
00415 
00416 // =================================================================================================
00417 
00418 #endif // __TXMPFiles_hpp__

Generated on Thu May 3 14:54:57 2007 for Adobe XMP Toolkit by  doxygen 1.5.1