tdebluez
synchronization1Proxy.cpp
Go to the documentation of this file.
1 // File autogenerated
2 
3 // declaration include
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 namespace obex
25 {
26 
27 Synchronization1Proxy::Synchronization1Proxy(const TQString& service, const TQString& path, TQObject* parent, const char* name)
28  : TQObject(parent, name),
29  m_baseProxy(new TQT_DBusProxy())
30 {
31  m_baseProxy->setInterface("org.bluez.obex.Synchronization1");
32  m_baseProxy->setPath(path);
33  m_baseProxy->setService(service);
34 
35 }
36 
38 {
39  delete m_baseProxy;
40 }
41 
42 void Synchronization1Proxy::setConnection(const TQT_DBusConnection& connection)
43 {
44  m_baseProxy->setConnection(connection);
45 }
46 
47 bool Synchronization1Proxy::SetLocation(const TQString& location, TQT_DBusError& error)
48 {
49  TQValueList<TQT_DBusData> parameters;
50 
51  parameters << TQT_DBusData::fromString(location);
52 
53  TQT_DBusMessage reply = m_baseProxy->sendWithReply("SetLocation", parameters, &error);
54 
55  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
56  return true;
57 }
58 
59 bool Synchronization1Proxy::GetPhonebook(const TQString& targetfile, TQT_DBusObjectPath& transfer, TQMap< TQString, TQT_DBusVariant >& properties, TQT_DBusError& error)
60 {
61  TQValueList<TQT_DBusData> parameters;
62 
63  parameters << TQT_DBusData::fromString(targetfile);
64 
65  TQT_DBusMessage reply = m_baseProxy->sendWithReply("GetPhonebook", parameters, &error);
66 
67  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
68 
69  if (reply.count() != 2) return false;
70 
71  bool ok = false;
72 
73  transfer = reply.front().toObjectPath(&ok);
74  if (!ok) return false;
75 
76  reply.pop_front();
77 
78  bool subOK = false;
79 
80  properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
81  if (!subOK) return false;
82  if (!ok) return false;
83 
84  return true;
85 }
86 
87 bool Synchronization1Proxy::PutPhonebook(const TQString& sourcefile, TQT_DBusObjectPath& transfer, TQMap< TQString, TQT_DBusVariant >& properties, TQT_DBusError& error)
88 {
89  TQValueList<TQT_DBusData> parameters;
90 
91  parameters << TQT_DBusData::fromString(sourcefile);
92 
93  TQT_DBusMessage reply = m_baseProxy->sendWithReply("PutPhonebook", parameters, &error);
94 
95  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
96 
97  if (reply.count() != 2) return false;
98 
99  bool ok = false;
100 
101  transfer = reply.front().toObjectPath(&ok);
102  if (!ok) return false;
103 
104  reply.pop_front();
105 
106  bool subOK = false;
107 
108  properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
109  if (!subOK) return false;
110  if (!ok) return false;
111 
112  return true;
113 }
114 
115 }; // namespace obex
116 
117 }; // namespace bluez
118 
119 }; // namespace org
120 
121 #include "synchronization1Proxy.moc"
122 
123 // End of File
124 
virtual bool PutPhonebook(const TQString &sourcefile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
virtual bool GetPhonebook(const TQString &targetfile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
virtual bool SetLocation(const TQString &location, TQT_DBusError &error)
Synchronization1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)