Author: sayer
Date: 2008-11-14 00:24:04 +0100 (Fri, 14 Nov 2008)
New Revision: 1131

Modified:
   trunk/apps/xmlrpc2di/Makefile
   trunk/apps/xmlrpc2di/XMLRPC2DI.cpp
Log:
made struct access optional (compile time define), as it depends on newer 
xmlrpcpp version

Modified: trunk/apps/xmlrpc2di/Makefile
===================================================================
--- trunk/apps/xmlrpc2di/Makefile       2008-11-11 15:36:48 UTC (rev 1130)
+++ trunk/apps/xmlrpc2di/Makefile       2008-11-13 23:24:04 UTC (rev 1131)
@@ -3,10 +3,14 @@
 plug_in_name = xmlrpc2di
 
 module_ldflags = -lxmlrpc++ 
-module_cflags  = -DHAVE_XMLRPCPP_SSL
+module_cflags  = 
 # for gentoo ebuild or cvs-20040713 version:
 # module_cflags  = -DHAVE_XMLRPCPP_SSL
 #
+# if your xmlrpcpp version has access to struct value map 
+#(    operator XmlRpcValue::ValueStruct const&() in XmlRpcValue.h around line 
168)
+# you can support struct type in XMLRPC conversion 
+# -D XMLRPCPP_SUPPORT_STRUCT_ACCESS
 
 # use these for local installation: 
 # module_cflags  = -I$(XMLRPCPP_DIR)/src 

Modified: trunk/apps/xmlrpc2di/XMLRPC2DI.cpp
===================================================================
--- trunk/apps/xmlrpc2di/XMLRPC2DI.cpp  2008-11-11 15:36:48 UTC (rev 1130)
+++ trunk/apps/xmlrpc2di/XMLRPC2DI.cpp  2008-11-13 23:24:04 UTC (rev 1131)
@@ -474,14 +474,17 @@
        a[a.size()-1].assertArray(0);
        AmArg arr; 
        xmlrpcval2amarg(v[i], a[a.size()-1], 0);
-      } break; 
+      } break;
+#ifdef XMLRPCPP_SUPPORT_STRUCT_ACCESS
       case XmlRpcValue::TypeStruct: {  
        for (XmlRpc::XmlRpcValue::ValueStruct::iterator it=
-                ((XmlRpcValue::ValueStruct)v).begin(); it != 
((XmlRpcValue::ValueStruct)v).end(); it++) {          
+                ((XmlRpcValue::ValueStruct)v).begin(); 
+            it != ((XmlRpcValue::ValueStruct)v).end(); it++) {     
            a[it->first] = AmArg();
            xmlrpcval2amarg(it->second, a[it->first], 0);
          }
       } break;
+#endif
 
        // TODO: support more types (datetime, struct, ...)
       default:     throw XmlRpcException("unsupported parameter type", 400);

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to