summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/obexftpdialog.cpp50
-rw-r--r--noncore/net/opietooth/manager/obexftpdialog.h1
-rw-r--r--noncore/net/opietooth/manager/obexftpdialogbase.ui63
3 files changed, 84 insertions, 30 deletions
diff --git a/noncore/net/opietooth/manager/obexftpdialog.cpp b/noncore/net/opietooth/manager/obexftpdialog.cpp
index f479ca2..fd2015e 100644
--- a/noncore/net/opietooth/manager/obexftpdialog.cpp
+++ b/noncore/net/opietooth/manager/obexftpdialog.cpp
@@ -1,506 +1,548 @@
1/* $Id$ */ 1/* $Id$ */
2/* OBEX file browser dialog */ 2/* OBEX file browser dialog */
3/*************************************************************************** 3/***************************************************************************
4 * * 4 * *
5 * This program is free software; you can redistribute it and/or modify * 5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by * 6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or * 7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. * 8 * (at your option) any later version. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11/* 11/*
12 * This code uses and is based on ObexFTP project code: http://triq.net/obexftp/ 12 * This code uses and is based on ObexFTP project code: http://triq.net/obexftp/
13 */ 13 */
14#include <sys/stat.h> 14#include <sys/stat.h>
15#include <sys/types.h> 15#include <sys/types.h>
16#include <unistd.h> 16#include <unistd.h>
17#include <string.h> 17#include <string.h>
18#include <errno.h> 18#include <errno.h>
19#include <qpushbutton.h> 19#include <qpushbutton.h>
20#include <qmessagebox.h> 20#include <qmessagebox.h>
21#include <qmultilineedit.h> 21#include <qmultilineedit.h>
22#include <qlineedit.h> 22#include <qlineedit.h>
23#include <qspinbox.h> 23#include <qspinbox.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qlistview.h> 25#include <qlistview.h>
26#include <qprogressbar.h> 26#include <qprogressbar.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <errno.h> 29#include <errno.h>
30#include <qfile.h> 30#include <qfile.h>
31#include <qtextstream.h> 31#include <qtextstream.h>
32#include <qstringlist.h> 32#include <qstringlist.h>
33#include "obexftpdialog.h" 33#include "obexftpdialog.h"
34#include "filelistitem.h" 34#include "filelistitem.h"
35 35
36#include <qpe/qpeapplication.h> 36#include <qpe/qpeapplication.h>
37#include <qpe/resource.h> 37#include <qpe/resource.h>
38#include <qpe/config.h> 38#include <qpe/config.h>
39#include <opie2/odebug.h> 39#include <opie2/odebug.h>
40#include <opie2/ofileselector.h> 40#include <opie2/ofileselector.h>
41#include <opie2/ofiledialog.h> 41#include <opie2/ofiledialog.h>
42 42
43using namespace Opie::Core; 43using namespace Opie::Core;
44using namespace Opie::Ui; 44using namespace Opie::Ui;
45 45
46using namespace OpieTooth; 46using namespace OpieTooth;
47 47
48#define MAX_PROGRESS 14 //Maximal progress bar 48#define MAX_PROGRESS 14 //Maximal progress bar
49 49
50static void info_cb(int event, const char *msg, int len, void* data); 50static void info_cb(int event, const char *msg, int len, void* data);
51 51
52/* 52/*
53 * Public constructor 53 * Public constructor
54 * device - bluetooth address of the device 54 * device - bluetooth address of the device
55 * port - port to connect to 55 * port - port to connect to
56 */ 56 */
57ObexFtpDialog::ObexFtpDialog(const QString& device, int port, 57ObexFtpDialog::ObexFtpDialog(const QString& device, int port,
58 QWidget* parent, const char* name, bool modal, WFlags fl) 58 QWidget* parent, const char* name, bool modal, WFlags fl)
59 : ObexFtpDialogBase(parent, name, modal, fl), m_device(device), 59 : ObexFtpDialogBase(parent, name, modal, fl), m_device(device),
60 m_port(port), curdir("") 60 m_port(port), curdir("")
61{ 61{
62 client = NULL; 62 client = NULL;
63 nRetries = 3; 63 nRetries = 3;
64 transport = OBEX_TRANS_BLUETOOTH; 64 transport = OBEX_TRANS_BLUETOOTH;
65 use_conn = TRUE; 65 use_conn = TRUE;
66 use_path = TRUE; 66 use_path = TRUE;
67 progressStatus = 0; 67 progressStatus = 0;
68 localCurdir = "/"; 68 localCurdir = "/";
69 browseLog->setEdited(FALSE); 69 browseLog->setEdited(FALSE);
70 fileList->setSorting(1); 70 fileList->setSorting(1);
71 fileList->clear(); 71 fileList->clear();
72 fileProgress->setTotalSteps(MAX_PROGRESS); 72 fileProgress->setTotalSteps(MAX_PROGRESS);
73 statusBar->clear(); 73 statusBar->clear();
74 localLayout = new QVBoxLayout(localFs); 74 localLayout = new QVBoxLayout(localFs);
75 localLayout->setSpacing( 0 ); 75 localLayout->setSpacing( 0 );
76 localLayout->setMargin( 0 ); 76 localLayout->setMargin( 0 );
77 destFile = new OFileSelector(localFs, 77 destFile = new OFileSelector(localFs,
78 OFileSelector::FileSelector, 78 OFileSelector::FileSelector,
79 OFileSelector::ExtendedAll, localCurdir, ""); 79 OFileSelector::ExtendedAll, localCurdir, "");
80 destFile->setCloseVisible(false); 80 destFile->setCloseVisible(false);
81 destFile->setNewVisible(false); 81 destFile->setNewVisible(false);
82 localLayout->addWidget(destFile); 82 localLayout->addWidget(destFile);
83 nReries->setValue(nRetries); 83 nReries->setValue(nRetries);
84 connect(browseOK, SIGNAL(clicked()), SLOT(slotBrowse())); 84 connect(browseOK, SIGNAL(clicked()), SLOT(slotBrowse()));
85 connect(fileList, SIGNAL(clicked(QListViewItem*)), 85 connect(fileList, SIGNAL(clicked(QListViewItem*)),
86 SLOT(slotCd(QListViewItem*))); 86 SLOT(slotCd(QListViewItem*)));
87 connect(getButton, 87 connect(getButton,
88 SIGNAL(clicked()), 88 SIGNAL(clicked()),
89 SLOT(getFile())); 89 SLOT(getFile()));
90 connect(putButton, 90 connect(putButton,
91 SIGNAL(clicked()), 91 SIGNAL(clicked()),
92 SLOT(putFile())); 92 SLOT(putFile()));
93 connect(delButton,
94 SIGNAL(clicked()),
95 SLOT(delFile()));
93 connect(destFile, 96 connect(destFile,
94 SIGNAL(dirSelected (const QString&)), 97 SIGNAL(dirSelected (const QString&)),
95 SLOT(updateDir(const QString&))); 98 SLOT(updateDir(const QString&)));
96 connect(saveButton, 99 connect(saveButton,
97 SIGNAL(clicked()), 100 SIGNAL(clicked()),
98 SLOT(slotSaveLog())); 101 SLOT(slotSaveLog()));
99 connect(browseButton, 102 connect(browseButton,
100 SIGNAL(clicked()), 103 SIGNAL(clicked()),
101 SLOT(slotBrowseLog())); 104 SLOT(slotBrowseLog()));
102} 105}
103 106
104ObexFtpDialog::~ObexFtpDialog() 107ObexFtpDialog::~ObexFtpDialog()
105{ 108{
106 if (client != NULL) { 109 if (client != NULL) {
107 obexftp_disconnect(client); 110 obexftp_disconnect(client);
108 obexftp_close(client); 111 obexftp_close(client);
109 } 112 }
110} 113}
111 114
112/* 115/*
113 * Do device browsing 116 * Do device browsing
114 */ 117 */
115void ObexFtpDialog::slotBrowse() 118void ObexFtpDialog::slotBrowse()
116{ 119{
117 stat_entry_t* ent; //Directory entry 120 stat_entry_t* ent; //Directory entry
118 void *dir; //Directory to read 121 void *dir; //Directory to read
119 const uint8_t* use_uuid; //uuid 122 const uint8_t* use_uuid; //uuid
120 int len; //uuid length 123 int len; //uuid length
121 FileListItem* root; //root node 124 FileListItem* root; //root node
122 int fsize; //file size 125 int fsize; //file size
123 bool numOk; //true if the string is a number 126 bool numOk; //true if the string is a number
124 int tmp; //just a temp var 127 int tmp; //just a temp var
125 128
126 status(tr("Connecting to ") + m_device); 129 status(tr("Connecting to ") + m_device);
127 odebug << "Browse device " << m_device << oendl; 130 odebug << "Browse device " << m_device << oendl;
128 browseLog->clear(); 131 browseLog->clear();
129 fileList->clear(); 132 fileList->clear();
130 progressStatus = 0; 133 progressStatus = 0;
131 fileProgress->setTotalSteps(MAX_PROGRESS); 134 fileProgress->setTotalSteps(MAX_PROGRESS);
132 fileProgress->reset(); 135 fileProgress->reset();
133 136
134 //Get parameters 137 //Get parameters
135 tmp = nReries->text().toInt(&numOk); 138 tmp = nReries->text().toInt(&numOk);
136 if (numOk) 139 if (numOk)
137 nRetries = tmp; 140 nRetries = tmp;
138 if (uuidType->currentText() == "FBS") { 141 if (uuidType->currentText() == "FBS") {
139 use_uuid = UUID_FBS; 142 use_uuid = UUID_FBS;
140 len = sizeof(UUID_FBS); 143 len = sizeof(UUID_FBS);
141 } else if (uuidType->currentText() == "S45") { 144 } else if (uuidType->currentText() == "S45") {
142 use_uuid = UUID_S45; 145 use_uuid = UUID_S45;
143 len = sizeof(UUID_S45); 146 len = sizeof(UUID_S45);
144 } else { 147 } else {
145 use_uuid = UUID_FBS; 148 use_uuid = UUID_FBS;
146 len = sizeof(UUID_FBS); 149 len = sizeof(UUID_FBS);
147 } 150 }
148 151
149 if (!cli_connect_uuid(use_uuid, len)) { 152 if (!cli_connect_uuid(use_uuid, len)) {
150 log(tr("Connection failed: ") + tr(strerror(errno))); 153 log(tr("Connection failed: ") + tr(strerror(errno)));
151 errBox("Connection failed"); 154 errBox("Connection failed");
152 status("Connection failed"); 155 status("Connection failed");
153 return; 156 return;
154 } 157 }
155 else { 158 else {
156 log(QString("Connected to ") + m_device); 159 log(QString("Connected to ") + m_device);
157 status(QString("Connected to ") + m_device); 160 status(QString("Connected to ") + m_device);
158 } 161 }
159 /* List folder */ 162 /* List folder */
160 root = new FileListItem(fileList, NULL); 163 root = new FileListItem(fileList, NULL);
161 dir = obexftp_opendir(client, curdir); 164 dir = obexftp_opendir(client, curdir);
162 while ((ent = obexftp_readdir(dir)) != NULL) { 165 while ((ent = obexftp_readdir(dir)) != NULL) {
163 FileListItem* a; //List view item 166 FileListItem* a; //List view item
164 if (ent->mode != 16877) { 167 if (ent->mode != 16877) {
165 fsize = ent->size; 168 fsize = ent->size;
166 } 169 }
167 else 170 else
168 fsize = 0; 171 fsize = 0;
169 log(QString(ent->name) + QString(" ") + 172 log(QString(ent->name) + QString(" ") +
170 QString::number(ent->mode)); 173 QString::number(ent->mode));
171 174
172 a = new FileListItem(fileList, ent, fsize); 175 a = new FileListItem(fileList, ent, fsize);
173 } 176 }
174 obexftp_closedir(dir); 177 obexftp_closedir(dir);
175} 178}
176 179
177//Error message box 180//Error message box
178int ObexFtpDialog::errBox(QCString msg) 181int ObexFtpDialog::errBox(QCString msg)
179{ 182{
180 return QMessageBox::critical(this, tr("ObexFTP error"), msg); 183 return QMessageBox::critical(this, tr("ObexFTP error"), msg);
181} 184}
182 185
183int ObexFtpDialog::errBox(QString msg) 186int ObexFtpDialog::errBox(QString msg)
184{ 187{
185 return QMessageBox::critical(this, tr("ObexFTP error"), msg); 188 return QMessageBox::critical(this, tr("ObexFTP error"), msg);
186} 189}
187 190
188int ObexFtpDialog::errBox(const char* msg) 191int ObexFtpDialog::errBox(const char* msg)
189{ 192{
190 return QMessageBox::critical(this, tr("ObexFTP error"), tr(msg)); 193 return QMessageBox::critical(this, tr("ObexFTP error"), tr(msg));
191} 194}
192 195
193//Text in the status bar 196//Text in the status bar
194void ObexFtpDialog::status(QCString msg) 197void ObexFtpDialog::status(QCString msg)
195{ 198{
196 statusBar->setText(msg); 199 statusBar->setText(msg);
197 statusBar->repaint(); 200 statusBar->repaint();
198} 201}
199 202
200void ObexFtpDialog::status(QString msg) 203void ObexFtpDialog::status(QString msg)
201{ 204{
202 statusBar->setText(msg); 205 statusBar->setText(msg);
203 statusBar->repaint(); 206 statusBar->repaint();
204} 207}
205 208
206void ObexFtpDialog::status(const char* msg) 209void ObexFtpDialog::status(const char* msg)
207{ 210{
208 statusBar->setText(msg); 211 statusBar->setText(msg);
209 statusBar->repaint(); 212 statusBar->repaint();
210} 213}
211 214
212/* 215/*
213 * Change directory with item under the cursor 216 * Change directory with item under the cursor
214 */ 217 */
215void ObexFtpDialog::slotCd(QListViewItem* item) 218void ObexFtpDialog::slotCd(QListViewItem* item)
216{ 219{
217 FileListItem* file = (FileListItem*)item; 220 FileListItem* file = (FileListItem*)item;
218 int idx; 221 int idx;
219 if (file == NULL) 222 if (file == NULL)
220 return; 223 return;
221 odebug << "Item " << file->text(0) << " clicked" << oendl; 224 odebug << "Item " << file->text(0) << " clicked" << oendl;
222 if (file->gettype() == IS_DIR) { 225 if (file->gettype() == IS_DIR) {
223 if (file->text(0) == "../") { 226 if (file->text(0) == "../") {
224 if (curdir.right(1) == "/") 227 if (curdir.right(1) == "/")
225 curdir.remove(curdir.length() - 1, 1); 228 curdir.remove(curdir.length() - 1, 1);
226 idx = curdir.findRev('/'); 229 idx = curdir.findRev('/');
227 if (idx >= 0) 230 if (idx >= 0)
228 curdir.remove(idx, curdir.length() - idx); 231 curdir.remove(idx, curdir.length() - idx);
229 else 232 else
230 curdir = ""; 233 curdir = "";
231 } 234 }
232 else { 235 else {
233 if (curdir != "" && curdir.right(1) != "/") 236 if (curdir != "" && curdir.right(1) != "/")
234 curdir += "/"; 237 curdir += "/";
235 curdir += file->text(0); 238 curdir += file->text(0);
236 } 239 }
237 odebug << "Browse " << curdir << oendl; 240 odebug << "Browse " << curdir << oendl;
238 if (obexftp_setpath(client, curdir, 0) < 0) 241 if (obexftp_setpath(client, curdir, 0) < 0)
239 log(tr("CD failed: ") + tr(strerror(errno))); 242 log(tr("CD failed: ") + tr(strerror(errno)));
240 slotBrowse(); 243 slotBrowse();
241 } 244 }
242} 245}
243 246
244/* 247/*
245 * Get the file 248 * Copy file from a remote device to the local device
246 */ 249 */
247void ObexFtpDialog::getFile() 250void ObexFtpDialog::getFile()
248{ 251{
249 FileListItem* file = (FileListItem*)fileList->selectedItem(); 252 FileListItem* file = (FileListItem*)fileList->selectedItem();
250 int result; 253 int result;
251 if (file == NULL) 254 if (file == NULL)
252 return; 255 return;
253 file2get = "/"; 256 file2get = "/";
254 local = localCurdir; 257 local = localCurdir;
255 if (local == "") { 258 if (local == "") {
256 errBox("Select a destination first"); 259 errBox("Select a destination first");
257 return; 260 return;
258 } 261 }
259 if (local.right(1) != "/") 262 if (local.right(1) != "/")
260 local += "/"; 263 local += "/";
261 if (file->gettype() == IS_FILE) { 264 if (file->gettype() == IS_FILE) {
262 if (client == NULL) { 265 if (client == NULL) {
263 errBox("No connection established"); 266 errBox("No connection established");
264 return; 267 return;
265 } 268 }
266 file2get += curdir; 269 file2get += curdir;
267 if (curdir != "" && curdir.right(1) != "/") 270 if (curdir != "" && curdir.right(1) != "/")
268 file2get += "/"; 271 file2get += "/";
269 file2get += file->text(0); 272 file2get += file->text(0);
270 local += file->text(0); 273 local += file->text(0);
271 odebug << "Copy " << file2get << " to " << local << oendl; 274 odebug << "Copy " << file2get << " to " << local << oendl;
272 progressStatus = 0; 275 progressStatus = 0;
273 fileProgress->setTotalSteps(file->getsize() / 1024); 276 fileProgress->setTotalSteps(file->getsize() / 1024);
274 fileProgress->reset(); 277 fileProgress->reset();
275 status(tr("Receiving file ") + file2get); 278 status(tr("Receiving file ") + file2get);
276 result = obexftp_get(client, local, file2get); 279 result = obexftp_get(client, local, file2get);
277 if (result < 0) { 280 if (result < 0) {
278 log(file2get + QString(" receive ERROR: ") + tr(strerror(errno))); 281 log(file2get + QString(" receive ERROR:\n") + tr(strerror(errno)));
279 errBox(file2get + QString(" receive ERROR")); 282 errBox(file2get + QString(" receive ERROR"));
280 status(file2get + QString(" receive ERROR")); 283 status(file2get + QString(" receive ERROR"));
281 } 284 }
282 else { 285 else {
283 log(file2get + QString(" received")); 286 log(file2get + QString(" received"));
284 status(file2get + QString(" received")); 287 status(file2get + QString(" received"));
285 destFile->reread(); 288 destFile->reread();
286 } 289 }
287 } 290 }
288} 291}
289 292
290/* 293/*
291 * Put the file 294 * Copy file from the local device to a remote device
292 */ 295 */
293void ObexFtpDialog::putFile() 296void ObexFtpDialog::putFile()
294{ 297{
295 int result; //OPeration result 298 int result; //OPeration result
296 int idx; //Index of a symbol in the string 299 int idx; //Index of a symbol in the string
297 struct stat localFStat; //Local file information 300 struct stat localFStat; //Local file information
298 301
299 if (client == NULL) { 302 if (client == NULL) {
300 errBox("No connection established"); 303 errBox("No connection established");
301 return; 304 return;
302 } 305 }
303 local = destFile->selectedName(); 306 local = destFile->selectedName();
304 if (local == "") { 307 if (local == "") {
305 errBox("No file slected"); 308 errBox("No file slected");
306 return; 309 return;
307 } 310 }
308 result = stat(local, &localFStat); 311 result = stat(local, &localFStat);
309 if (result < 0) { 312 if (result < 0) {
310 errBox(tr("Wrong file selected ") + local + tr(" ") + 313 errBox(tr("Wrong file selected ") + local + tr(" ") +
311 tr(strerror(errno))); 314 tr(strerror(errno)));
312 return; 315 return;
313 } 316 }
314 idx = local.findRev('/'); 317 idx = local.findRev('/');
315 if (idx > 0) { 318 if (idx > 0) {
316 file2get = local.right(local.length() - idx - 1); 319 file2get = local.right(local.length() - idx - 1);
317 } 320 }
318 else 321 else
319 file2get = local; 322 file2get = local;
320 323
321 odebug << "Copy " << local << " to " << file2get << oendl; 324 odebug << "Copy " << local << " to " << file2get << oendl;
322 progressStatus = 0; 325 progressStatus = 0;
323 fileProgress->setTotalSteps(localFStat.st_size / 1024); 326 fileProgress->setTotalSteps(localFStat.st_size / 1024);
324 fileProgress->reset(); 327 fileProgress->reset();
325 status(tr("Sending file ") + local); 328 status(tr("Sending file ") + local);
326 result = obexftp_put_file(client, local, file2get); 329 result = obexftp_put_file(client, local, file2get);
327 if (result < 0) { 330 if (result < 0) {
328 log(local + QString(" send ERROR: ") + tr(strerror(errno))); 331 log(local + QString(" send ERROR:\n") + tr(strerror(errno)));
329 errBox(local + QString(" send ERROR")); 332 errBox(local + QString(" send ERROR"));
330 status(local + QString(" send ERROR")); 333 status(local + QString(" send ERROR"));
331 } 334 }
332 else { 335 else {
336 slotBrowse();
333 log(local + QString(" sent")); 337 log(local + QString(" sent"));
334 status(local + QString(" sent")); 338 status(local + QString(" sent"));
335 } 339 }
336} 340}
337 341
342/*
343 * Delete file on a remote device
344 */
345void ObexFtpDialog::delFile()
346{
347 FileListItem* file = (FileListItem*)fileList->selectedItem();
348 int result;
349 if (file == NULL)
350 return;
351 file2get = "/";
352 if (file->gettype() == IS_FILE) {
353 if (client == NULL) {
354 errBox("No connection established");
355 return;
356 }
357 file2get += curdir;
358 if (curdir != "" && curdir.right(1) != "/")
359 file2get += "/";
360 file2get += file->text(0);
361 }
362 result = QMessageBox::warning(this, tr("Remove File"),
363 tr("Do you want to remove\n") + file2get, "Yes", "No");
364 if (result != 0)
365 return;
366 odebug << "Remove " << file2get << oendl;
367 result = obexftp_del(client, file2get);
368 if (result < 0) {
369 log(file2get + QString(" remove ERROR\n") + tr(strerror(errno)));
370 errBox(file2get + QString(" remove ERROR"));
371 status(file2get + QString(" remove ERROR"));
372 }
373 else {
374 slotBrowse();
375 log(file2get + QString(" removed"));
376 status(file2get + QString(" removed"));
377 }
378}
379
338/* connect with given uuid. re-connect every time */ 380/* connect with given uuid. re-connect every time */
339int ObexFtpDialog::cli_connect_uuid(const uint8_t *uuid, int uuid_len) 381int ObexFtpDialog::cli_connect_uuid(const uint8_t *uuid, int uuid_len)
340{ 382{
341 int retry; 383 int retry;
342 if (client != NULL) 384 if (client != NULL)
343 return TRUE; 385 return TRUE;
344 /* Open */ 386 /* Open */
345 client = obexftp_open (transport, NULL, info_cb, this); 387 client = obexftp_open (transport, NULL, info_cb, this);
346 if(client == NULL) { 388 if(client == NULL) {
347 errBox("Error opening obexftp-client"); 389 errBox("Error opening obexftp-client");
348 return FALSE; 390 return FALSE;
349 } 391 }
350 if (!use_conn) 392 if (!use_conn)
351 client->quirks &= ~OBEXFTP_CONN_HEADER; 393 client->quirks &= ~OBEXFTP_CONN_HEADER;
352 if (!use_path) 394 if (!use_path)
353 client->quirks &= ~OBEXFTP_SPLIT_SETPATH; 395 client->quirks &= ~OBEXFTP_SPLIT_SETPATH;
354 for (retry = 0; retry < nRetries; retry++) { 396 for (retry = 0; retry < nRetries; retry++) {
355 /* Connect */ 397 /* Connect */
356 switch (transport) { 398 switch (transport) {
357 case OBEX_TRANS_IRDA: 399 case OBEX_TRANS_IRDA:
358 if (obexftp_connect_uuid(client, NULL, 0, uuid, uuid_len) >= 0) 400 if (obexftp_connect_uuid(client, NULL, 0, uuid, uuid_len) >= 0)
359 return TRUE; 401 return TRUE;
360 break; 402 break;
361 case OBEX_TRANS_BLUETOOTH: 403 case OBEX_TRANS_BLUETOOTH:
362 if (obexftp_connect_uuid(client, m_device, m_port, 404 if (obexftp_connect_uuid(client, m_device, m_port,
363 uuid, uuid_len) >= 0) 405 uuid, uuid_len) >= 0)
364 return TRUE; 406 return TRUE;
365 break; 407 break;
366 default: 408 default:
367 errBox("Transport type unknown"); 409 errBox("Transport type unknown");
368 return FALSE; 410 return FALSE;
369 } 411 }
370 log(tr("Still trying to connect")); 412 log(tr("Still trying to connect"));
371 } 413 }
372 client = NULL; 414 client = NULL;
373 415
374 return FALSE; 416 return FALSE;
375} 417}
376 418
377/* 419/*
378 * Put a message to the log window 420 * Put a message to the log window
379 */ 421 */
380void ObexFtpDialog::log(QString str) 422void ObexFtpDialog::log(QString str)
381{ 423{
382 browseLog->append(str); 424 browseLog->append(str);
383} 425}
384 426
385void ObexFtpDialog::log(QCString str) 427void ObexFtpDialog::log(QCString str)
386{ 428{
387 browseLog->append(str); 429 browseLog->append(str);
388} 430}
389 431
390void ObexFtpDialog::log(QString& str) 432void ObexFtpDialog::log(QString& str)
391{ 433{
392 browseLog->append(str); 434 browseLog->append(str);
393} 435}
394 436
395void ObexFtpDialog::log(const char* str) 437void ObexFtpDialog::log(const char* str)
396{ 438{
397 browseLog->append(str); 439 browseLog->append(str);
398} 440}
399 441
400void ObexFtpDialog::incProgress() 442void ObexFtpDialog::incProgress()
401{ 443{
402 if (progressStatus < fileProgress->totalSteps()) 444 if (progressStatus < fileProgress->totalSteps())
403 fileProgress->setProgress(progressStatus++); 445 fileProgress->setProgress(progressStatus++);
404} 446}
405 447
406void ObexFtpDialog::doneProgress() 448void ObexFtpDialog::doneProgress()
407{ 449{
408 progressStatus = 0; 450 progressStatus = 0;
409 fileProgress->reset(); 451 fileProgress->reset();
410} 452}
411 453
412void ObexFtpDialog::updateDir(const QString& newdir) 454void ObexFtpDialog::updateDir(const QString& newdir)
413{ 455{
414 localCurdir = newdir; 456 localCurdir = newdir;
415} 457}
416 458
417/** 459/**
418 * Save Log to the specified file 460 * Save Log to the specified file
419 */ 461 */
420void ObexFtpDialog::slotSaveLog() 462void ObexFtpDialog::slotSaveLog()
421{ 463{
422 QFile logFile(saveLogEdit->text()); 464 QFile logFile(saveLogEdit->text());
423 if (!logFile.open(IO_WriteOnly)) { 465 if (!logFile.open(IO_WriteOnly)) {
424 errBox(tr("Unable to open file ") + saveLogEdit->text() + tr(" ") + 466 errBox(tr("Unable to open file ") + saveLogEdit->text() + tr(" ") +
425 tr(strerror(errno))); 467 tr(strerror(errno)));
426 return; 468 return;
427 } 469 }
428 QTextStream stream(&logFile); 470 QTextStream stream(&logFile);
429 stream << browseLog->text() << endl; 471 stream << browseLog->text() << endl;
430 QMessageBox::information(this, tr("Saving"), 472 QMessageBox::information(this, tr("Saving"),
431 tr("Log file saved to ") + saveLogEdit->text()); 473 tr("Log file saved to ") + saveLogEdit->text());
432} 474}
433 475
434void ObexFtpDialog::slotBrowseLog() 476void ObexFtpDialog::slotBrowseLog()
435{ 477{
436 MimeTypes types; 478 MimeTypes types;
437 QStringList all; 479 QStringList all;
438 all << "*/*"; 480 all << "*/*";
439 types.insert("All Files", all ); 481 types.insert("All Files", all );
440 482
441 QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); 483 QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 );
442 saveLogEdit->setText(str); 484 saveLogEdit->setText(str);
443} 485}
444 486
445/* 487/*
446 * Event callback function 488 * Event callback function
447 */ 489 */
448static void info_cb(int event, const char *msg, int len, void* data) 490static void info_cb(int event, const char *msg, int len, void* data)
449{ 491{
450 ObexFtpDialog* dlg = (ObexFtpDialog*)data; 492 ObexFtpDialog* dlg = (ObexFtpDialog*)data;
451 QCString cmsg(msg, len); //Message to display 493 QCString cmsg(msg, len); //Message to display
452 494
453 switch (event) { 495 switch (event) {
454 496
455 case OBEXFTP_EV_ERRMSG: 497 case OBEXFTP_EV_ERRMSG:
456 dlg->log(QCString("Error: ") + cmsg); 498 dlg->log(QCString("Error: ") + cmsg);
457 break; 499 break;
458 500
459 case OBEXFTP_EV_ERR: 501 case OBEXFTP_EV_ERR:
460 dlg->log(QCString("failed: ") + cmsg); 502 dlg->log(QCString("failed: ") + cmsg);
461 dlg->doneProgress(); 503 dlg->doneProgress();
462 break; 504 break;
463 case OBEXFTP_EV_OK: 505 case OBEXFTP_EV_OK:
464 dlg->log(QCString("done")); 506 dlg->log(QCString("done"));
465 dlg->doneProgress(); 507 dlg->doneProgress();
466 break; 508 break;
467 509
468 case OBEXFTP_EV_CONNECTING: 510 case OBEXFTP_EV_CONNECTING:
469 dlg->log(QCString("Connecting...")); 511 dlg->log(QCString("Connecting..."));
470 break; 512 break;
471 case OBEXFTP_EV_DISCONNECTING: 513 case OBEXFTP_EV_DISCONNECTING:
472 dlg->log(QCString("Disconnecting...")); 514 dlg->log(QCString("Disconnecting..."));
473 break; 515 break;
474 case OBEXFTP_EV_SENDING: 516 case OBEXFTP_EV_SENDING:
475 dlg->log(QCString("Sending ") + msg); 517 dlg->log(QCString("Sending ") + msg);
476 break; 518 break;
477 case OBEXFTP_EV_RECEIVING: 519 case OBEXFTP_EV_RECEIVING:
478 dlg->log(QCString("Receiving ") + msg); 520 dlg->log(QCString("Receiving ") + msg);
479 break; 521 break;
480 522
481 case OBEXFTP_EV_LISTENING: 523 case OBEXFTP_EV_LISTENING:
482 dlg->log(QCString("Waiting for incoming connection")); 524 dlg->log(QCString("Waiting for incoming connection"));
483 break; 525 break;
484 526
485 case OBEXFTP_EV_CONNECTIND: 527 case OBEXFTP_EV_CONNECTIND:
486 dlg->log(QCString("Incoming connection")); 528 dlg->log(QCString("Incoming connection"));
487 break; 529 break;
488 case OBEXFTP_EV_DISCONNECTIND: 530 case OBEXFTP_EV_DISCONNECTIND:
489 dlg->log(QCString("Disconnecting")); 531 dlg->log(QCString("Disconnecting"));
490 break; 532 break;
491 533
492 case OBEXFTP_EV_INFO: 534 case OBEXFTP_EV_INFO:
493 // 64 bit problems ? 535 // 64 bit problems ?
494 dlg->log(QString("Got info ") + QString::number((int)msg)); 536 dlg->log(QString("Got info ") + QString::number((int)msg));
495 break; 537 break;
496 538
497 case OBEXFTP_EV_BODY: 539 case OBEXFTP_EV_BODY:
498 break; 540 break;
499 541
500 case OBEXFTP_EV_PROGRESS: 542 case OBEXFTP_EV_PROGRESS:
501 dlg->incProgress(); 543 dlg->incProgress();
502 break; 544 break;
503 } 545 }
504} 546}
505 547
506//eof 548//eof
diff --git a/noncore/net/opietooth/manager/obexftpdialog.h b/noncore/net/opietooth/manager/obexftpdialog.h
index 81c8921..75ee95b 100644
--- a/noncore/net/opietooth/manager/obexftpdialog.h
+++ b/noncore/net/opietooth/manager/obexftpdialog.h
@@ -1,70 +1,71 @@
1/* $Id$ */ 1/* $Id$ */
2/* OBEX file browser dialog */ 2/* OBEX file browser dialog */
3/*************************************************************************** 3/***************************************************************************
4 * * 4 * *
5 * This program is free software; you can redistribute it and/or modify * 5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by * 6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or * 7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. * 8 * (at your option) any later version. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11/* 11/*
12 * This code uses and is based on ObexFTP project code: http://triq.net/obexftp/ 12 * This code uses and is based on ObexFTP project code: http://triq.net/obexftp/
13 */ 13 */
14#ifndef _OBEXFTPDIALOG_H_ 14#ifndef _OBEXFTPDIALOG_H_
15#define _OBEXFTPDIALOG_H_ 15#define _OBEXFTPDIALOG_H_
16#include "obexftpdialogbase.h" 16#include "obexftpdialogbase.h"
17#include <qstring.h> 17#include <qstring.h>
18#include <obexftp.h> 18#include <obexftp.h>
19#include <uuid.h> 19#include <uuid.h>
20#include <client.h> 20#include <client.h>
21#include <opie2/ofileselector.h> 21#include <opie2/ofileselector.h>
22#include <qlayout.h> 22#include <qlayout.h>
23namespace OpieTooth { 23namespace OpieTooth {
24 class ObexFtpDialog : public ObexFtpDialogBase { 24 class ObexFtpDialog : public ObexFtpDialogBase {
25 Q_OBJECT 25 Q_OBJECT
26 public: 26 public:
27 ObexFtpDialog(const QString& device = 0, int port = 0, 27 ObexFtpDialog(const QString& device = 0, int port = 0,
28 QWidget* parent = 0, const char* name = 0, bool modal = TRUE, 28 QWidget* parent = 0, const char* name = 0, bool modal = TRUE,
29 WFlags fl = 0); 29 WFlags fl = 0);
30 ~ObexFtpDialog(); 30 ~ObexFtpDialog();
31 void log(QString str); 31 void log(QString str);
32 void log(QCString str); 32 void log(QCString str);
33 void log(const char* str); 33 void log(const char* str);
34 void log(QString& str); 34 void log(QString& str);
35 void incProgress(); 35 void incProgress();
36 void doneProgress(); 36 void doneProgress();
37 protected: 37 protected:
38 int cli_connect_uuid(const uint8_t *uuid, int uuid_len); 38 int cli_connect_uuid(const uint8_t *uuid, int uuid_len);
39 int errBox(QCString msg); //Error message box 39 int errBox(QCString msg); //Error message box
40 int errBox(QString msg); //Error message box 40 int errBox(QString msg); //Error message box
41 int errBox(const char* msg); //Error message box 41 int errBox(const char* msg); //Error message box
42 void status(QCString msg); //Text in the status bar 42 void status(QCString msg); //Text in the status bar
43 void status(QString msg); //Text in the status bar 43 void status(QString msg); //Text in the status bar
44 void status(const char* msg); //Text in the status bar 44 void status(const char* msg); //Text in the status bar
45 protected: 45 protected:
46 QString m_device; //device MAC address 46 QString m_device; //device MAC address
47 int m_port; //port 47 int m_port; //port
48 int transport; //transport type 48 int transport; //transport type
49 bool use_conn; 49 bool use_conn;
50 bool use_path; 50 bool use_path;
51 obexftp_client_t* client; //Obex ftp client handler 51 obexftp_client_t* client; //Obex ftp client handler
52 QString curdir; //Current directory on device 52 QString curdir; //Current directory on device
53 QString localCurdir; //Local current directory 53 QString localCurdir; //Local current directory
54 QString file2get; //Remote file name 54 QString file2get; //Remote file name
55 QString local; //Local file name 55 QString local; //Local file name
56 int progressStatus; //Progress status 56 int progressStatus; //Progress status
57 Opie::Ui::OFileSelector* destFile; //Destination file or directory 57 Opie::Ui::OFileSelector* destFile; //Destination file or directory
58 QVBoxLayout* localLayout; //Window layout 58 QVBoxLayout* localLayout; //Window layout
59 int nRetries; //Number of retries (on connection) 59 int nRetries; //Number of retries (on connection)
60 private slots: 60 private slots:
61 void slotBrowse(); 61 void slotBrowse();
62 void slotCd(QListViewItem* item); 62 void slotCd(QListViewItem* item);
63 void getFile(); 63 void getFile();
64 void putFile(); 64 void putFile();
65 void delFile();
65 void updateDir(const QString& newdir); 66 void updateDir(const QString& newdir);
66 void slotSaveLog(); 67 void slotSaveLog();
67 void slotBrowseLog(); 68 void slotBrowseLog();
68 }; 69 };
69}; 70};
70#endif 71#endif
diff --git a/noncore/net/opietooth/manager/obexftpdialogbase.ui b/noncore/net/opietooth/manager/obexftpdialogbase.ui
index 2447007..83078d5 100644
--- a/noncore/net/opietooth/manager/obexftpdialogbase.ui
+++ b/noncore/net/opietooth/manager/obexftpdialogbase.ui
@@ -1,316 +1,327 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ObexFtpDialogBase</class> 2<class>ObexFtpDialogBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>ObexFtpDialogBase</cstring> 7 <cstring>ObexFtpDialogBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>283</width> 14 <width>347</width>
15 <height>312</height> 15 <height>312</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>sizePolicy</name> 19 <name>sizePolicy</name>
20 <sizepolicy> 20 <sizepolicy>
21 <hsizetype>7</hsizetype> 21 <hsizetype>7</hsizetype>
22 <vsizetype>7</vsizetype> 22 <vsizetype>7</vsizetype>
23 </sizepolicy> 23 </sizepolicy>
24 </property> 24 </property>
25 <property stdset="1"> 25 <property stdset="1">
26 <name>caption</name> 26 <name>caption</name>
27 <string>Browse device</string> 27 <string>Browse device</string>
28 </property> 28 </property>
29 <property> 29 <property>
30 <name>layoutMargin</name> 30 <name>layoutMargin</name>
31 </property> 31 </property>
32 <property> 32 <property>
33 <name>layoutSpacing</name> 33 <name>layoutSpacing</name>
34 </property> 34 </property>
35 <grid> 35 <grid>
36 <property stdset="1"> 36 <property stdset="1">
37 <name>margin</name> 37 <name>margin</name>
38 <number>0</number> 38 <number>0</number>
39 </property> 39 </property>
40 <property stdset="1"> 40 <property stdset="1">
41 <name>spacing</name> 41 <name>spacing</name>
42 <number>0</number> 42 <number>0</number>
43 </property> 43 </property>
44 <widget row="0" column="0" > 44 <widget row="0" column="0" >
45 <class>QTabWidget</class> 45 <class>QTabWidget</class>
46 <property stdset="1"> 46 <property stdset="1">
47 <name>name</name> 47 <name>name</name>
48 <cstring>obexFtpTab</cstring> 48 <cstring>obexFtpTab</cstring>
49 </property> 49 </property>
50 <property> 50 <property>
51 <name>layoutMargin</name> 51 <name>layoutMargin</name>
52 </property> 52 </property>
53 <property> 53 <property>
54 <name>layoutSpacing</name> 54 <name>layoutSpacing</name>
55 </property> 55 </property>
56 <widget> 56 <widget>
57 <class>QWidget</class> 57 <class>QWidget</class>
58 <property stdset="1"> 58 <property stdset="1">
59 <name>name</name> 59 <name>name</name>
60 <cstring>files</cstring> 60 <cstring>files</cstring>
61 </property> 61 </property>
62 <attribute> 62 <attribute>
63 <name>title</name> 63 <name>title</name>
64 <string>Device</string> 64 <string>Device</string>
65 </attribute> 65 </attribute>
66 <grid> 66 <grid>
67 <property stdset="1"> 67 <property stdset="1">
68 <name>margin</name> 68 <name>margin</name>
69 <number>0</number> 69 <number>0</number>
70 </property> 70 </property>
71 <property stdset="1"> 71 <property stdset="1">
72 <name>spacing</name> 72 <name>spacing</name>
73 <number>0</number> 73 <number>0</number>
74 </property> 74 </property>
75 <widget row="1" column="0" rowspan="1" colspan="3" > 75 <widget row="1" column="0" rowspan="1" colspan="4" >
76 <class>QProgressBar</class> 76 <class>QProgressBar</class>
77 <property stdset="1"> 77 <property stdset="1">
78 <name>name</name> 78 <name>name</name>
79 <cstring>fileProgress</cstring> 79 <cstring>fileProgress</cstring>
80 </property> 80 </property>
81 </widget> 81 </widget>
82 <widget row="3" column="0" rowspan="1" colspan="3" > 82 <widget row="3" column="0" rowspan="1" colspan="4" >
83 <class>QLabel</class> 83 <class>QLabel</class>
84 <property stdset="1"> 84 <property stdset="1">
85 <name>name</name> 85 <name>name</name>
86 <cstring>statusBar</cstring> 86 <cstring>statusBar</cstring>
87 </property> 87 </property>
88 <property stdset="1"> 88 <property stdset="1">
89 <name>text</name> 89 <name>text</name>
90 <string></string> 90 <string></string>
91 </property> 91 </property>
92 </widget> 92 </widget>
93 <widget row="2" column="0" > 93 <widget row="2" column="0" >
94 <class>QPushButton</class> 94 <class>QPushButton</class>
95 <property stdset="1"> 95 <property stdset="1">
96 <name>name</name> 96 <name>name</name>
97 <cstring>browseOK</cstring> 97 <cstring>browseOK</cstring>
98 </property> 98 </property>
99 <property stdset="1"> 99 <property stdset="1">
100 <name>text</name> 100 <name>text</name>
101 <string>Browse</string> 101 <string>Browse</string>
102 </property> 102 </property>
103 </widget> 103 </widget>
104 <widget row="2" column="1" > 104 <widget row="0" column="0" rowspan="1" colspan="4" >
105 <class>QPushButton</class>
106 <property stdset="1">
107 <name>name</name>
108 <cstring>getButton</cstring>
109 </property>
110 <property stdset="1">
111 <name>text</name>
112 <string>Get file</string>
113 </property>
114 </widget>
115 <widget row="2" column="2" >
116 <class>QPushButton</class>
117 <property stdset="1">
118 <name>name</name>
119 <cstring>putButton</cstring>
120 </property>
121 <property stdset="1">
122 <name>text</name>
123 <string>Put file</string>
124 </property>
125 </widget>
126 <widget row="0" column="0" rowspan="1" colspan="3" >
127 <class>QListView</class> 105 <class>QListView</class>
128 <column> 106 <column>
129 <property> 107 <property>
130 <name>text</name> 108 <name>text</name>
131 <string>Name</string> 109 <string>Name</string>
132 </property> 110 </property>
133 <property> 111 <property>
134 <name>clickable</name> 112 <name>clickable</name>
135 <bool>true</bool> 113 <bool>true</bool>
136 </property> 114 </property>
137 <property> 115 <property>
138 <name>resizeable</name> 116 <name>resizeable</name>
139 <bool>true</bool> 117 <bool>true</bool>
140 </property> 118 </property>
141 </column> 119 </column>
142 <column> 120 <column>
143 <property> 121 <property>
144 <name>text</name> 122 <name>text</name>
145 <string>Size</string> 123 <string>Size</string>
146 </property> 124 </property>
147 <property> 125 <property>
148 <name>clickable</name> 126 <name>clickable</name>
149 <bool>true</bool> 127 <bool>true</bool>
150 </property> 128 </property>
151 <property> 129 <property>
152 <name>resizeable</name> 130 <name>resizeable</name>
153 <bool>true</bool> 131 <bool>true</bool>
154 </property> 132 </property>
155 </column> 133 </column>
156 <property stdset="1"> 134 <property stdset="1">
157 <name>name</name> 135 <name>name</name>
158 <cstring>fileList</cstring> 136 <cstring>fileList</cstring>
159 </property> 137 </property>
160 </widget> 138 </widget>
139 <widget row="2" column="2" >
140 <class>QPushButton</class>
141 <property stdset="1">
142 <name>name</name>
143 <cstring>putButton</cstring>
144 </property>
145 <property stdset="1">
146 <name>text</name>
147 <string>Put</string>
148 </property>
149 </widget>
150 <widget row="2" column="1" >
151 <class>QPushButton</class>
152 <property stdset="1">
153 <name>name</name>
154 <cstring>getButton</cstring>
155 </property>
156 <property stdset="1">
157 <name>text</name>
158 <string>Get</string>
159 </property>
160 </widget>
161 <widget row="2" column="3" >
162 <class>QPushButton</class>
163 <property stdset="1">
164 <name>name</name>
165 <cstring>delButton</cstring>
166 </property>
167 <property stdset="1">
168 <name>text</name>
169 <string>Del</string>
170 </property>
171 </widget>
161 </grid> 172 </grid>
162 </widget> 173 </widget>
163 <widget> 174 <widget>
164 <class>QWidget</class> 175 <class>QWidget</class>
165 <property stdset="1"> 176 <property stdset="1">
166 <name>name</name> 177 <name>name</name>
167 <cstring>localFs</cstring> 178 <cstring>localFs</cstring>
168 </property> 179 </property>
169 <attribute> 180 <attribute>
170 <name>title</name> 181 <name>title</name>
171 <string>Local</string> 182 <string>Local</string>
172 </attribute> 183 </attribute>
173 </widget> 184 </widget>
174 <widget> 185 <widget>
175 <class>QWidget</class> 186 <class>QWidget</class>
176 <property stdset="1"> 187 <property stdset="1">
177 <name>name</name> 188 <name>name</name>
178 <cstring>options</cstring> 189 <cstring>options</cstring>
179 </property> 190 </property>
180 <attribute> 191 <attribute>
181 <name>title</name> 192 <name>title</name>
182 <string>Options</string> 193 <string>Options</string>
183 </attribute> 194 </attribute>
184 <grid> 195 <grid>
185 <property stdset="1"> 196 <property stdset="1">
186 <name>margin</name> 197 <name>margin</name>
187 <number>11</number> 198 <number>11</number>
188 </property> 199 </property>
189 <property stdset="1"> 200 <property stdset="1">
190 <name>spacing</name> 201 <name>spacing</name>
191 <number>6</number> 202 <number>6</number>
192 </property> 203 </property>
193 <widget row="0" column="0" > 204 <widget row="0" column="0" >
194 <class>QLabel</class> 205 <class>QLabel</class>
195 <property stdset="1"> 206 <property stdset="1">
196 <name>name</name> 207 <name>name</name>
197 <cstring>uuidLabel</cstring> 208 <cstring>uuidLabel</cstring>
198 </property> 209 </property>
199 <property stdset="1"> 210 <property stdset="1">
200 <name>text</name> 211 <name>text</name>
201 <string>uuid type</string> 212 <string>uuid type</string>
202 </property> 213 </property>
203 </widget> 214 </widget>
204 <widget row="0" column="1" rowspan="1" colspan="2" > 215 <widget row="0" column="1" rowspan="1" colspan="2" >
205 <class>QComboBox</class> 216 <class>QComboBox</class>
206 <item> 217 <item>
207 <property> 218 <property>
208 <name>text</name> 219 <name>text</name>
209 <string>FBS</string> 220 <string>FBS</string>
210 </property> 221 </property>
211 </item> 222 </item>
212 <item> 223 <item>
213 <property> 224 <property>
214 <name>text</name> 225 <name>text</name>
215 <string>S45</string> 226 <string>S45</string>
216 </property> 227 </property>
217 </item> 228 </item>
218 <property stdset="1"> 229 <property stdset="1">
219 <name>name</name> 230 <name>name</name>
220 <cstring>uuidType</cstring> 231 <cstring>uuidType</cstring>
221 </property> 232 </property>
222 </widget> 233 </widget>
223 <widget row="1" column="0" rowspan="1" colspan="2" > 234 <widget row="1" column="0" rowspan="1" colspan="2" >
224 <class>QLabel</class> 235 <class>QLabel</class>
225 <property stdset="1"> 236 <property stdset="1">
226 <name>name</name> 237 <name>name</name>
227 <cstring>connRetries</cstring> 238 <cstring>connRetries</cstring>
228 </property> 239 </property>
229 <property stdset="1"> 240 <property stdset="1">
230 <name>text</name> 241 <name>text</name>
231 <string>Retry to connect</string> 242 <string>Retry to connect</string>
232 </property> 243 </property>
233 </widget> 244 </widget>
234 <widget row="1" column="2" > 245 <widget row="1" column="2" >
235 <class>QSpinBox</class> 246 <class>QSpinBox</class>
236 <property stdset="1"> 247 <property stdset="1">
237 <name>name</name> 248 <name>name</name>
238 <cstring>nReries</cstring> 249 <cstring>nReries</cstring>
239 </property> 250 </property>
240 <property stdset="1"> 251 <property stdset="1">
241 <name>buttonSymbols</name> 252 <name>buttonSymbols</name>
242 <enum>PlusMinus</enum> 253 <enum>PlusMinus</enum>
243 </property> 254 </property>
244 </widget> 255 </widget>
245 </grid> 256 </grid>
246 </widget> 257 </widget>
247 <widget> 258 <widget>
248 <class>QWidget</class> 259 <class>QWidget</class>
249 <property stdset="1"> 260 <property stdset="1">
250 <name>name</name> 261 <name>name</name>
251 <cstring>browse</cstring> 262 <cstring>browse</cstring>
252 </property> 263 </property>
253 <attribute> 264 <attribute>
254 <name>title</name> 265 <name>title</name>
255 <string>Log</string> 266 <string>Log</string>
256 </attribute> 267 </attribute>
257 <grid> 268 <grid>
258 <property stdset="1"> 269 <property stdset="1">
259 <name>margin</name> 270 <name>margin</name>
260 <number>0</number> 271 <number>0</number>
261 </property> 272 </property>
262 <property stdset="1"> 273 <property stdset="1">
263 <name>spacing</name> 274 <name>spacing</name>
264 <number>0</number> 275 <number>0</number>
265 </property> 276 </property>
266 <widget row="1" column="1" > 277 <widget row="1" column="1" >
267 <class>QLineEdit</class> 278 <class>QLineEdit</class>
268 <property stdset="1"> 279 <property stdset="1">
269 <name>name</name> 280 <name>name</name>
270 <cstring>saveLogEdit</cstring> 281 <cstring>saveLogEdit</cstring>
271 </property> 282 </property>
272 </widget> 283 </widget>
273 <widget row="1" column="2" > 284 <widget row="1" column="2" >
274 <class>QPushButton</class> 285 <class>QPushButton</class>
275 <property stdset="1"> 286 <property stdset="1">
276 <name>name</name> 287 <name>name</name>
277 <cstring>saveButton</cstring> 288 <cstring>saveButton</cstring>
278 </property> 289 </property>
279 <property stdset="1"> 290 <property stdset="1">
280 <name>text</name> 291 <name>text</name>
281 <string>save</string> 292 <string>save</string>
282 </property> 293 </property>
283 </widget> 294 </widget>
284 <widget row="1" column="0" > 295 <widget row="1" column="0" >
285 <class>QPushButton</class> 296 <class>QPushButton</class>
286 <property stdset="1"> 297 <property stdset="1">
287 <name>name</name> 298 <name>name</name>
288 <cstring>browseButton</cstring> 299 <cstring>browseButton</cstring>
289 </property> 300 </property>
290 <property stdset="1"> 301 <property stdset="1">
291 <name>text</name> 302 <name>text</name>
292 <string>Save as:</string> 303 <string>Save as:</string>
293 </property> 304 </property>
294 </widget> 305 </widget>
295 <widget row="0" column="0" rowspan="1" colspan="3" > 306 <widget row="0" column="0" rowspan="1" colspan="3" >
296 <class>QMultiLineEdit</class> 307 <class>QMultiLineEdit</class>
297 <property stdset="1"> 308 <property stdset="1">
298 <name>name</name> 309 <name>name</name>
299 <cstring>browseLog</cstring> 310 <cstring>browseLog</cstring>
300 </property> 311 </property>
301 </widget> 312 </widget>
302 </grid> 313 </grid>
303 </widget> 314 </widget>
304 </widget> 315 </widget>
305 </grid> 316 </grid>
306</widget> 317</widget>
307<tabstops> 318<tabstops>
308 <tabstop>obexFtpTab</tabstop> 319 <tabstop>obexFtpTab</tabstop>
309 <tabstop>fileList</tabstop> 320 <tabstop>fileList</tabstop>
310 <tabstop>browseOK</tabstop> 321 <tabstop>browseOK</tabstop>
311 <tabstop>getButton</tabstop> 322 <tabstop>getButton</tabstop>
312 <tabstop>putButton</tabstop> 323 <tabstop>putButton</tabstop>
313 <tabstop>uuidType</tabstop> 324 <tabstop>uuidType</tabstop>
314 <tabstop>browseLog</tabstop> 325 <tabstop>browseLog</tabstop>
315</tabstops> 326</tabstops>
316</UI> 327</UI>