Diffstat (limited to 'noncore/apps/opie-console/file_layer.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/file_layer.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/file_layer.h b/noncore/apps/opie-console/file_layer.h index 0bd0fd1..bf31540 100644 --- a/noncore/apps/opie-console/file_layer.h +++ b/noncore/apps/opie-console/file_layer.h | |||
@@ -1,32 +1,42 @@ | |||
1 | #ifndef OPIE_FILE_LAYER_H | 1 | #ifndef OPIE_FILE_LAYER_H |
2 | #define OPIE_FILE_LAYER_H | 2 | #define OPIE_FILE_LAYER_H |
3 | 3 | ||
4 | #include <qmap.h> | ||
5 | |||
4 | #include "io_layer.h" | 6 | #include "io_layer.h" |
5 | 7 | ||
6 | class QFile; | 8 | class QFile; |
7 | /** | 9 | /** |
8 | * this is the layer for sending files | 10 | * this is the layer for sending files |
9 | */ | 11 | */ |
10 | class FileTransferLayer : public QObject { | 12 | class FileTransferLayer : public QObject { |
11 | |||
12 | Q_OBJECT | 13 | Q_OBJECT |
13 | 14 | ||
14 | public: | 15 | public: |
16 | enum Errors{ | ||
17 | NotSupported, | ||
18 | StartError, | ||
19 | NoError, | ||
20 | Unknown, | ||
21 | Undefined, | ||
22 | Incomplete | ||
23 | }; | ||
15 | /** | 24 | /** |
16 | *the io layer to be used | 25 | *the io layer to be used |
17 | */ | 26 | */ |
18 | FileTransferLayer( IOLayer* ); | 27 | FileTransferLayer( IOLayer* ); |
19 | virtual ~FileTransferLayer(); | 28 | virtual ~FileTransferLayer(); |
20 | 29 | ||
21 | public slots: | 30 | public slots: |
22 | /** | 31 | /** |
23 | * send a file over the layer | 32 | * send a file over the layer |
24 | */ | 33 | */ |
25 | virtual void sendFile( const QString& file ) = 0; | 34 | virtual void sendFile( const QString& file ) = 0; |
26 | virtual void sendFile( const QFile& ) = 0; | 35 | virtual void sendFile( const QFile& ) = 0; |
36 | virtual void cancel() = 0; | ||
27 | 37 | ||
28 | signals: | 38 | signals: |
29 | /** | 39 | /** |
30 | * sent the file | 40 | * sent the file |
31 | */ | 41 | */ |
32 | void sent(); | 42 | void sent(); |
@@ -35,16 +45,21 @@ signals: | |||
35 | * an error occured | 45 | * an error occured |
36 | */ | 46 | */ |
37 | 47 | ||
38 | void error( int, const QString& ); | 48 | void error( int, const QString& ); |
39 | 49 | ||
40 | /* | 50 | /* |
41 | * 100 == done | 51 | * @param file The file to send |
52 | * @param progress the progress made from 0-100 | ||
53 | * @param speed Speed in bps | ||
54 | * @param hours The hours it take to finish | ||
55 | * @param minutes The minutes it takes to finish | ||
56 | * @param send The seconds... | ||
42 | * | 57 | * |
43 | */ | 58 | */ |
44 | void progress( const QString& file, int progress ); | 59 | void progress( const QString& file, int progress, int speed, int hours, int minutes, int seconds ); |
45 | 60 | ||
46 | protected: | 61 | protected: |
47 | IOLayer* layer(); | 62 | IOLayer* layer(); |
48 | 63 | ||
49 | private: | 64 | private: |
50 | IOLayer* m_layer; | 65 | IOLayer* m_layer; |