Diffstat (limited to 'noncore/apps/opie-console/filetransfer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/filetransfer.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/filetransfer.h b/noncore/apps/opie-console/filetransfer.h index 06c6d12..0829f16 100644 --- a/noncore/apps/opie-console/filetransfer.h +++ b/noncore/apps/opie-console/filetransfer.h | |||
@@ -1,38 +1,53 @@ | |||
1 | #ifndef OPIE_FILE_TRANSFER_H | 1 | #ifndef OPIE_FILE_TRANSFER_H |
2 | #define OPIE_FILE_TRANSFER_H | 2 | #define OPIE_FILE_TRANSFER_H |
3 | 3 | ||
4 | #include <sys/types.h> | 4 | #include <sys/types.h> |
5 | 5 | ||
6 | #include <qfile.h> | 6 | #include <qfile.h> |
7 | #include <qstringlist.h> | ||
7 | 8 | ||
8 | #include "file_layer.h" | 9 | #include "file_layer.h" |
9 | 10 | ||
10 | class QSocketNotifier; | 11 | class QSocketNotifier; |
11 | class OProcess; | 12 | class OProcess; |
13 | class FileTransferControl; | ||
12 | class FileTransfer : public FileTransferLayer{ | 14 | class FileTransfer : public FileTransferLayer{ |
13 | Q_OBJECT | 15 | Q_OBJECT |
16 | friend class FileTransferControl; | ||
14 | public: | 17 | public: |
15 | enum Type { | 18 | enum Type { |
16 | SZ = 0, | 19 | SZ = 0, |
17 | SX, | 20 | SX, |
18 | SY | 21 | SY |
19 | }; | 22 | }; |
20 | FileTransfer( Type t, IOLayer* ); | 23 | FileTransfer( Type t, IOLayer* ); |
21 | ~FileTransfer(); | 24 | ~FileTransfer(); |
22 | 25 | ||
23 | void sendFile( const QString& file ); | 26 | void sendFile( const QString& file ); |
24 | void sendFile( const QFile& ); | 27 | void sendFile( const QFile& ); |
28 | void cancel(); | ||
25 | 29 | ||
26 | private slots: | 30 | private slots: |
27 | void setupChild(); | 31 | void setupChild(); |
32 | void slotRead(); | ||
33 | void slotProgress( const QStringList& ); | ||
28 | private: | 34 | private: |
35 | /* | ||
36 | * FIXME? What does happen if we've | ||
37 | * two FileTransfers at a time? | ||
38 | * Have a procctl which does listen | ||
39 | * for termination and then send a signal | ||
40 | */ | ||
29 | static pid_t m_pid; | 41 | static pid_t m_pid; |
30 | int m_fd; | 42 | int m_fd; |
43 | int m_prog; | ||
31 | int m_info[2]; | 44 | int m_info[2]; |
32 | int m_comm[2]; | 45 | int m_comm[2]; |
46 | QString m_file; | ||
33 | Type m_type; | 47 | Type m_type; |
48 | QSocketNotifier *m_not; | ||
34 | static void signal_handler(int); | 49 | static void signal_handler(int); |
35 | static bool terminate; | 50 | static bool terminate; |
36 | }; | 51 | }; |
37 | 52 | ||
38 | #endif | 53 | #endif |