tdebluez
healthmanager1Proxy.cpp
Go to the documentation of this file.
1 // File autogenerated
2 
3 // declaration include
4 #include "healthmanager1Proxy.h"
5 
6 // TQt includes
7 #include <tqmap.h>
8 #include <tqstring.h>
9 
10 // TQt D-Bus includes
11 #include <tqdbusdata.h>
12 #include <tqdbusdatamap.h>
13 #include <tqdbuserror.h>
14 #include <tqdbusmessage.h>
15 #include <tqdbusobjectpath.h>
16 #include <tqdbusproxy.h>
17 #include <tqdbusvariant.h>
18 
19 
20 namespace org
21 {
22 namespace bluez
23 {
24 
25 HealthManager1Proxy::HealthManager1Proxy(const TQString& service, const TQString& path, TQObject* parent, const char* name)
26  : TQObject(parent, name),
27  m_baseProxy(new TQT_DBusProxy())
28 {
29  m_baseProxy->setInterface("org.bluez.HealthManager1");
30  m_baseProxy->setPath(path);
31  m_baseProxy->setService(service);
32 
33 }
34 
36 {
37  delete m_baseProxy;
38 }
39 
40 void HealthManager1Proxy::setConnection(const TQT_DBusConnection& connection)
41 {
42  m_baseProxy->setConnection(connection);
43 }
44 
45 bool HealthManager1Proxy::CreateApplication(const TQMap< TQString, TQT_DBusVariant >& config, TQT_DBusObjectPath& application, TQT_DBusError& error)
46 {
47  TQValueList<TQT_DBusData> parameters;
48 
49  parameters << TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap< TQString >(config));
50 
51  TQT_DBusMessage reply = m_baseProxy->sendWithReply("CreateApplication", parameters, &error);
52 
53  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
54 
55  if (reply.count() != 1) return false;
56 
57  bool ok = false;
58 
59  application = reply.front().toObjectPath(&ok);
60  if (!ok) return false;
61 
62  return true;
63 }
64 
65 bool HealthManager1Proxy::DestroyApplication(const TQT_DBusObjectPath& application, TQT_DBusError& error)
66 {
67  TQValueList<TQT_DBusData> parameters;
68 
69  parameters << TQT_DBusData::fromObjectPath(application);
70 
71  TQT_DBusMessage reply = m_baseProxy->sendWithReply("DestroyApplication", parameters, &error);
72 
73  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
74  return true;
75 }
76 
77 }; // namespace bluez
78 
79 }; // namespace org
80 
81 #include "healthmanager1Proxy.moc"
82 
83 // End of File
84 
virtual bool CreateApplication(const TQMap< TQString, TQT_DBusVariant > &config, TQT_DBusObjectPath &application, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
HealthManager1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
virtual bool DestroyApplication(const TQT_DBusObjectPath &application, TQT_DBusError &error)