Download this file
31 lines (22 with data), 597 Bytes
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 | #include <string>
using namespace std;
#include <xmlrpc-c/girerr.hpp>
using girerr::throwf;
#include <xmlrpc-c/base.h>
class LibxmlrpcGlobalState {
public:
LibxmlrpcGlobalState() {
xmlrpc_env env;
xmlrpc_env_init(&env);
xmlrpc_init(&env);
if (env.fault_occurred) {
string const fault(env.fault_string);
xmlrpc_env_clean(&env);
throwf("Failed to initailize libxmlrpc. %s", fault.c_str());
}
}
~LibxmlrpcGlobalState() {
xmlrpc_term();
}
};
static LibxmlrpcGlobalState libxmlrpcGlobalState;
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.