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.ObjectPush1");
49 TQValueList<TQT_DBusData> parameters;
51 parameters << TQT_DBusData::fromString(sourcefile);
53 TQT_DBusMessage reply =
m_baseProxy->sendWithReply(
"SendFile", parameters, &error);
55 if (reply.type() != TQT_DBusMessage::ReplyMessage)
return false;
57 if (reply.count() != 2)
return false;
61 transfer = reply.front().toObjectPath(&ok);
62 if (!ok)
return false;
68 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
69 if (!subOK)
return false;
70 if (!ok)
return false;
77 TQValueList<TQT_DBusData> parameters;
79 parameters << TQT_DBusData::fromString(targetfile);
81 TQT_DBusMessage reply =
m_baseProxy->sendWithReply(
"PullBusinessCard", parameters, &error);
83 if (reply.type() != TQT_DBusMessage::ReplyMessage)
return false;
85 if (reply.count() != 2)
return false;
89 transfer = reply.front().toObjectPath(&ok);
90 if (!ok)
return false;
96 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
97 if (!subOK)
return false;
98 if (!ok)
return false;
105 TQValueList<TQT_DBusData> parameters;
107 parameters << TQT_DBusData::fromString(clientfile);
108 parameters << TQT_DBusData::fromString(targetfile);
110 TQT_DBusMessage reply =
m_baseProxy->sendWithReply(
"ExchangeBusinessCards", parameters, &error);
112 if (reply.type() != TQT_DBusMessage::ReplyMessage)
return false;
114 if (reply.count() != 2)
return false;
118 transfer = reply.front().toObjectPath(&ok);
119 if (!ok)
return false;
125 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
126 if (!subOK)
return false;
127 if (!ok)
return false;
138 #include "objectpush1Proxy.moc"
virtual ~ObjectPush1Proxy()
virtual bool ExchangeBusinessCards(const TQString &clientfile, const TQString &targetfile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
ObjectPush1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
virtual bool PullBusinessCard(const TQString &targetfile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
TQT_DBusProxy * m_baseProxy
virtual bool SendFile(const TQString &sourcefile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)