1 #if ! __WXMPUtils_hpp__
2 #define __WXMPUtils_hpp__ 1
3 
4 // =================================================================================================
5 // Copyright 2002 Adobe Systems Incorporated
6 // All Rights Reserved.
7 //
8 // NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
9 // of the Adobe license agreement accompanying it.
10 // =================================================================================================
11 
12 #include "client-glue/WXMP_Common.hpp"
13 #if __cplusplus
14 extern "C" {
15 #endif
16 
17 // =================================================================================================
18 
19 #define zXMPUtils_ComposeArrayItemPath_1(schemaNS,arrayName,itemIndex,itemPath,SetClientString) \
20     WXMPUtils_ComposeArrayItemPath_1 ( schemaNS, arrayName, itemIndex, itemPath, SetClientString, &wResult );
21 
22 #define zXMPUtils_ComposeStructFieldPath_1(schemaNS,structName,fieldNS,fieldName,fieldPath,SetClientString) \
23     WXMPUtils_ComposeStructFieldPath_1 ( schemaNS, structName, fieldNS, fieldName, fieldPath, SetClientString, &wResult );
24 
25 #define zXMPUtils_ComposeQualifierPath_1(schemaNS,propName,qualNS,qualName,qualPath,SetClientString) \
26     WXMPUtils_ComposeQualifierPath_1 ( schemaNS, propName, qualNS, qualName, qualPath, SetClientString, &wResult );
27 
28 #define zXMPUtils_ComposeLangSelector_1(schemaNS,arrayName,langName,selPath,SetClientString) \
29     WXMPUtils_ComposeLangSelector_1 ( schemaNS, arrayName, langName, selPath, SetClientString, &wResult );
30 
31 #define zXMPUtils_ComposeFieldSelector_1(schemaNS,arrayName,fieldNS,fieldName,fieldValue,selPath,SetClientString) \
32     WXMPUtils_ComposeFieldSelector_1 ( schemaNS, arrayName, fieldNS, fieldName, fieldValue, selPath, SetClientString, &wResult );
33 
34 #define zXMPUtils_ConvertFromBool_1(binValue,strValue,SetClientString) \
35     WXMPUtils_ConvertFromBool_1 ( binValue, strValue, SetClientString, &wResult );
36 
37 #define zXMPUtils_ConvertFromInt_1(binValue,format,strValue,SetClientString) \
38     WXMPUtils_ConvertFromInt_1 ( binValue, format, strValue, SetClientString, &wResult );
39 
40 #define zXMPUtils_ConvertFromInt64_1(binValue,format,strValue,SetClientString) \
41     WXMPUtils_ConvertFromInt64_1 ( binValue, format, strValue, SetClientString, &wResult );
42 
43 #define zXMPUtils_ConvertFromFloat_1(binValue,format,strValue,SetClientString) \
44     WXMPUtils_ConvertFromFloat_1 ( binValue, format, strValue, SetClientString, &wResult );
45 
46 #define zXMPUtils_ConvertFromDate_1(binValue,strValue,SetClientString) \
47     WXMPUtils_ConvertFromDate_1 ( binValue, strValue, SetClientString, &wResult );
48 
49 #define zXMPUtils_ConvertToBool_1(strValue) \
50     WXMPUtils_ConvertToBool_1 ( strValue, &wResult );
51 
52 #define zXMPUtils_ConvertToInt_1(strValue) \
53     WXMPUtils_ConvertToInt_1 ( strValue, &wResult );
54 
55 #define zXMPUtils_ConvertToInt64_1(strValue) \
56     WXMPUtils_ConvertToInt64_1 ( strValue, &wResult );
57 
58 #define zXMPUtils_ConvertToFloat_1(strValue) \
59     WXMPUtils_ConvertToFloat_1 ( strValue, &wResult );
60 
61 #define zXMPUtils_ConvertToDate_1(strValue,binValue) \
62     WXMPUtils_ConvertToDate_1 ( strValue, binValue, &wResult );
63 
64 #define zXMPUtils_CurrentDateTime_1(time) \
65     WXMPUtils_CurrentDateTime_1 ( time, &wResult );
66 
67 #define zXMPUtils_SetTimeZone_1(time) \
68     WXMPUtils_SetTimeZone_1 ( time, &wResult );
69 
70 #define zXMPUtils_ConvertToUTCTime_1(time) \
71     WXMPUtils_ConvertToUTCTime_1 ( time, &wResult );
72 
73 #define zXMPUtils_ConvertToLocalTime_1(time) \
74     WXMPUtils_ConvertToLocalTime_1 ( time, &wResult );
75 
76 #define zXMPUtils_CompareDateTime_1(left,right) \
77     WXMPUtils_CompareDateTime_1 ( left, right, &wResult );
78 
79 #define zXMPUtils_EncodeToBase64_1(rawStr,rawLen,encodedStr,SetClientString) \
80     WXMPUtils_EncodeToBase64_1 ( rawStr, rawLen, encodedStr, SetClientString, &wResult );
81 
82 #define zXMPUtils_DecodeFromBase64_1(encodedStr,encodedLen,rawStr,SetClientString) \
83     WXMPUtils_DecodeFromBase64_1 ( encodedStr, encodedLen, rawStr, SetClientString, &wResult );
84 
85 #define zXMPUtils_PackageForJPEG_1(xmpObj,stdStr,extStr,digestStr,SetClientString) \
86     WXMPUtils_PackageForJPEG_1 ( xmpObj, stdStr, extStr, digestStr, SetClientString, &wResult );
87 
88 #define zXMPUtils_MergeFromJPEG_1(fullXMP,extendedXMP) \
89     WXMPUtils_MergeFromJPEG_1 ( fullXMP, extendedXMP, &wResult );
90 
91 #define zXMPUtils_CatenateArrayItems_1(xmpObj,schemaNS,arrayName,separator,quotes,options,catedStr,SetClientString) \
92     WXMPUtils_CatenateArrayItems_1 ( xmpObj, schemaNS, arrayName, separator, quotes, options, catedStr, SetClientString, &wResult );
93 
94 #define zXMPUtils_SeparateArrayItems_1(xmpObj,schemaNS,arrayName,options,catedStr) \
95     WXMPUtils_SeparateArrayItems_1 ( xmpObj, schemaNS, arrayName, options, catedStr, &wResult );
96 
97 #define zXMPUtils_ApplyTemplate_1(workingXMP,templateXMP,actions) \
98     WXMPUtils_ApplyTemplate_1 ( workingXMP, templateXMP, actions, &wResult );
99 
100 #define zXMPUtils_RemoveProperties_1(xmpObj,schemaNS,propName,options) \
101     WXMPUtils_RemoveProperties_1 ( xmpObj, schemaNS, propName, options, &wResult );
102 
103 #define zXMPUtils_DuplicateSubtree_1(source,dest,sourceNS,sourceRoot,destNS,destRoot,options) \
104     WXMPUtils_DuplicateSubtree_1 ( source, dest, sourceNS, sourceRoot, destNS, destRoot, options, &wResult );
105 
106 // =================================================================================================
107 
108 extern void
109 XMP_PUBLIC WXMPUtils_ComposeArrayItemPath_1 ( XMP_StringPtr   schemaNS,
110                                    XMP_StringPtr   arrayName,
111                                    XMP_Index       itemIndex,
112                                    void *          itemPath,
113                                    SetClientStringProc SetClientString,
114                                    WXMP_Result *   wResult );
115 
116 extern void
117 XMP_PUBLIC WXMPUtils_ComposeStructFieldPath_1 ( XMP_StringPtr   schemaNS,
118                                      XMP_StringPtr   structName,
119                                      XMP_StringPtr   fieldNS,
120                                      XMP_StringPtr   fieldName,
121                                      void *          fieldPath,
122                                      SetClientStringProc SetClientString,
123                                      WXMP_Result *   wResult );
124 
125 extern void
126 XMP_PUBLIC WXMPUtils_ComposeQualifierPath_1 ( XMP_StringPtr   schemaNS,
127                                    XMP_StringPtr   propName,
128                                    XMP_StringPtr   qualNS,
129                                    XMP_StringPtr   qualName,
130                                    void *          qualPath,
131                                    SetClientStringProc SetClientString,
132                                    WXMP_Result *   wResult );
133 
134 extern void
135 XMP_PUBLIC WXMPUtils_ComposeLangSelector_1 ( XMP_StringPtr   schemaNS,
136                                   XMP_StringPtr   arrayName,
137                                   XMP_StringPtr   langName,
138                                   void *          selPath,
139                                   SetClientStringProc SetClientString,
140                                   WXMP_Result *   wResult );
141 
142 extern void
143 XMP_PUBLIC WXMPUtils_ComposeFieldSelector_1 ( XMP_StringPtr   schemaNS,
144                                    XMP_StringPtr   arrayName,
145                                    XMP_StringPtr   fieldNS,
146                                    XMP_StringPtr   fieldName,
147                                    XMP_StringPtr   fieldValue,
148                                    void *          selPath,
149                                    SetClientStringProc SetClientString,
150                                    WXMP_Result *   wResult );
151 
152 // -------------------------------------------------------------------------------------------------
153 
154 extern void
155 XMP_PUBLIC WXMPUtils_ConvertFromBool_1 ( XMP_Bool      binValue,
156                               void *        strValue,
157                               SetClientStringProc SetClientString,
158                               WXMP_Result * wResult );
159 
160 extern void
161 XMP_PUBLIC WXMPUtils_ConvertFromInt_1 ( XMP_Int32     binValue,
162                              XMP_StringPtr format,
163                              void *        strValue,
164                              SetClientStringProc SetClientString,
165                              WXMP_Result * wResult );
166 
167 extern void
168 XMP_PUBLIC WXMPUtils_ConvertFromInt64_1 ( XMP_Int64     binValue,
169                                XMP_StringPtr format,
170                                void *        strValue,
171                                SetClientStringProc SetClientString,
172                                WXMP_Result * wResult );
173 
174 extern void
175 XMP_PUBLIC WXMPUtils_ConvertFromFloat_1 ( double        binValue,
176                                XMP_StringPtr format,
177                                void *        strValue,
178                                SetClientStringProc SetClientString,
179                                WXMP_Result * wResult );
180 
181 extern void
182 XMP_PUBLIC WXMPUtils_ConvertFromDate_1 ( const XMP_DateTime & binValue,
183                               void *               strValue,
184                               SetClientStringProc SetClientString,
185                               WXMP_Result *        wResult );
186 
187 // -------------------------------------------------------------------------------------------------
188 
189 extern void
190 XMP_PUBLIC WXMPUtils_ConvertToBool_1 ( XMP_StringPtr strValue,
191                             WXMP_Result * wResult );
192 
193 extern void
194 XMP_PUBLIC WXMPUtils_ConvertToInt_1 ( XMP_StringPtr strValue,
195                            WXMP_Result * wResult );
196 
197 extern void
198 XMP_PUBLIC WXMPUtils_ConvertToInt64_1 ( XMP_StringPtr strValue,
199                              WXMP_Result * wResult );
200 
201 extern void
202 XMP_PUBLIC WXMPUtils_ConvertToFloat_1 ( XMP_StringPtr strValue,
203                              WXMP_Result * wResult );
204 
205 extern void
206 XMP_PUBLIC WXMPUtils_ConvertToDate_1 ( XMP_StringPtr  strValue,
207                             XMP_DateTime * binValue,
208                             WXMP_Result *  wResult );
209 
210 // -------------------------------------------------------------------------------------------------
211 
212 extern void
213 XMP_PUBLIC WXMPUtils_CurrentDateTime_1 ( XMP_DateTime * time,
214                               WXMP_Result *  wResult );
215 
216 extern void
217 XMP_PUBLIC WXMPUtils_SetTimeZone_1 ( XMP_DateTime * time,
218                           WXMP_Result *  wResult );
219 
220 extern void
221 XMP_PUBLIC WXMPUtils_ConvertToUTCTime_1 ( XMP_DateTime * time,
222                                WXMP_Result *  wResult );
223 
224 extern void
225 XMP_PUBLIC WXMPUtils_ConvertToLocalTime_1 ( XMP_DateTime * time,
226                                  WXMP_Result *  wResult );
227 
228 extern void
229 XMP_PUBLIC WXMPUtils_CompareDateTime_1 ( const XMP_DateTime & left,
230                               const XMP_DateTime & right,
231                               WXMP_Result *        wResult );
232 
233 // -------------------------------------------------------------------------------------------------
234 
235 extern void
236 XMP_PUBLIC WXMPUtils_EncodeToBase64_1 ( XMP_StringPtr rawStr,
237                              XMP_StringLen rawLen,
238                              void *        encodedStr,
239                              SetClientStringProc SetClientString,
240                              WXMP_Result * wResult );
241 
242 extern void
243 XMP_PUBLIC WXMPUtils_DecodeFromBase64_1 ( XMP_StringPtr encodedStr,
244                                XMP_StringLen encodedLen,
245                                void *        rawStr,
246                                SetClientStringProc SetClientString,
247                                WXMP_Result * wResult );
248 
249 // -------------------------------------------------------------------------------------------------
250 
251 extern void
252 XMP_PUBLIC WXMPUtils_PackageForJPEG_1 ( XMPMetaRef    xmpObj,
253                              void *        stdStr,
254                              void *        extStr,
255                              void *        digestStr,
256                              SetClientStringProc SetClientString,
257                              WXMP_Result * wResult );
258 
259 extern void
260 XMP_PUBLIC WXMPUtils_MergeFromJPEG_1 ( XMPMetaRef    fullXMP,
261                             XMPMetaRef    extendedXMP,
262                             WXMP_Result * wResult );
263 
264 // -------------------------------------------------------------------------------------------------
265 
266 extern void
267 XMP_PUBLIC WXMPUtils_CatenateArrayItems_1 ( XMPMetaRef     xmpObj,
268                                  XMP_StringPtr  schemaNS,
269                                  XMP_StringPtr  arrayName,
270                                  XMP_StringPtr  separator,
271                                  XMP_StringPtr  quotes,
272                                  XMP_OptionBits options,
273                                  void *         catedStr,
274                                  SetClientStringProc SetClientString,
275                                  WXMP_Result *  wResult );
276 
277 extern void
278 XMP_PUBLIC WXMPUtils_SeparateArrayItems_1 ( XMPMetaRef     xmpObj,
279                                  XMP_StringPtr  schemaNS,
280                                  XMP_StringPtr  arrayName,
281                                  XMP_OptionBits options,
282                                  XMP_StringPtr  catedStr,
283                                  WXMP_Result *  wResult );
284 
285 extern void
286 XMP_PUBLIC WXMPUtils_ApplyTemplate_1 ( XMPMetaRef     workingXMP,
287 							XMPMetaRef     templateXMP,
288 							XMP_OptionBits options,
289 							WXMP_Result *  wResult );
290 
291 extern void
292 XMP_PUBLIC WXMPUtils_RemoveProperties_1 ( XMPMetaRef     xmpObj,
293                                XMP_StringPtr  schemaNS,
294                                XMP_StringPtr  propName,
295                                XMP_OptionBits options,
296                                WXMP_Result *  wResult );
297 
298 extern void
299 XMP_PUBLIC WXMPUtils_DuplicateSubtree_1 ( XMPMetaRef     source,
300                                XMPMetaRef     dest,
301                                XMP_StringPtr  sourceNS,
302                                XMP_StringPtr  sourceRoot,
303                                XMP_StringPtr  destNS,
304                                XMP_StringPtr  destRoot,
305                                XMP_OptionBits options,
306                                WXMP_Result *  wResult );
307 
308 // =================================================================================================
309 
310 #if __cplusplus
311 } /* extern "C" */
312 #endif
313 
314 #endif  // __WXMPUtils_hpp__
315