tdebluez
profilemanager1Proxy.cpp
Go to the documentation of this file.
1 // File autogenerated
2 
3 // declaration include
4 #include "profilemanager1Proxy.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 ProfileManager1Proxy::ProfileManager1Proxy(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.ProfileManager1");
30  m_baseProxy->setPath(path);
31  m_baseProxy->setService(service);
32 
33 }
34 
36 {
37  delete m_baseProxy;
38 }
39 
40 void ProfileManager1Proxy::setConnection(const TQT_DBusConnection& connection)
41 {
42  m_baseProxy->setConnection(connection);
43 }
44 
45 bool ProfileManager1Proxy::RegisterProfile(const TQT_DBusObjectPath& profile, const TQString& UUID, const TQMap< TQString, TQT_DBusVariant >& options, TQT_DBusError& error)
46 {
47  TQValueList<TQT_DBusData> parameters;
48 
49  parameters << TQT_DBusData::fromObjectPath(profile);
50  parameters << TQT_DBusData::fromString(UUID);
51  parameters << TQT_DBusData::fromStringKeyMap(TQT_DBusDataMap< TQString >(options));
52 
53  TQT_DBusMessage reply = m_baseProxy->sendWithReply("RegisterProfile", parameters, &error);
54 
55  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
56  return true;
57 }
58 
59 bool ProfileManager1Proxy::UnregisterProfile(const TQT_DBusObjectPath& profile, TQT_DBusError& error)
60 {
61  TQValueList<TQT_DBusData> parameters;
62 
63  parameters << TQT_DBusData::fromObjectPath(profile);
64 
65  TQT_DBusMessage reply = m_baseProxy->sendWithReply("UnregisterProfile", parameters, &error);
66 
67  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
68  return true;
69 }
70 
71 }; // namespace bluez
72 
73 }; // namespace org
74 
75 #include "profilemanager1Proxy.moc"
76 
77 // End of File
78 
virtual bool UnregisterProfile(const TQT_DBusObjectPath &profile, TQT_DBusError &error)
virtual bool RegisterProfile(const TQT_DBusObjectPath &profile, const TQString &UUID, const TQMap< TQString, TQT_DBusVariant > &options, TQT_DBusError &error)
ProfileManager1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
void setConnection(const TQT_DBusConnection &connection)