summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_layer.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_layer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_layer.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/io_layer.h b/noncore/apps/opie-console/io_layer.h
index c8f41d7..537c851 100644
--- a/noncore/apps/opie-console/io_layer.h
+++ b/noncore/apps/opie-console/io_layer.h
@@ -1,17 +1,17 @@
1#ifndef OPIE_IO_LAYER_H 1#ifndef OPIE_IO_LAYER_H
2#define OPIE_IO_LAYER_H 2#define OPIE_IO_LAYER_H
3 3
4#include <qobject.h> 4#include <qobject.h>
5 5#include <qpe/config.h>
6 6
7/** 7/**
8 * This is the base class for IO Layers 8 * This is the base class for IO Layers
9 * It will used to sent and recv data( QByteArray ) 9 * It will used to sent and recv data( QByteArray )
10 * it 10 * it
11 */ 11 */
12class Config; 12class Config;
13class IOLayer : public QObject { 13class IOLayer : public QObject {
14 Q_OBJECT 14 Q_OBJECT
15public: 15public:
16 enum Error { 16 enum Error {
17 NoError = -1, 17 NoError = -1,
@@ -20,32 +20,43 @@ public:
20 ClosedUnexpected =2, 20 ClosedUnexpected =2,
21 ClosedError =3, 21 ClosedError =3,
22 Terminate = 4 22 Terminate = 4
23 /* add more errors here */ 23 /* add more errors here */
24 }; 24 };
25 /** 25 /**
26 * a small c'tor 26 * a small c'tor
27 */ 27 */
28 IOLayer(); 28 IOLayer();
29 29
30 /** 30 /**
31 * create an IOLayer instance from a config file 31 * create an IOLayer instance from a config file
32 * can be used by session managemnt/profiles 32 * the currently set group stores the profile/session
33 * information
33 */ 34 */
34 IOLayer( const Config& ); 35 IOLayer( const Config& );
35 36
36 /** 37 /**
37 * destructor 38 * destructor
38 */ 39 */
39 virtual ~IOLayer(); 40 virtual ~IOLayer();
41
42 /**
43 * a small internal identifier
44 */
45 virtual QString identifier() const = 0;
46
47 /**
48 * a short name
49 */
50 virtual QString name() const = 0;
40signals: 51signals:
41 /** 52 /**
42 * received input as QCString 53 * received input as QCString
43 */ 54 */
44 virtual void received( const QByteArray& ) = 0; 55 virtual void received( const QByteArray& ) = 0;
45 56
46 /** 57 /**
47 * an error occured 58 * an error occured
48 * int for the error number 59 * int for the error number
49 * and QString for a text 60 * and QString for a text
50 */ 61 */
51 virtual void error( int, const QString& ) = 0; 62 virtual void error( int, const QString& ) = 0;
@@ -61,26 +72,15 @@ public slots:
61 */ 72 */
62 virtual bool open() = 0; 73 virtual bool open() = 0;
63 74
64 /** 75 /**
65 * close the io 76 * close the io
66 */ 77 */
67 virtual void close() = 0; 78 virtual void close() = 0;
68 79
69 /** 80 /**
70 * closes and reloads the settings 81 * closes and reloads the settings
71 */ 82 */
72 virtual void reload( const Config& ) = 0; 83 virtual void reload( const Config& ) = 0;
73
74 /**
75 * a small internal identifier
76 */
77 virtual QString identifier()const = 0;
78
79 /**
80 * a short name
81 */
82 virtual QString name()const = 0;
83
84}; 84};
85 85
86#endif 86#endif