tdebluez
filetransfer1Proxy.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 <tqdbusdatalist.h>
13#include <tqdbusdatamap.h>
14#include <tqdbuserror.h>
15#include <tqdbusmessage.h>
16#include <tqdbusobjectpath.h>
17#include <tqdbusproxy.h>
18#include <tqdbusvariant.h>
19
20
21namespace org
22{
23namespace bluez
24{
25namespace obex
26{
27
29 : TQObject(parent, name),
30 m_baseProxy(new TQT_DBusProxy())
31{
32 m_baseProxy->setInterface("org.bluez.obex.FileTransfer1");
33 m_baseProxy->setPath(path);
34 m_baseProxy->setService(service);
35
36}
37
42
44{
45 m_baseProxy->setConnection(connection);
46}
47
49{
51
52 parameters << TQT_DBusData::fromString(folder);
53
54 TQT_DBusMessage reply = m_baseProxy->sendWithReply("ChangeFolder", parameters, &error);
55
56 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
57 return true;
58}
59
61{
63
64 parameters << TQT_DBusData::fromString(folder);
65
66 TQT_DBusMessage reply = m_baseProxy->sendWithReply("CreateFolder", parameters, &error);
67
68 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
69 return true;
70}
71
73{
75
76
77 TQT_DBusMessage reply = m_baseProxy->sendWithReply("ListFolder", parameters, &error);
78
79 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
80
81 if (reply.count() != 1) return false;
82
83 bool ok = false;
84
85 folderinfo = reply.front().toList(&ok);
86 if (!ok) return false;
87
88 return true;
89}
90
92{
94
95 parameters << TQT_DBusData::fromString(targetfile);
96 parameters << TQT_DBusData::fromString(sourcefile);
97
98 TQT_DBusMessage reply = m_baseProxy->sendWithReply("GetFile", parameters, &error);
99
100 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
101
102 if (reply.count() != 2) return false;
103
104 bool ok = false;
105
106 transfer = reply.front().toObjectPath(&ok);
107 if (!ok) return false;
108
109 reply.pop_front();
110
111 bool subOK = false;
112
113 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
114 if (!subOK) return false;
115 if (!ok) return false;
116
117 return true;
118}
119
121{
123
124 parameters << TQT_DBusData::fromString(sourcefile);
125 parameters << TQT_DBusData::fromString(targetfile);
126
127 TQT_DBusMessage reply = m_baseProxy->sendWithReply("PutFile", parameters, &error);
128
129 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
130
131 if (reply.count() != 2) return false;
132
133 bool ok = false;
134
135 transfer = reply.front().toObjectPath(&ok);
136 if (!ok) return false;
137
138 reply.pop_front();
139
140 bool subOK = false;
141
142 properties = reply.front().toStringKeyMap(&ok).toVariantMap(&subOK);
143 if (!subOK) return false;
144 if (!ok) return false;
145
146 return true;
147}
148
150{
152
153 parameters << TQT_DBusData::fromString(sourcefile);
154 parameters << TQT_DBusData::fromString(targetfile);
155
156 TQT_DBusMessage reply = m_baseProxy->sendWithReply("CopyFile", parameters, &error);
157
158 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
159 return true;
160}
161
163{
165
166 parameters << TQT_DBusData::fromString(sourcefile);
167 parameters << TQT_DBusData::fromString(targetfile);
168
169 TQT_DBusMessage reply = m_baseProxy->sendWithReply("MoveFile", parameters, &error);
170
171 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
172 return true;
173}
174
176{
178
179 parameters << TQT_DBusData::fromString(file);
180
181 TQT_DBusMessage reply = m_baseProxy->sendWithReply("Delete", parameters, &error);
182
183 if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
184 return true;
185}
186
187}; // namespace obex
188
189}; // namespace bluez
190
191}; // namespace org
192
193#include "filetransfer1Proxy.moc"
194
195// End of File
196
virtual bool CopyFile(const TQString &sourcefile, const TQString &targetfile, TQT_DBusError &error)
virtual bool ChangeFolder(const TQString &folder, TQT_DBusError &error)
virtual bool Delete(const TQString &file, TQT_DBusError &error)
virtual bool PutFile(const TQString &sourcefile, const TQString &targetfile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
virtual bool ListFolder(TQT_DBusDataList &folderinfo, TQT_DBusError &error)
virtual bool CreateFolder(const TQString &folder, TQT_DBusError &error)
virtual bool GetFile(const TQString &targetfile, const TQString &sourcefile, TQT_DBusObjectPath &transfer, TQMap< TQString, TQT_DBusVariant > &properties, TQT_DBusError &error)
FileTransfer1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)
virtual bool MoveFile(const TQString &sourcefile, const TQString &targetfile, TQT_DBusError &error)