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>
28 : TQObject(parent, name),
29 m_baseProxy(new TQT_DBusProxy())
31 m_baseProxy->setInterface(
"org.bluez.obex.Synchronization1");
49 TQValueList<TQT_DBusData> parameters;
51 parameters << TQT_DBusData::fromString(location);
53 TQT_DBusMessage reply =
m_baseProxy->sendWithReply(
"SetLocation", parameters, &error);
55 if (reply.type() != TQT_DBusMessage::ReplyMessage)
return false;
61 TQValueList<TQT_DBusData> parameters;
63 parameters << TQT_DBusData::fromString(targetfile);
65 TQT_DBusMessage reply =
m_baseProxy->sendWithReply(
"GetPhonebook", parameters, &error);
67 if (reply.type() != TQT_DBusMessage::ReplyMessage)
return false;
69 if (reply.count() != 2)
return false;
73 transfer = reply.front().toObjectPath(&ok);
74 if (!ok)
return false;
80 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
81 if (!subOK)
return false;
82 if (!ok)
return false;
89 TQValueList<TQT_DBusData> parameters;
91 parameters << TQT_DBusData::fromString(sourcefile);
93 TQT_DBusMessage reply =
m_baseProxy->sendWithReply(
"PutPhonebook", parameters, &error);
95 if (reply.type() != TQT_DBusMessage::ReplyMessage)
return false;
97 if (reply.count() != 2)
return false;
101 transfer = reply.front().toObjectPath(&ok);
102 if (!ok)
return false;
108 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
109 if (!subOK)
return false;
110 if (!ok)
return false;
121 #include "synchronization1Proxy.moc"
virtual bool PutPhonebook(const TQString &sourcefile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
virtual ~Synchronization1Proxy()
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)
TQT_DBusProxy * m_baseProxy
Synchronization1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)