summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-11 15:03:33 (UTC)
committer zecke <zecke>2002-10-11 15:03:33 (UTC)
commit4dff3be36a89c2e864278ce85c477f923c4e3407 (patch) (side-by-side diff)
tree2dc6967668d6ee1679ff8291678f5d60d81e411d
parent1cb2d6f75e3ac959fba041e46f3894d261f13735 (diff)
downloadopie-4dff3be36a89c2e864278ce85c477f923c4e3407.zip
opie-4dff3be36a89c2e864278ce85c477f923c4e3407.tar.gz
opie-4dff3be36a89c2e864278ce85c477f923c4e3407.tar.bz2
Make use of the new file transfer...
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/test/console.pro4
-rw-r--r--noncore/apps/opie-console/test/senderui.cpp16
-rw-r--r--noncore/apps/opie-console/test/senderui.h10
3 files changed, 21 insertions, 9 deletions
diff --git a/noncore/apps/opie-console/test/console.pro b/noncore/apps/opie-console/test/console.pro
index b10b651..f5761e2 100644
--- a/noncore/apps/opie-console/test/console.pro
+++ b/noncore/apps/opie-console/test/console.pro
@@ -4,8 +4,8 @@ CONFIG = qt debug
#DESTDIR = $(OPIEDIR)/bin
HEADERS = ../io_layer.h ../io_serial.h ../sz_transfer.h ../file_layer.h\
- senderui.h ../profile.h
+ senderui.h ../profile.h ../filetransfer.h
SOURCES = ../io_layer.cpp ../io_serial.cpp \
../profile.cpp ../sz_transfer.cpp ../file_layer.cpp\
- main.cpp senderui.cpp
+ main.cpp senderui.cpp ../filetransfer.cpp
INTERFACES = sender.ui
INCLUDEPATH += $(OPIEDIR)/include
diff --git a/noncore/apps/opie-console/test/senderui.cpp b/noncore/apps/opie-console/test/senderui.cpp
index 24d3eb2..3d7c534 100644
--- a/noncore/apps/opie-console/test/senderui.cpp
+++ b/noncore/apps/opie-console/test/senderui.cpp
@@ -1,11 +1,15 @@
#include <stdlib.h>
#include <stdio.h>
+#include <fcntl.h>
+#include <sys/termios.h>
#include <qmultilineedit.h>
+#include <qsocketnotifier.h>
#include "../profile.h"
#include "../io_serial.h"
-#include "../sz_transfer.h"
+#include "../filetransfer.h"
+#include <opie/oprocess.h>
#include "senderui.h"
@@ -16,5 +20,5 @@ SenderUI::SenderUI()
/* we do that manually */
Profile prof;
- QString str = "/dev/ttyS1";
+ QString str = "/dev/ttyS0";
prof.writeEntry("Device",str );
prof.writeEntry("Baud", 115200 );
@@ -31,5 +35,4 @@ SenderUI::SenderUI()
-
}
SenderUI::~SenderUI() {
@@ -38,6 +41,6 @@ SenderUI::~SenderUI() {
void SenderUI::slotSendFile() {
- sz = new SzTransfer(SzTransfer::SZ, ser);
- sz->sendFile("/home/jake/test");
+ sz = new FileTransfer(FileTransfer::SZ, ser);
+ sz->sendFile("/home/ich/bootopie-v06-13.jffs2");
connect (sz, SIGNAL(sent()),
@@ -61,2 +64,5 @@ void SenderUI::fileTransComplete() {
qWarning("file transfer compete");
}
+void SenderUI::send() {
+
+}
diff --git a/noncore/apps/opie-console/test/senderui.h b/noncore/apps/opie-console/test/senderui.h
index f6230cc..5e613cd 100644
--- a/noncore/apps/opie-console/test/senderui.h
+++ b/noncore/apps/opie-console/test/senderui.h
@@ -7,5 +7,7 @@
class IOSerial;
-class SzTransfer;
+class FileTransfer;
+class QSocketNotifier;
+class OProcess;
class SenderUI : public Sender {
Q_OBJECT
@@ -15,4 +17,5 @@ public:
public slots:
+ void send();
void slotSendFile();
void slotSend();
@@ -21,5 +24,8 @@ public slots:
private:
IOSerial* ser;
- SzTransfer* sz;
+ FileTransfer* sz;
+ int m_fd;
+ QSocketNotifier* m_sock;
+ OProcess* m_proc;
};