summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/filereceive.h
authorzecke <zecke>2002-10-13 15:31:12 (UTC)
committer zecke <zecke>2002-10-13 15:31:12 (UTC)
commit6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34 (patch) (unidiff)
tree14fa6710ef6d80fa213250a97f13253eb88a80cd /noncore/apps/opie-console/filereceive.h
parent5db679753dac04095a2fa4b03297785ed4ba4030 (diff)
downloadopie-6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34.zip
opie-6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34.tar.gz
opie-6a9726437a59cf3b18bf57d6e20fb2dfaaa2fc34.tar.bz2
Move some stuff in filetransfer around
make pid == 0 after a finished process. Introduce the FileReceive class it does not parse progress though
Diffstat (limited to 'noncore/apps/opie-console/filereceive.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/filereceive.h42
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
12class QSocketNotifier;
13class FileReceive : public ReceiveLayer {
14 Q_OBJECT
15public:
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();
26private slots:
27 void setupChild();
28 void slotRead();
29 void slotExec();
30private:
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