1 #ifndef __WXMPFiles_hpp__
2 #define __WXMPFiles_hpp__	1
3 
4 // =================================================================================================
5 // ADOBE SYSTEMS INCORPORATED
6 // Copyright 2002-2007 Adobe Systems Incorporated
7 // All Rights Reserved
8 //
9 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
10 // of the Adobe license agreement accompanying it.
11 // =================================================================================================
12 
13 #include "client-glue/WXMP_Common.hpp"
14 
15 #if __cplusplus
16 extern "C" {
17 #endif
18 
19 // =================================================================================================
20 /// \file WXMPFiles.h
21 /// \brief High level support to access metadata in files of interest to Adobe applications.
22 ///
23 /// This header ...
24 ///
25 // =================================================================================================
26 
27 // =================================================================================================
28 
29 #define WrapCheckXMPFilesRef(result,WCallProto) \
30     WXMP_Result wResult;                        \
31     WCallProto;                                 \
32     PropagateException ( wResult );             \
33     XMPFilesRef result = XMPFilesRef(wResult.ptrResult)
34 
35 // =================================================================================================
36 
37 #define zXMPFiles_GetVersionInfo_1(versionInfo) \
38 	WXMPFiles_GetVersionInfo_1 ( versionInfo /* no wResult */ )
39 
40 #define zXMPFiles_Initialize_1() \
41 	WXMPFiles_Initialize_1 ( &wResult )
42 
43 #define zXMPFiles_Initialize_2(options) \
44 	WXMPFiles_Initialize_2 ( options, &wResult )
45 
46 #define zXMPFiles_Terminate_1() \
47 	WXMPFiles_Terminate_1 ( /* no wResult */ )
48 
49 #define zXMPFiles_CTor_1() \
50 	WXMPFiles_CTor_1 ( &wResult )
51 
52 #define zXMPFiles_GetFormatInfo_1(format,flags) \
53 	WXMPFiles_GetFormatInfo_1 ( format, flags, &wResult )
54 
55 #define zXMPFiles_CheckFileFormat_1(filePath) \
56 	WXMPFiles_CheckFileFormat_1 ( filePath, &wResult )
57 
58 #define zXMPFiles_CheckPackageFormat_1(folderPath) \
59 	WXMPFiles_CheckPackageFormat_1 ( folderPath, &wResult )
60 
61 #define zXMPFiles_OpenFile_1(filePath,format,openFlags) \
62 	WXMPFiles_OpenFile_1 ( this->xmpFilesRef, filePath, format, openFlags, &wResult )
63 
64 #define zXMPFiles_CloseFile_1(closeFlags) \
65 	WXMPFiles_CloseFile_1 ( this->xmpFilesRef, closeFlags, &wResult )
66 
67 #define zXMPFiles_GetFileInfo_1(filePath,filePathLen,openFlags,format,handlerFlags) \
68 	WXMPFiles_GetFileInfo_1 ( this->xmpFilesRef, filePath, filePathLen, openFlags, format, handlerFlags, &wResult )
69 
70 #define zXMPFiles_SetAbortProc_1(abortProc,abortArg) \
71 	WXMPFiles_SetAbortProc_1 ( this->xmpFilesRef, abortProc, abortArg, &wResult )
72 
73 #define zXMPFiles_GetXMP_1(xmpRef,xmpPacket,xmpPacketLen,packetInfo) \
74 	WXMPFiles_GetXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, packetInfo, &wResult )
75 
76 #define zXMPFiles_GetThumbnail_1(tnailInfo) \
77 	WXMPFiles_GetThumbnail_1 ( this->xmpFilesRef, tnailInfo, &wResult )
78 
79 #define zXMPFiles_PutXMP_1(xmpRef,xmpPacket,xmpPacketLen) \
80 	WXMPFiles_PutXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, &wResult )
81 
82 #define zXMPFiles_CanPutXMP_1(xmpRef,xmpPacket,xmpPacketLen) \
83 	WXMPFiles_CanPutXMP_1 ( this->xmpFilesRef, xmpRef, xmpPacket, xmpPacketLen, &wResult )
84 
85 // =================================================================================================
86 
87 extern void WXMPFiles_GetVersionInfo_1 ( XMP_VersionInfo * versionInfo );
88 
89 extern void WXMPFiles_Initialize_1 ( WXMP_Result * result );
90 
91 extern void WXMPFiles_Initialize_2 ( XMP_OptionBits options, WXMP_Result * result );
92 
93 extern void WXMPFiles_Terminate_1();
94 
95 extern void WXMPFiles_CTor_1 ( WXMP_Result * result );
96 
97 extern void WXMPFiles_UnlockLib_1();
98 
99 extern void WXMPFiles_UnlockObj_1 ( XMPFilesRef xmpFilesRef );
100 
101 extern void WXMPFiles_IncrementRefCount_1 ( XMPFilesRef xmpFilesRef );
102 
103 extern void WXMPFiles_DecrementRefCount_1 ( XMPFilesRef xmpFilesRef );
104 
105 extern void WXMPFiles_GetFormatInfo_1 ( XMP_FileFormat   format,
106                                         XMP_OptionBits * flags,	// ! Can be null.
107                                         WXMP_Result *    result );
108 
109 extern void WXMPFiles_CheckFileFormat_1 ( XMP_StringPtr filePath,
110                                			  WXMP_Result * result );
111 
112 extern void WXMPFiles_CheckPackageFormat_1 ( XMP_StringPtr folderPath,
113                       						 WXMP_Result * result );
114 
115 extern void WXMPFiles_OpenFile_1 ( XMPFilesRef    xmpFilesRef,
116                                    XMP_StringPtr  filePath,
117 					               XMP_FileFormat format,
118 					               XMP_OptionBits openFlags,
119                                    WXMP_Result *  result );
120 
121 extern void WXMPFiles_CloseFile_1 ( XMPFilesRef    xmpFilesRef,
122                                     XMP_OptionBits closeFlags,
123                                     WXMP_Result *  result );
124 
125 extern void WXMPFiles_GetFileInfo_1 ( XMPFilesRef      xmpFilesRef,
126                                       XMP_StringPtr *  filePath,
127                                       XMP_StringLen *  filePathLen,
128 					                  XMP_OptionBits * openFlags,		// ! Can be null.
129 					                  XMP_FileFormat * format,		// ! Can be null.
130 					                  XMP_OptionBits * handlerFlags,	// ! Can be null.
131                                       WXMP_Result *    result );
132 
133 extern void WXMPFiles_SetAbortProc_1 ( XMPFilesRef   xmpFilesRef,
134                                        XMP_AbortProc abortProc,
135 									   void *        abortArg,
136                                        WXMP_Result * result );
137 
138 extern void WXMPFiles_GetXMP_1 ( XMPFilesRef      xmpFilesRef,
139                                  XMPMetaRef       xmpRef,		// ! Can be null.
140     			                 XMP_StringPtr *  xmpPacket,
141     			                 XMP_StringLen *  xmpPacketLen,
142     			                 XMP_PacketInfo * packetInfo,	// ! Can be null.
143                                  WXMP_Result *    result );
144 
145 extern void WXMPFiles_GetThumbnail_1 ( XMPFilesRef         xmpFilesRef,
146     			                       XMP_ThumbnailInfo * tnailInfo,	// ! Can be null.
147                                        WXMP_Result *       result );
148 
149 extern void WXMPFiles_PutXMP_1 ( XMPFilesRef   xmpFilesRef,
150                                  XMPMetaRef    xmpRef,		// ! Only one of the XMP object or packet are passed.
151                                  XMP_StringPtr xmpPacket,
152                                  XMP_StringLen xmpPacketLen,
153                                  WXMP_Result * result );
154 
155 extern void WXMPFiles_CanPutXMP_1 ( XMPFilesRef   xmpFilesRef,
156                                     XMPMetaRef	  xmpRef,		// ! Only one of the XMP object or packet are passed.
157                                     XMP_StringPtr xmpPacket,
158                                     XMP_StringLen xmpPacketLen,
159                                     WXMP_Result * result );
160 
161 // =================================================================================================
162 
163 #if __cplusplus
164 }
165 #endif
166 
167 #endif // __WXMPFiles_hpp__
168