Diffstat (limited to 'noncore/apps/opie-console/filereceive.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/filereceive.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/filereceive.h b/noncore/apps/opie-console/filereceive.h new file mode 100644 index 0000000..a525439 --- a/dev/null +++ b/noncore/apps/opie-console/filereceive.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef OPIE_FILE_RECEIVE_H | ||
2 | #define OPIE_FILE_RECEIVE_H | ||
3 | |||
4 | /** | ||
5 | * This is the receive Implementation | ||
6 | * for X-Modem/Y-Modem/Z-Modem | ||
7 | */ | ||
8 | #include <sys/types.h> | ||
9 | |||
10 | #include "receive_layer.h" | ||
11 | |||
12 | class QSocketNotifier; | ||
13 | class FileReceive : public ReceiveLayer { | ||
14 | Q_OBJECT | ||
15 | public: | ||
16 | enum Type { | ||
17 | SZ = 0, | ||
18 | SX, | ||
19 | SY | ||
20 | }; | ||
21 | FileReceive( Type t, IOLayer* lay, const QString& startDir = QString::null ); | ||
22 | ~FileReceive(); | ||
23 | void receive(); | ||
24 | void receive( const QString& dir ); | ||
25 | void cancel(); | ||
26 | private slots: | ||
27 | void setupChild(); | ||
28 | void slotRead(); | ||
29 | void slotExec(); | ||
30 | private: | ||
31 | pid_t m_pid; | ||
32 | int m_fd; | ||
33 | int m_prog; | ||
34 | int m_info[2]; | ||
35 | int m_comm[2]; | ||
36 | int m_term[2]; | ||
37 | Type m_type; | ||
38 | QSocketNotifier* m_not; | ||
39 | QSocketNotifier* m_proc; | ||
40 | }; | ||
41 | |||
42 | #endif | ||