File: SystemProxy.hpp

package info (click to toggle)
xmlrpc-c 1.60.05-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,132 kB
  • sloc: ansic: 55,332; cpp: 13,541; sh: 3,321; makefile: 2,556; perl: 593; xml: 134
file content (48 lines) | stat: -rw-r--r-- 1,650 bytes parent folder | download | duplicates (6)
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 containing 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_ */