author | zecke <zecke> | 2002-10-11 15:03:33 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-11 15:03:33 (UTC) |
commit | 4dff3be36a89c2e864278ce85c477f923c4e3407 (patch) (side-by-side diff) | |
tree | 2dc6967668d6ee1679ff8291678f5d60d81e411d /noncore/apps/opie-console/test/senderui.cpp | |
parent | 1cb2d6f75e3ac959fba041e46f3894d261f13735 (diff) | |
download | opie-4dff3be36a89c2e864278ce85c477f923c4e3407.zip opie-4dff3be36a89c2e864278ce85c477f923c4e3407.tar.gz opie-4dff3be36a89c2e864278ce85c477f923c4e3407.tar.bz2 |
Make use of the new file transfer...
Diffstat (limited to 'noncore/apps/opie-console/test/senderui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/test/senderui.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
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,62 +1,68 @@ #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" SenderUI::SenderUI() : Sender() { /* we do that manually */ Profile prof; - QString str = "/dev/ttyS1"; + QString str = "/dev/ttyS0"; prof.writeEntry("Device",str ); prof.writeEntry("Baud", 115200 ); qWarning("prof " + prof.readEntry("Device") + " " + str); ser = new IOSerial(prof); connect(ser, SIGNAL(received(const QByteArray& ) ), this, SLOT(got(const QByteArray&) ) ); if ( ser->open() ) qWarning("opened!!!"); else qWarning("could not open"); - } 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()), this, SLOT(fileTransComplete())); } void SenderUI::slotSend() { QCString str = MultiLineEdit1->text().utf8(); qWarning("sending: %s", str.data() ); ser->send( str ); } void SenderUI::got(const QByteArray& ar) { for ( uint i = 0; i < ar.count(); i++ ) { printf("%c", ar[i] ); } //printf("\n"); } void SenderUI::fileTransComplete() { qWarning("file transfer compete"); } +void SenderUI::send() { + +} |