// ValidatorProxy.h - xmlrpc-c C++ proxy class // Auto-generated by xml-rpc-api2cpp. #ifndef _ValidatorProxy_H_ #define _ValidatorProxy_H_ 1 #include class ValidatorProxy { XmlRpcClient mClient; public: ValidatorProxy (const XmlRpcClient& client) : mClient(client) {} ValidatorProxy (const string& server_url) : mClient(XmlRpcClient(server_url)) {} ValidatorProxy (const ValidatorProxy& o) : mClient(o.mClient) {} ValidatorProxy& operator= (const ValidatorProxy& o) { if (this != &o) mClient = o.mClient; return *this; } /* This handler takes a single parameter, an array of structs, each of which contains at least three elements named moe, larry and curly, all s. Your handler must add all the struct elements named curly and return the result. */ XmlRpcValue::int32 arrayOfStructsTest (XmlRpcValue /*array*/ array1); /* This handler takes a single parameter, a string, that contains any number of predefined entities, namely <, >, &, ', and ".

The handler returns a struct that contains five fields, all numbers: ctLeftAngleBrackets, ctRightAngleBrackets, ctAmpersands, ctApostrophes, ctQuotes.

To validate, the numbers must be correct */ XmlRpcValue /*struct*/ countTheEntities (string string1); /* This handler takes a single parameter, a struct, containing at least three elements named moe, larry and curly, all s. Your handler must add the three numbers and return the result. */ XmlRpcValue::int32 easyStructTest (XmlRpcValue /*struct*/ struct1); /* This handler takes a single parameter, a struct. The handler returns the struct. */ XmlRpcValue /*struct*/ echoStructTest (XmlRpcValue /*struct*/ struct1); /* This handler takes six parameters, and returns an array containing all the parameters. */ XmlRpcValue /*array*/ manyTypesTest (XmlRpcValue::int32 int1, bool bool2, string string3, double double4, XmlRpcValue /*dateTime*/ dateTime5, XmlRpcValue /*base64*/ base646); /* This handler takes a single parameter, which is an array containing between 100 and 200 elements. Each of the items is a string, your handler must return a string containing the concatenated text of the first and last elements. */ string moderateSizeArrayCheck (XmlRpcValue /*array*/ array1); /* This handler takes a single parameter, a struct that models a daily calendar. At the top level, there is one struct for each year. Each year is broken down into months, and months into days. Most of the days are empty in the struct you receive, but the entry for April 1, 2000 contains at least three elements named moe, larry and curly, all <i4>s. The handler adds the three numbers and returns the result.

Note that the month and day are two-digits with leading 0s, and January is 01

If the request data is incorrect a Fault Response with error code 1001 is returned. */ XmlRpcValue::int32 nestedStructTest (XmlRpcValue /*struct*/ struct1); /* This handler takes one parameter, and returns a struct containing three elements, times10, times100 and times1000, the result of multiplying the number by 10, 100 and 1000. */ XmlRpcValue /*struct*/ simpleStructReturnTest (XmlRpcValue::int32 int1); }; #endif /* _ValidatorProxy_H_ */ // ValidatorProxy.cc - xmlrpc-c C++ proxy class // Auto-generated by xml-rpc-api2cpp. #include #include "ValidatorProxy.h" XmlRpcValue::int32 ValidatorProxy::arrayOfStructsTest (XmlRpcValue /*array*/ array1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(array1); XmlRpcValue result = this->mClient.call("validator1.arrayOfStructsTest", params); return result.getInt(); } XmlRpcValue /*struct*/ ValidatorProxy::countTheEntities (string string1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(XmlRpcValue::makeString(string1)); XmlRpcValue result = this->mClient.call("validator1.countTheEntities", params); return result; } XmlRpcValue::int32 ValidatorProxy::easyStructTest (XmlRpcValue /*struct*/ struct1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(struct1); XmlRpcValue result = this->mClient.call("validator1.easyStructTest", params); return result.getInt(); } XmlRpcValue /*struct*/ ValidatorProxy::echoStructTest (XmlRpcValue /*struct*/ struct1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(struct1); XmlRpcValue result = this->mClient.call("validator1.echoStructTest", params); return result; } XmlRpcValue /*array*/ ValidatorProxy::manyTypesTest (XmlRpcValue::int32 int1, bool bool2, string string3, double double4, XmlRpcValue /*dateTime*/ dateTime5, XmlRpcValue /*base64*/ base646) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(XmlRpcValue::makeInt(int1)); params.arrayAppendItem(XmlRpcValue::makeBool(bool2)); params.arrayAppendItem(XmlRpcValue::makeString(string3)); params.arrayAppendItem(XmlRpcValue::makeDouble(double4)); params.arrayAppendItem(dateTime5); params.arrayAppendItem(base646); XmlRpcValue result = this->mClient.call("validator1.manyTypesTest", params); return result; } string ValidatorProxy::moderateSizeArrayCheck (XmlRpcValue /*array*/ array1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(array1); XmlRpcValue result = this->mClient.call("validator1.moderateSizeArrayCheck", params); return result.getString(); } XmlRpcValue::int32 ValidatorProxy::nestedStructTest (XmlRpcValue /*struct*/ struct1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(struct1); XmlRpcValue result = this->mClient.call("validator1.nestedStructTest", params); return result.getInt(); } XmlRpcValue /*struct*/ ValidatorProxy::simpleStructReturnTest (XmlRpcValue::int32 int1) { XmlRpcValue params = XmlRpcValue::makeArray(); params.arrayAppendItem(XmlRpcValue::makeInt(int1)); XmlRpcValue result = this->mClient.call("validator1.simpleStructReturnTest", params); return result; }