tdebluez
session1Proxy.cpp
Go to the documentation of this file.
1// File autogenerated
2
3// declaration include
4#include "session1Proxy.h"
5
6// TQt includes
7#include <tqstring.h>
8
9// TQt D-Bus includes
10#include <tqdbusconnection.h>
11#include <tqdbuserror.h>
12#include <tqdbusmessage.h>
13#include <tqdbusproxy.h>
14#include <tqdbusvariant.h>
15
16
17namespace org
18{
19namespace bluez
20{
21namespace obex
22{
23
24Session1Proxy::Session1Proxy(const TQString& service, const TQString& path, TQObject* parent, const char* name)
25 : TQObject(parent, name),
26 m_baseProxy(new TQT_DBusProxy())
27{
28 m_baseProxy->setInterface("org.bluez.obex.Session1");
29 m_baseProxy->setPath(path);
30 m_baseProxy->setService(service);
31
32}
33
38
40{
41 m_baseProxy->setConnection(connection);
42}
43
45{
47
48
49 TQT_DBusMessage reply = m_baseProxy->sendWithReply("GetCapabilities", parameters, &error);
50
51 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
52
53 if (reply.count() != 1) return false;
54
55 bool ok = false;
56
57 capabilities = reply.front().toString(&ok);
58 if (!ok) return false;
59
60 return true;
61}
62
64{
65 TQT_DBusConnection connection = m_baseProxy->connection();
66
67 TQT_DBusMessage message = TQT_DBusMessage::methodCall(m_baseProxy->service(), m_baseProxy->path(), "org.freedesktop.DBus.Properties", "Set");
68
69 message << TQT_DBusData::fromString(m_baseProxy->interface());
70 message << TQT_DBusData::fromString(name);
71 message << TQT_DBusData::fromVariant(value);
72
73 connection.sendWithReply(message, &error);
74}
75
77{
78 TQT_DBusConnection connection = m_baseProxy->connection();
79
80 TQT_DBusMessage message = TQT_DBusMessage::methodCall(m_baseProxy->service(), m_baseProxy->path(), "org.freedesktop.DBus.Properties", "Get");
81
82 message << TQT_DBusData::fromString(m_baseProxy->interface());
83 message << TQT_DBusData::fromString(name);
84
85 TQT_DBusMessage reply = connection.sendWithReply(message, &error);
86
87 if (reply.type() != TQT_DBusMessage::ReplyMessage) return TQT_DBusVariant();
88 if (reply.count() != 1) return TQT_DBusVariant();
89
90 bool ok = false;
91 TQT_DBusVariant value = reply.front().toVariant(&ok);
92 if (!ok) return TQT_DBusVariant();
93
94 return value;
95}
96
98{
100
101 if (error.isValid()) return TQString();
102
103 bool ok = false;
104
105 TQString result = variant.value.toString(&ok);
106 if (!ok) {}
107
108 return result;
109}
110
112{
114
115 if (error.isValid()) return TQString();
116
117 bool ok = false;
118
119 TQString result = variant.value.toString(&ok);
120 if (!ok) {}
121
122 return result;
123}
124
126{
128
129 if (error.isValid()) return bool();
130
131 bool ok = false;
132
133 bool result = variant.value.toBool(&ok);
134 if (!ok) {}
135
136 return result;
137}
138
140{
142
143 if (error.isValid()) return TQString();
144
145 bool ok = false;
146
147 TQString result = variant.value.toString(&ok);
148 if (!ok) {}
149
150 return result;
151}
152
154{
156
157 if (error.isValid()) return TQString();
158
159 bool ok = false;
160
161 TQString result = variant.value.toString(&ok);
162 if (!ok) {}
163
164 return result;
165}
166
167}; // namespace obex
168
169}; // namespace bluez
170
171}; // namespace org
172
173#include "session1Proxy.moc"
174
175// End of File
176
virtual void setDBusProperty(const TQString &name, const TQT_DBusVariant &variant, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
virtual bool getChannel(TQT_DBusError &error) const
virtual TQString getRoot(TQT_DBusError &error) const
virtual TQString getTarget(TQT_DBusError &error) const
virtual TQString getDestination(TQT_DBusError &error) const
virtual bool GetCapabilities(TQString &capabilities, TQT_DBusError &error)
Session1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
virtual TQT_DBusVariant getDBusProperty(const TQString &name, TQT_DBusError &error) const
virtual TQString getSource(TQT_DBusError &error) const