File: SystemProxy.hpp

package info (click to toggle)
xmlrpc-c 1.06.27-1.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,308 kB
  • ctags: 5,111
  • sloc: ansic: 39,324; sh: 8,284; cpp: 6,051; makefile: 1,339; perl: 494; xml: 134
file content (48 lines) | stat: -rw-r--r-- 1,648 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SystemProxy.h - xmlrpc-c C++ proxy class
// Auto-generated by xml-rpc-api2cpp.

#ifndef _SystemProxy_H_
#define _SystemProxy_H_ 1

#include <string>

#include "xmlrpc-c/oldcppwrapper.hpp"

class SystemProxy {
    XmlRpcClient mClient;

public:
    SystemProxy (const XmlRpcClient& client)
        : mClient(client) {}
    SystemProxy (const std::string& server_url)
        : mClient(XmlRpcClient(server_url)) {}
    SystemProxy (const SystemProxy& o)
        : mClient(o.mClient) {}

    SystemProxy& operator= (const SystemProxy& o) {
        if (this != &o) mClient = o.mClient;
        return *this;
    }

    /* Return an array of all available XML-RPC methods on this server. */
    XmlRpcValue /*array*/ listMethods ();

    /* Given the name of a method, return an array of legal
       signatures. Each signature is an array of strings. The first item of
       each signature is the return type, and any others items are
       parameter types. */
    XmlRpcValue /*array*/ methodSignature (std::string string1);

    /* Given the name of a method, return a help string. */
    std::string methodHelp (std::string string1);

    /* Process an array of calls, and return an array of results. Calls
       should be structs of the form {'methodName': string, 'params':
       array}. Each result will either be a single-item array containg the
       result value, or a struct of the form {'faultCode': int,
       'faultString': string}. This is useful when you need to make lots of
       small calls without lots of round trips. */
    XmlRpcValue /*array*/ multicall (XmlRpcValue /*array*/ array1);
};

#endif /* _SystemProxy_H_ */