tdebluez
mediacontrol1Proxy.cpp
Go to the documentation of this file.
1// File autogenerated
2
3// declaration include
5
6// TQt D-Bus includes
7#include <tqdbusconnection.h>
8#include <tqdbuserror.h>
9#include <tqdbusmessage.h>
10#include <tqdbusobjectpath.h>
11#include <tqdbusproxy.h>
12#include <tqdbusvariant.h>
13
14
15namespace org
16{
17namespace bluez
18{
19
21 : TQObject(parent, name),
22 m_baseProxy(new TQT_DBusProxy())
23{
24 m_baseProxy->setInterface("org.bluez.MediaControl1");
25 m_baseProxy->setPath(path);
26 m_baseProxy->setService(service);
27
28}
29
34
36{
37 m_baseProxy->setConnection(connection);
38}
39
41{
43
44
45 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Play", parameters, &error);
46
47 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
48 return true;
49}
50
52{
54
55
56 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Pause", parameters, &error);
57
58 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
59 return true;
60}
61
63{
65
66
67 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Stop", parameters, &error);
68
69 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
70 return true;
71}
72
74{
76
77
78 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Next", parameters, &error);
79
80 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
81 return true;
82}
83
85{
87
88
89 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Previous", parameters, &error);
90
91 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
92 return true;
93}
94
96{
98
99
100 TQT_DBusMessage reply = m_baseProxy->sendWithReply("VolumeUp", parameters, &error);
101
102 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
103 return true;
104}
105
107{
109
110
111 TQT_DBusMessage reply = m_baseProxy->sendWithReply("VolumeDown", parameters, &error);
112
113 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
114 return true;
115}
116
118{
120
121
122 TQT_DBusMessage reply = m_baseProxy->sendWithReply("FastForward", parameters, &error);
123
124 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
125 return true;
126}
127
129{
131
132
133 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Rewind", parameters, &error);
134
135 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
136 return true;
137}
138
140{
141 TQT_DBusConnection connection = m_baseProxy->connection();
142
143 TQT_DBusMessage message = TQT_DBusMessage::methodCall(m_baseProxy->service(), m_baseProxy->path(), "org.freedesktop.DBus.Properties", "Set");
144
145 message << TQT_DBusData::fromString(m_baseProxy->interface());
146 message << TQT_DBusData::fromString(name);
147 message << TQT_DBusData::fromVariant(value);
148
149 connection.sendWithReply(message, &error);
150}
151
153{
154 TQT_DBusConnection connection = m_baseProxy->connection();
155
156 TQT_DBusMessage message = TQT_DBusMessage::methodCall(m_baseProxy->service(), m_baseProxy->path(), "org.freedesktop.DBus.Properties", "Get");
157
158 message << TQT_DBusData::fromString(m_baseProxy->interface());
159 message << TQT_DBusData::fromString(name);
160
161 TQT_DBusMessage reply = connection.sendWithReply(message, &error);
162
163 if (reply.type() != TQT_DBusMessage::ReplyMessage) return TQT_DBusVariant();
164 if (reply.count() != 1) return TQT_DBusVariant();
165
166 bool ok = false;
167 TQT_DBusVariant value = reply.front().toVariant(&ok);
168 if (!ok) return TQT_DBusVariant();
169
170 return value;
171}
172
174{
176
177 if (error.isValid()) return bool();
178
179 bool ok = false;
180
181 bool result = variant.value.toBool(&ok);
182 if (!ok) {}
183
184 return result;
185}
186
188{
190
191 if (error.isValid()) return TQT_DBusObjectPath();
192
193 bool ok = false;
194
195 TQT_DBusObjectPath result = variant.value.toObjectPath(&ok);
196 if (!ok) {}
197
198 return result;
199}
200
201}; // namespace bluez
202
203}; // namespace org
204
205#include "mediacontrol1Proxy.moc"
206
207// End of File
208
virtual bool Next(TQT_DBusError &error)
virtual bool Previous(TQT_DBusError &error)
virtual void setDBusProperty(const TQString &name, const TQT_DBusVariant &variant, TQT_DBusError &error)
virtual bool Stop(TQT_DBusError &error)
virtual bool Pause(TQT_DBusError &error)
virtual bool VolumeDown(TQT_DBusError &error)
virtual bool VolumeUp(TQT_DBusError &error)
virtual TQT_DBusObjectPath getPlayer(TQT_DBusError &error) const
void setConnection(const TQT_DBusConnection &connection)
virtual bool Rewind(TQT_DBusError &error)
virtual bool Play(TQT_DBusError &error)
MediaControl1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
virtual bool getConnected(TQT_DBusError &error) const
virtual TQT_DBusVariant getDBusProperty(const TQString &name, TQT_DBusError &error) const
virtual bool FastForward(TQT_DBusError &error)