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