tdebluez
phonebookaccess1Proxy.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#include <tqstringlist.h>
10
11// TQt D-Bus includes
12#include <tqdbusconnection.h>
13#include <tqdbusdata.h>
14#include <tqdbusdatalist.h>
15#include <tqdbusdatamap.h>
16#include <tqdbuserror.h>
17#include <tqdbusmessage.h>
18#include <tqdbusobjectpath.h>
19#include <tqdbusproxy.h>
20#include <tqdbusvariant.h>
21
22
23namespace org
24{
25namespace bluez
26{
27namespace obex
28{
29
31 : TQObject(parent, name),
32 m_baseProxy(new TQT_DBusProxy())
33{
34 m_baseProxy->setInterface("org.bluez.obex.PhonebookAccess1");
35 m_baseProxy->setPath(path);
36 m_baseProxy->setService(service);
37
38}
39
44
46{
47 m_baseProxy->setConnection(connection);
48}
49
51{
53
54 parameters << TQT_DBusData::fromString(location);
55 parameters << TQT_DBusData::fromString(phonebook);
56
57 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Select", parameters, &error);
58
59 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
60 return true;
61}
62
64{
66
67 parameters << TQT_DBusData::fromString(targetfile);
68 parameters << TQT_DBusData::fromList((filters));
69
70 TQT_DBusMessage reply = m_baseProxy->sendWithReply("PullAll", parameters, &error);
71
72 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
73
74 if (reply.count() != 2) return false;
75
76 bool ok = false;
77
78 path = reply.front().toObjectPath(&ok);
79 if (!ok) return false;
80
81 reply.pop_front();
82
83 bool subOK = false;
84
85 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
86 if (!subOK) return false;
87 if (!ok) return false;
88
89 return true;
90}
91
93{
95
96 parameters << TQT_DBusData::fromList((filters));
97
98 TQT_DBusMessage reply = m_baseProxy->sendWithReply("List", parameters, &error);
99
100 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
101
102 if (reply.count() != 1) return false;
103
104 bool ok = false;
105
106 bool subOK = false;
107
108 vcard = reply.front().toStringKeyMap(&ok).toStringMap(&subOK);
109 if (!subOK) return false;
110 if (!ok) return false;
111
112 return true;
113}
114
116{
118
119 parameters << TQT_DBusData::fromString(vcard);
120 parameters << TQT_DBusData::fromString(targetfile);
121 parameters << TQT_DBusData::fromList((filters));
122
123 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Pull", parameters, &error);
124
125 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
126
127 if (reply.count() != 2) return false;
128
129 bool ok = false;
130
131 transfer = reply.front().toObjectPath(&ok);
132 if (!ok) return false;
133
134 reply.pop_front();
135
136 bool subOK = false;
137
138 vcards = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
139 if (!subOK) return false;
140 if (!ok) return false;
141
142 return true;
143}
144
146{
147 TQT_DBusConnection connection = m_baseProxy->connection();
148
149 TQT_DBusMessage message = TQT_DBusMessage::methodCall(m_baseProxy->service(), m_baseProxy->path(), "org.freedesktop.DBus.Properties", "Set");
150
151 message << TQT_DBusData::fromString(m_baseProxy->interface());
152 message << TQT_DBusData::fromString(name);
153 message << TQT_DBusData::fromVariant(value);
154
155 connection.sendWithReply(message, &error);
156}
157
159{
160 TQT_DBusConnection connection = m_baseProxy->connection();
161
162 TQT_DBusMessage message = TQT_DBusMessage::methodCall(m_baseProxy->service(), m_baseProxy->path(), "org.freedesktop.DBus.Properties", "Get");
163
164 message << TQT_DBusData::fromString(m_baseProxy->interface());
165 message << TQT_DBusData::fromString(name);
166
167 TQT_DBusMessage reply = connection.sendWithReply(message, &error);
168
169 if (reply.type() != TQT_DBusMessage::ReplyMessage) return TQT_DBusVariant();
170 if (reply.count() != 1) return TQT_DBusVariant();
171
172 bool ok = false;
173 TQT_DBusVariant value = reply.front().toVariant(&ok);
174 if (!ok) return TQT_DBusVariant();
175
176 return value;
177}
178
180{
182
183 if (error.isValid()) return TQString();
184
185 bool ok = false;
186
187 TQString result = variant.value.toString(&ok);
188 if (!ok) {}
189
190 return result;
191}
192
194{
195 TQT_DBusVariant variant = getDBusProperty("DatabaseIdentifier", error);
196
197 if (error.isValid()) return TQString();
198
199 bool ok = false;
200
201 TQString result = variant.value.toString(&ok);
202 if (!ok) {}
203
204 return result;
205}
206
208{
209 TQT_DBusVariant variant = getDBusProperty("PrimaryCounter", error);
210
211 if (error.isValid()) return TQString();
212
213 bool ok = false;
214
215 TQString result = variant.value.toString(&ok);
216 if (!ok) {}
217
218 return result;
219}
220
222{
223 TQT_DBusVariant variant = getDBusProperty("SecondaryCounter", error);
224
225 if (error.isValid()) return TQString();
226
227 bool ok = false;
228
229 TQString result = variant.value.toString(&ok);
230 if (!ok) {}
231
232 return result;
233}
234
236{
237 TQT_DBusVariant variant = getDBusProperty("FixedImageSize", error);
238
239 if (error.isValid()) return TQString();
240
241 bool ok = false;
242
243 TQString result = variant.value.toString(&ok);
244 if (!ok) {}
245
246 return result;
247}
248
249}; // namespace obex
250
251}; // namespace bluez
252
253}; // namespace org
254
255#include "phonebookaccess1Proxy.moc"
256
257// End of File
258
virtual TQT_DBusVariant getDBusProperty(const TQString &name, TQT_DBusError &error) const
virtual TQString getFolder(TQT_DBusError &error) const
virtual void setDBusProperty(const TQString &name, const TQT_DBusVariant &variant, TQT_DBusError &error)
virtual TQString getDatabaseIdentifier(TQT_DBusError &error) const
virtual TQString getPrimaryCounter(TQT_DBusError &error) const
virtual TQString getFixedImageSize(TQT_DBusError &error) const
PhonebookAccess1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
virtual TQString getSecondaryCounter(TQT_DBusError &error) const
virtual bool List(TQMap< TQString, TQString > &vcard, const TQStringList &filters, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
virtual bool Select(const TQString &location, const TQString &phonebook, TQT_DBusError &error)
virtual bool PullAll(TQT_DBusObjectPath &path, TQMap< TQString, TQT_DBusVariant > &properties, const TQString &targetfile, const TQStringList &filters, TQT_DBusError &error)
virtual bool Pull(TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &vcards, const TQString &vcard, const TQString &targetfile, const TQStringList &filters, TQT_DBusError &error)