summaryrefslogtreecommitdiff
path: root/public/include/client-glue/WXMP_Common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'public/include/client-glue/WXMP_Common.hpp')
-rw-r--r--public/include/client-glue/WXMP_Common.hpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/public/include/client-glue/WXMP_Common.hpp b/public/include/client-glue/WXMP_Common.hpp
index 4d6eaab..a43caef 100644
--- a/public/include/client-glue/WXMP_Common.hpp
+++ b/public/include/client-glue/WXMP_Common.hpp
@@ -2,7 +2,7 @@
#define __WXMP_Common_hpp__ 1
// =================================================================================================
-// Copyright 2002-2007 Adobe Systems Incorporated
+// Copyright 2002 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
@@ -20,6 +20,8 @@
#define XMP_CTorDTorIntro(Class) template <class tStringObj> XMP_Inline Class<tStringObj>
#define XMP_MethodIntro(Class,ResultType) template <class tStringObj> XMP_Inline ResultType Class<tStringObj>
+typedef void (* SetClientStringProc) ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
+
struct WXMP_Result {
XMP_StringPtr errMessage;
void * ptrResult;
@@ -36,35 +38,37 @@ extern "C" {
#define PropagateException(res) \
if ( res.errMessage != 0 ) throw XMP_Error ( res.int32Result, res.errMessage );
-#ifndef TraceXMPCalls
- #define TraceXMPCalls 0
+#ifndef XMP_TraceClientCalls
+ #define XMP_TraceClientCalls 0
+ #define XMP_TraceClientCallsToFile 0
#endif
-#if ! TraceXMPCalls
+#if ! XMP_TraceClientCalls
#define InvokeCheck(WCallProto) \
WXMP_Result wResult; \
WCallProto; \
PropagateException ( wResult )
#else
- #define InvokeCheck(WCallProto) \
- WXMP_Result wResult; \
- fprintf ( stderr, "WXMP calling: %s\n", #WCallProto ); fflush ( stderr ); \
- WCallProto; \
- if ( wResult.errMessage == 0 ) { \
- fprintf ( stderr, "WXMP back, no error\n" ); fflush ( stderr ); \
- } else { \
- fprintf ( stderr, "WXMP back, error: %s\n", wResult.errMessage ); fflush ( stderr ); \
- } \
+ extern FILE * xmpClientLog;
+ #define InvokeCheck(WCallProto) \
+ WXMP_Result wResult; \
+ fprintf ( xmpClientLog, "WXMP calling: %s\n", #WCallProto ); fflush ( xmpClientLog ); \
+ WCallProto; \
+ if ( wResult.errMessage == 0 ) { \
+ fprintf ( xmpClientLog, "WXMP back, no error\n" ); fflush ( xmpClientLog ); \
+ } else { \
+ fprintf ( xmpClientLog, "WXMP back, error: %s\n", wResult.errMessage ); fflush ( xmpClientLog ); \
+ } \
PropagateException ( wResult )
#endif
-// -------------------------------------------------------------------------------------------------
+// =================================================================================================
#define WrapNoCheckVoid(WCallProto) \
WCallProto;
#define WrapCheckVoid(WCallProto) \
- InvokeCheck(WCallProto)
+ InvokeCheck(WCallProto);
#define WrapCheckMetaRef(result,WCallProto) \
InvokeCheck(WCallProto); \
@@ -117,7 +121,7 @@ extern "C" {
// =================================================================================================
#if __cplusplus
-} /* extern "C" */
+} // extern "C"
#endif
#endif // __WXMP_Common_hpp__