-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathorg_xanguli_Xanguli.h
59 lines (53 loc) · 1.61 KB
/
org_xanguli_Xanguli.h
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
49
50
51
52
53
54
55
56
57
58
59
// Autogenerated - don't touch!
#ifndef ORG_XANGULI_XANGULI_H_
#define ORG_XANGULI_XANGULI_H_
#include <iostream>
#include <string.h>
#include <string>
#include <vector>
#include <map>
#include "Variant.h"
#include "dbus/dbus.h"
#include "DBusInterface.h"
#include "Marshall.h"
namespace Xanguli {
template<class impl>
class org_xanguli_Xanguli : public DBusInterface {
private:
DBusMessage* handleCall_CreateController(DBusMessage* message) {
std::cout << "Ind i CreateController\n";
std::string v_path;
obj->CreateController(v_path);
DBusMessage* reply = dbus_message_new_method_return(message);
DBusMessageIter outIter;
dbus_message_iter_init_append(reply, &outIter);
std::cout << "Puttin " << v_path << " on reply\n";
deMarshall(&outIter, v_path);
return reply;
};
impl* obj;
public:
org_xanguli_Xanguli(impl* obj){
this->obj = obj;
this->xml =
"<interface name='org.xanguli.Xanguli'>\n"
" <method name='CreateController'>\n"
" <arg name='path' type='s' direction='out'/>\n"
" </method>\n"
"</interface>\n"
;
};
virtual DBusMessage* handleCall(DBusMessage* message) {
const char* methodName = dbus_message_get_member(message);
if (strcmp("CreateController", methodName) == 0) {
return handleCall_CreateController(message);
}
else
return dbus_message_new_error(message, DBUS_ERROR_FAILED, "No such method");
};
std::string GetInterfaceName() {
return "org.xanguli.Xanguli";
};
};
}
#endif /* ORG_XANGULI_XANGULI_H_ */