author | zecke <zecke> | 2002-10-11 15:08:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-11 15:08:46 (UTC) |
commit | 8c6b8752f69aa527e51f00b3a8526fe03dd9e122 (patch) (unidiff) | |
tree | 074d38fe859dc8482ab0adc53f340669cd501f6e /noncore/apps/opie-console/filetransfer.h | |
parent | 4dff3be36a89c2e864278ce85c477f923c4e3407 (diff) | |
download | opie-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.h | 38 |
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 @@ | |||
1 | #ifndef OPIE_FILE_TRANSFER_H | ||
2 | #define OPIE_FILE_TRANSFER_H | ||
3 | |||
4 | #include <sys/types.h> | ||
5 | |||
6 | #include <qfile.h> | ||
7 | |||
8 | #include "file_layer.h" | ||
9 | |||
10 | class QSocketNotifier; | ||
11 | class OProcess; | ||
12 | class FileTransfer : public FileTransferLayer{ | ||
13 | Q_OBJECT | ||
14 | public: | ||
15 | enum Type { | ||
16 | SZ = 0, | ||
17 | SX, | ||
18 | SY | ||
19 | }; | ||
20 | FileTransfer( Type t, IOLayer* ); | ||
21 | ~FileTransfer(); | ||
22 | |||
23 | void sendFile( const QString& file ); | ||
24 | void sendFile( const QFile& ); | ||
25 | |||
26 | private slots: | ||
27 | void setupChild(); | ||
28 | private: | ||
29 | static pid_t m_pid; | ||
30 | int m_fd; | ||
31 | int m_info[2]; | ||
32 | int m_comm[2]; | ||
33 | Type m_type; | ||
34 | static void signal_handler(int); | ||
35 | static bool terminate; | ||
36 | }; | ||
37 | |||
38 | #endif | ||