author | harlekin <harlekin> | 2003-03-21 15:56:58 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-21 15:56:58 (UTC) |
commit | d3f71dadbd2dafcf42480afeffe75e7e36ec7d9c (patch) (unidiff) | |
tree | 922b36110df58bdc00a3e2508313609c0f00c45f /noncore/net/opietooth/lib/connection.h | |
parent | 69086f42072e7fc1ea5256cb9275a27bf5b41f87 (diff) | |
download | opie-d3f71dadbd2dafcf42480afeffe75e7e36ec7d9c.zip opie-d3f71dadbd2dafcf42480afeffe75e7e36ec7d9c.tar.gz opie-d3f71dadbd2dafcf42480afeffe75e7e36ec7d9c.tar.bz2 |
move connection work to the lib
Diffstat (limited to 'noncore/net/opietooth/lib/connection.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/connection.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/noncore/net/opietooth/lib/connection.h b/noncore/net/opietooth/lib/connection.h index 76e5dad..a0c50f2 100644 --- a/noncore/net/opietooth/lib/connection.h +++ b/noncore/net/opietooth/lib/connection.h | |||
@@ -1,21 +1,52 @@ | |||
1 | 1 | ||
2 | #ifndef OpieTooth_Connection_H | 2 | #ifndef OpieTooth_Connection_H |
3 | #define OpieTooth_Connection_H | 3 | #define OpieTooth_Connection_H |
4 | 4 | ||
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | #include <qvaluelist.h> | 6 | #include <qvaluelist.h> |
7 | #include <qobject.h> | ||
7 | 8 | ||
8 | namespace OpieTooth { | 9 | namespace OpieTooth { |
9 | 10 | ||
11 | |||
12 | |||
13 | |||
14 | /** | ||
15 | * Parent class for all kinds of starting connection | ||
16 | * subclasses | ||
17 | * | ||
18 | */ | ||
19 | class StartConnection : public QObject { | ||
20 | |||
21 | protected: | ||
22 | |||
23 | enum ConnectionType{ | ||
24 | Pan = 0, | ||
25 | Rfcomm, | ||
26 | Obex, | ||
27 | Hci | ||
28 | }; | ||
29 | |||
30 | virtual ~StartConnection() {}; | ||
31 | |||
32 | virtual QString name() = 0; | ||
33 | virtual void setName( QString name ) = 0; | ||
34 | virtual ConnectionType type() = 0; | ||
35 | virtual void setConnectionType() = 0; | ||
36 | virtual void start() = 0; | ||
37 | virtual void stop() = 0; | ||
38 | |||
39 | }; | ||
40 | |||
10 | enum LinkDirection { Incoming= true, Outgoing = false }; | 41 | enum LinkDirection { Incoming= true, Outgoing = false }; |
11 | enum LinkMode { Master =0, Client }; | 42 | enum LinkMode { Master =0, Client }; |
12 | 43 | ||
13 | 44 | ||
14 | /** | 45 | /** |
15 | * The Connection class stores | 46 | * The Connection class stores |
16 | * the output of hcitool con | 47 | * the output of hcitool con |
17 | * in a OO way | 48 | * in a OO way |
18 | */ | 49 | */ |
19 | 50 | ||
20 | class ConnectionState { | 51 | class ConnectionState { |
21 | public: | 52 | public: |