summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/filetransfer.h
authorzecke <zecke>2002-10-11 15:08:46 (UTC)
committer zecke <zecke>2002-10-11 15:08:46 (UTC)
commit8c6b8752f69aa527e51f00b3a8526fe03dd9e122 (patch) (side-by-side diff)
tree074d38fe859dc8482ab0adc53f340669cd501f6e /noncore/apps/opie-console/filetransfer.h
parent4dff3be36a89c2e864278ce85c477f923c4e3407 (diff)
downloadopie-8c6b8752f69aa527e51f00b3a8526fe03dd9e122.zip
opie-8c6b8752f69aa527e51f00b3a8526fe03dd9e122.tar.gz
opie-8c6b8752f69aa527e51f00b3a8526fe03dd9e122.tar.bz2
Introduce rawIO in the IOLayer
This is needed because ?-modem does not like buffered IO at all and we at least double buffered it While sz_transfer is now dead we've filetransfer which is using DirectIO between IOLayer and the SZ IOSerial got adjusted to the rawIO introduction
Diffstat (limited to 'noncore/apps/opie-console/filetransfer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/filetransfer.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/filetransfer.h b/noncore/apps/opie-console/filetransfer.h
new file mode 100644
index 0000000..06c6d12
--- a/dev/null
+++ b/noncore/apps/opie-console/filetransfer.h
@@ -0,0 +1,38 @@
+#ifndef OPIE_FILE_TRANSFER_H
+#define OPIE_FILE_TRANSFER_H
+
+#include <sys/types.h>
+
+#include <qfile.h>
+
+#include "file_layer.h"
+
+class QSocketNotifier;
+class OProcess;
+class FileTransfer : public FileTransferLayer{
+ Q_OBJECT
+public:
+ enum Type {
+ SZ = 0,
+ SX,
+ SY
+ };
+ FileTransfer( Type t, IOLayer* );
+ ~FileTransfer();
+
+ void sendFile( const QString& file );
+ void sendFile( const QFile& );
+
+private slots:
+ void setupChild();
+private:
+ static pid_t m_pid;
+ int m_fd;
+ int m_info[2];
+ int m_comm[2];
+ Type m_type;
+ static void signal_handler(int);
+ static bool terminate;
+};
+
+#endif