Diffstat (limited to 'noncore/net/opietooth/lib/connection.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/connection.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/opietooth/lib/connection.h b/noncore/net/opietooth/lib/connection.h index 37090ce..76e5dad 100644 --- a/noncore/net/opietooth/lib/connection.h +++ b/noncore/net/opietooth/lib/connection.h | |||
@@ -8,63 +8,63 @@ | |||
8 | namespace OpieTooth { | 8 | namespace OpieTooth { |
9 | 9 | ||
10 | enum LinkDirection { Incoming= true, Outgoing = false }; | 10 | enum LinkDirection { Incoming= true, Outgoing = false }; |
11 | enum LinkMode { Master =0, Client }; | 11 | enum LinkMode { Master =0, Client }; |
12 | 12 | ||
13 | 13 | ||
14 | /** | 14 | /** |
15 | * The Connection class stores | 15 | * The Connection class stores |
16 | * the output of hcitool con | 16 | * the output of hcitool con |
17 | * in a OO way | 17 | * in a OO way |
18 | */ | 18 | */ |
19 | 19 | ||
20 | class Connection { | 20 | class ConnectionState { |
21 | public: | 21 | public: |
22 | /** | 22 | /** |
23 | * typedef for a list of | 23 | * typedef for a list of |
24 | * Connections | 24 | * Connections |
25 | */ | 25 | */ |
26 | typedef QValueList<Connection> ValueList; | 26 | typedef QValueList<ConnectionState> ValueList; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Copy c'tor. | 29 | * Copy c'tor. |
30 | */ | 30 | */ |
31 | Connection( const Connection& ); | 31 | ConnectionState( const ConnectionState& ); |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * Main c'tor | 34 | * Main c'tor |
35 | * Basicly it holds all values | 35 | * Basicly it holds all values |
36 | * a blueZ connections can have | 36 | * a blueZ connections can have |
37 | * @param in If the connection is either incoming or outgoing | 37 | * @param in If the connection is either incoming or outgoing |
38 | * @param conType Either ACL or SCO for connection type | 38 | * @param conType Either ACL or SCO for connection type |
39 | * @param mac The BD Address( mac ) of the peer | 39 | * @param mac The BD Address( mac ) of the peer |
40 | * @param handle the blueZ handle | 40 | * @param handle the blueZ handle |
41 | * @param state the State of the connection | 41 | * @param state the State of the connection |
42 | * @param linkMode the linkmode of the connection MASTER or not | 42 | * @param linkMode the linkmode of the connection MASTER or not |
43 | * | 43 | * |
44 | * < ACL 00:02:C7:09:2B:53 handle 1 state 1 lm MASTER | 44 | * < ACL 00:02:C7:09:2B:53 handle 1 state 1 lm MASTER |
45 | * | 45 | * |
46 | */ | 46 | */ |
47 | Connection( bool in, | 47 | ConnectionState( bool in, |
48 | const QString& conType, | 48 | const QString& conType, |
49 | const QString& mac, | 49 | const QString& mac, |
50 | int handle, | 50 | int handle, |
51 | int state, | 51 | int state, |
52 | int linkMode ); | 52 | int linkMode ); |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * C'tor for compability with QValueList | 55 | * C'tor for compability with QValueList |
56 | * QValueList needs this c'tor. | 56 | * QValueList needs this c'tor. |
57 | */ | 57 | */ |
58 | Connection(); | 58 | ConnectionState(); |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * Set if the connection is incoming or | 61 | * Set if the connection is incoming or |
62 | * outgoing | 62 | * outgoing |
63 | * @param in Whether or not the connection is ingoing or not. | 63 | * @param in Whether or not the connection is ingoing or not. |
64 | * for param use either Incoming or Outgoing | 64 | * for param use either Incoming or Outgoing |
65 | * | 65 | * |
66 | */ | 66 | */ |
67 | void setDirection( bool incoming = Incoming ); | 67 | void setDirection( bool incoming = Incoming ); |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * direction() will return Incoming( true ) | 70 | * direction() will return Incoming( true ) |
@@ -122,29 +122,29 @@ namespace OpieTooth { | |||
122 | * Sets the link mode of the Connection | 122 | * Sets the link mode of the Connection |
123 | */ | 123 | */ |
124 | void setLinkMode( int linkMode = Master ); | 124 | void setLinkMode( int linkMode = Master ); |
125 | 125 | ||
126 | /** | 126 | /** |
127 | * returns the linkMode | 127 | * returns the linkMode |
128 | */ | 128 | */ |
129 | int linkMode()const; | 129 | int linkMode()const; |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * copy c'tor | 132 | * copy c'tor |
133 | */ | 133 | */ |
134 | Connection &operator=( const Connection& ); | 134 | ConnectionState &operator=( const ConnectionState& ); |
135 | 135 | ||
136 | private: | 136 | private: |
137 | class ConnectionPrivate; | 137 | class ConnectionStatePrivate; |
138 | ConnectionPrivate *d; | 138 | ConnectionStatePrivate *d; |
139 | bool m_direction : 1; | 139 | bool m_direction : 1; |
140 | QString m_contype; | 140 | QString m_contype; |
141 | QString m_mac; | 141 | QString m_mac; |
142 | int m_handle; | 142 | int m_handle; |
143 | int m_state; | 143 | int m_state; |
144 | int m_linkMode; | 144 | int m_linkMode; |
145 | 145 | ||
146 | }; | 146 | }; |
147 | }; | 147 | }; |
148 | 148 | ||
149 | 149 | ||
150 | #endif | 150 | #endif |