tdebluez
media1Proxy.cpp
Go to the documentation of this file.
1 // File autogenerated
2 
3 // declaration include
4 #include "media1Proxy.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 Media1Proxy::Media1Proxy(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.Media1");
30  m_baseProxy->setPath(path);
31  m_baseProxy->setService(service);
32 
33 }
34 
36 {
37  delete m_baseProxy;
38 }
39 
40 void Media1Proxy::setConnection(const TQT_DBusConnection& connection)
41 {
42  m_baseProxy->setConnection(connection);
43 }
44 
45 bool Media1Proxy::RegisterEndpoint(const TQT_DBusObjectPath& endpoint, const TQMap< TQString, TQT_DBusVariant >& properties, TQT_DBusError& error)
46 {
47  TQValueList<TQT_DBusData> parameters;
48 
49  parameters << TQT_DBusData::fromObjectPath(endpoint);
50  parameters << TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap< TQString >(properties));
51 
52  TQT_DBusMessage reply = m_baseProxy->sendWithReply("RegisterEndpoint", parameters, &error);
53 
54  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
55  return true;
56 }
57 
58 bool Media1Proxy::UnregisterEndpoint(const TQT_DBusObjectPath& endpoint, TQT_DBusError& error)
59 {
60  TQValueList<TQT_DBusData> parameters;
61 
62  parameters << TQT_DBusData::fromObjectPath(endpoint);
63 
64  TQT_DBusMessage reply = m_baseProxy->sendWithReply("UnregisterEndpoint", parameters, &error);
65 
66  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
67  return true;
68 }
69 
70 bool Media1Proxy::RegisterPlayer(const TQT_DBusObjectPath& player, const TQMap< TQString, TQT_DBusVariant >& properties, TQT_DBusError& error)
71 {
72  TQValueList<TQT_DBusData> parameters;
73 
74  parameters << TQT_DBusData::fromObjectPath(player);
75  parameters << TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap< TQString >(properties));
76 
77  TQT_DBusMessage reply = m_baseProxy->sendWithReply("RegisterPlayer", parameters, &error);
78 
79  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
80  return true;
81 }
82 
83 bool Media1Proxy::UnregisterPlayer(const TQT_DBusObjectPath& player, TQT_DBusError& error)
84 {
85  TQValueList<TQT_DBusData> parameters;
86 
87  parameters << TQT_DBusData::fromObjectPath(player);
88 
89  TQT_DBusMessage reply = m_baseProxy->sendWithReply("UnregisterPlayer", parameters, &error);
90 
91  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
92  return true;
93 }
94 
95 }; // namespace bluez
96 
97 }; // namespace org
98 
99 #include "media1Proxy.moc"
100 
101 // End of File
102 
virtual bool UnregisterEndpoint(const TQT_DBusObjectPath &endpoint, TQT_DBusError &error)
Definition: media1Proxy.cpp:58
TQT_DBusProxy * m_baseProxy
Definition: media1Proxy.h:48
virtual bool RegisterPlayer(const TQT_DBusObjectPath &player, const TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
Definition: media1Proxy.cpp:70
void setConnection(const TQT_DBusConnection &connection)
Definition: media1Proxy.cpp:40
Media1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
Definition: media1Proxy.cpp:25
virtual bool UnregisterPlayer(const TQT_DBusObjectPath &player, TQT_DBusError &error)
Definition: media1Proxy.cpp:83
virtual bool RegisterEndpoint(const TQT_DBusObjectPath &endpoint, const TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
Definition: media1Proxy.cpp:45