Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTGateway.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.h b/noncore/settings/networksettings2/opietooth2/OTGateway.h index 11c6b30..d0e42db 100644 --- a/noncore/settings/networksettings2/opietooth2/OTGateway.h +++ b/noncore/settings/networksettings2/opietooth2/OTGateway.h | |||
@@ -8,55 +8,55 @@ | |||
8 | #include <OTDriverList.h> | 8 | #include <OTDriverList.h> |
9 | #include <OTInquiry.h> | 9 | #include <OTInquiry.h> |
10 | 10 | ||
11 | class QPixmap; | 11 | class QPixmap; |
12 | 12 | ||
13 | namespace Opietooth2 { | 13 | namespace Opietooth2 { |
14 | 14 | ||
15 | class OTDriverList; | 15 | class OTDriverList; |
16 | class OTDriver; | 16 | class OTDriver; |
17 | class OTDevice; | 17 | class OTDevice; |
18 | class OTPeer; | 18 | class OTPeer; |
19 | class OTInquiry; | 19 | class OTInquiry; |
20 | class OTPANConnection; | 20 | class OTPANNetworkSetup; |
21 | class OTLinkKey; | 21 | class OTLinkKey; |
22 | 22 | ||
23 | typedef QVector<OTPeer> PeerVector; | 23 | typedef QVector<OTPeer> PeerVector; |
24 | typedef QVector<OTPANConnection> PANConnectionVector; | 24 | typedef QVector<OTPANNetworkSetup> PANNetworkSetupVector; |
25 | typedef QArray<OTLinkKey> LinkKeyArray; | 25 | typedef QArray<OTLinkKey> LinkKeyArray; |
26 | 26 | ||
27 | class OTLinkKey { | 27 | class OTLinkKey { |
28 | 28 | ||
29 | public : | 29 | public : |
30 | 30 | ||
31 | OTLinkKey( const OTDeviceAddress & F, | 31 | OTLinkKey( const OTDeviceAddress & F, |
32 | const OTDeviceAddress & T ) { | 32 | const OTDeviceAddress & T ) { |
33 | From = F; | 33 | From = F; |
34 | To = T; | 34 | To = T; |
35 | } | 35 | } |
36 | 36 | ||
37 | const OTDeviceAddress & to() | 37 | const OTDeviceAddress & to() |
38 | { return To; } | 38 | { return To; } |
39 | const OTDeviceAddress & from() | 39 | const OTDeviceAddress & from() |
40 | { return From; } | 40 | { return From; } |
41 | 41 | ||
42 | OTDeviceAddress From; | 42 | OTDeviceAddress From; |
43 | OTDeviceAddress To; | 43 | OTDeviceAddress To; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | class OTPANConnection { | 46 | class OTPANNetworkSetup { |
47 | 47 | ||
48 | public : | 48 | public : |
49 | 49 | ||
50 | OTPANConnection( const QString & Dev, const QString & CT ) { | 50 | OTPANNetworkSetup( const QString & Dev, const QString & CT ) { |
51 | Device = Dev; | 51 | Device = Dev; |
52 | ConnectedTo = CT; | 52 | ConnectedTo = CT; |
53 | } | 53 | } |
54 | 54 | ||
55 | QString Device; | 55 | QString Device; |
56 | QString ConnectedTo; | 56 | QString ConnectedTo; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | 59 | ||
60 | class OTGateway : public QObject { | 60 | class OTGateway : public QObject { |
61 | 61 | ||
62 | Q_OBJECT | 62 | Q_OBJECT |
@@ -83,25 +83,25 @@ public : | |||
83 | bool isEnabled(); | 83 | bool isEnabled(); |
84 | void setRefreshTimer( int MilleSecs ); | 84 | void setRefreshTimer( int MilleSecs ); |
85 | // return socket to HCI raw layer | 85 | // return socket to HCI raw layer |
86 | inline int getSocket() | 86 | inline int getSocket() |
87 | { return HciCtl; } | 87 | { return HciCtl; } |
88 | 88 | ||
89 | OTDriverList & getDriverList() | 89 | OTDriverList & getDriverList() |
90 | { return AllDrivers; } | 90 | { return AllDrivers; } |
91 | OTDriver * driver( int nr ) | 91 | OTDriver * driver( int nr ) |
92 | { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; } | 92 | { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; } |
93 | void updateDrivers(); | 93 | void updateDrivers(); |
94 | 94 | ||
95 | PANConnectionVector getPANConnections(); | 95 | PANNetworkSetupVector getPANNetworkSetups(); |
96 | 96 | ||
97 | // scan neighbourhood using device | 97 | // scan neighbourhood using device |
98 | void scanNeighbourhood( OTDriver * D = 0 ); | 98 | void scanNeighbourhood( OTDriver * D = 0 ); |
99 | void stopScanOfNeighbourhood(void ); | 99 | void stopScanOfNeighbourhood(void ); |
100 | void setScanWith( OTDriver * D = 0 ) | 100 | void setScanWith( OTDriver * D = 0 ) |
101 | { ScanWith = (D) ? D : | 101 | { ScanWith = (D) ? D : |
102 | (AllDrivers.count() ) ? AllDrivers[0] : 0; } | 102 | (AllDrivers.count() ) ? AllDrivers[0] : 0; } |
103 | OTDriver * scanWith( void ) | 103 | OTDriver * scanWith( void ) |
104 | { return ScanWith; } | 104 | { return ScanWith; } |
105 | 105 | ||
106 | // get list of all detected peers | 106 | // get list of all detected peers |
107 | inline const PeerVector & peers( void ) | 107 | inline const PeerVector & peers( void ) |
@@ -164,25 +164,25 @@ signals : | |||
164 | // end of detection process | 164 | // end of detection process |
165 | void finishedDetecting(); | 165 | void finishedDetecting(); |
166 | 166 | ||
167 | protected : | 167 | protected : |
168 | 168 | ||
169 | void connectNotify( const char * Signal ); | 169 | void connectNotify( const char * Signal ); |
170 | void disconnectNotify( const char * Signal ); | 170 | void disconnectNotify( const char * Signal ); |
171 | 171 | ||
172 | void timerEvent( QTimerEvent * ); | 172 | void timerEvent( QTimerEvent * ); |
173 | 173 | ||
174 | private : | 174 | private : |
175 | 175 | ||
176 | void loadActiveConnections( void ); | 176 | void loadActiveNetworkSetups( void ); |
177 | void loadKnownPeers( void ); | 177 | void loadKnownPeers( void ); |
178 | void saveKnownPeers( void ); | 178 | void saveKnownPeers( void ); |
179 | bool isConnectedTo( int devid, | 179 | bool isConnectedTo( int devid, |
180 | const OTDeviceAddress & Address ); | 180 | const OTDeviceAddress & Address ); |
181 | 181 | ||
182 | void readLinkKeys(); | 182 | void readLinkKeys(); |
183 | 183 | ||
184 | static OTGateway * SingleGateway; | 184 | static OTGateway * SingleGateway; |
185 | static int UseCount; | 185 | static int UseCount; |
186 | 186 | ||
187 | OTDriver * ScanWith; | 187 | OTDriver * ScanWith; |
188 | OTDriverList AllDrivers; | 188 | OTDriverList AllDrivers; |