|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Watcher for BTEng server PubSub and CenRep keys. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef BTENGSRVKEYWATCHER_H |
|
21 #define BTENGSRVKEYWATCHER_H |
|
22 |
|
23 |
|
24 #include <e32property.h> |
|
25 |
|
26 #include "btengactive.h" |
|
27 |
|
28 class CBTEngServer; |
|
29 class CRepository; |
|
30 |
|
31 /** |
|
32 * ?one_line_short_description |
|
33 * |
|
34 * ?more_complete_description |
|
35 * |
|
36 * @lib ?library |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CBTEngSrvKeyWatcher : public CBase, public MBTEngActiveObserver |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Two-phase constructor |
|
46 */ |
|
47 static CBTEngSrvKeyWatcher* NewL( CBTEngServer* aServer ); |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 virtual ~CBTEngSrvKeyWatcher(); |
|
53 |
|
54 // from base class MBTEngActiveObserver |
|
55 |
|
56 /** |
|
57 * From MBTEngActiveObserver. |
|
58 * Notification that a key value has changed. |
|
59 * |
|
60 * @since S60 v3.2 |
|
61 * @param ?arg1 ?description |
|
62 */ |
|
63 virtual void RequestCompletedL( CBTEngActive* aActive, TInt aId, |
|
64 TInt aStatus ); |
|
65 |
|
66 /** |
|
67 * From MBTEngActiveObserver. |
|
68 * Notification that a key value has changed. |
|
69 * |
|
70 * @since S60 v3.2 |
|
71 * @param ?arg1 ?description |
|
72 */ |
|
73 virtual void HandleError( CBTEngActive* aActive, TInt aId, TInt aError ); |
|
74 |
|
75 private: |
|
76 |
|
77 /** |
|
78 * C++ default constructor |
|
79 */ |
|
80 CBTEngSrvKeyWatcher( CBTEngServer* aServer ); |
|
81 |
|
82 /** |
|
83 * Symbian 2nd-phase constructor |
|
84 */ |
|
85 void ConstructL(); |
|
86 |
|
87 /** |
|
88 * Check if we checked the BD_ADDR before. |
|
89 * |
|
90 * @since S60 v3.2 |
|
91 */ |
|
92 void CheckBDAddrL(); |
|
93 |
|
94 private: // data |
|
95 |
|
96 /** |
|
97 * Property contaning the BT Device Under Test (DUT) status. |
|
98 * When enabled, we need inform the server. |
|
99 */ |
|
100 RProperty iDutModeKey; |
|
101 |
|
102 /** |
|
103 * Property containing the phone lock status. |
|
104 * We turn off BT when the phone is remotely locked. |
|
105 */ |
|
106 RProperty iPhoneLockKey; |
|
107 |
|
108 /** |
|
109 * Property containing the system status. |
|
110 * We disconnect BT links when the phone is shutting down. |
|
111 */ |
|
112 RProperty iSystemStateKey; |
|
113 |
|
114 /** |
|
115 * Property containing count of physical BT connections. |
|
116 * When physical connections exists, specific BT UI indicator is shown. |
|
117 */ |
|
118 RProperty iPHYCountKey; |
|
119 |
|
120 /** |
|
121 * Property containing the BT connecting status. |
|
122 * When connecting, specific BT UI indicator is shown. |
|
123 */ |
|
124 RProperty iBtConnectionKey; |
|
125 |
|
126 /** |
|
127 * Property containing the BT stack scanning status. |
|
128 * When changed, the UI indicators are updated |
|
129 */ |
|
130 RProperty iBtScanningKey; |
|
131 |
|
132 /** |
|
133 * Property containing the emergency call status. |
|
134 * We disconnect BT SAP when an emergency call is created. |
|
135 */ |
|
136 RProperty iEmergencyCallKey; |
|
137 |
|
138 /** |
|
139 * Property containing the BT device address. |
|
140 * We read it once to store it in CenRep. |
|
141 */ |
|
142 RProperty iBdaddrKey; |
|
143 |
|
144 /** |
|
145 * Property containing the Simple Pairing debug mode status. |
|
146 * We deactivate debug mode after 30 mins or BT power off. |
|
147 */ |
|
148 RProperty iSspDebugModeKey; |
|
149 |
|
150 /** |
|
151 * Property containing the BT registry change monitoring key |
|
152 */ |
|
153 RProperty iBtRegistryKey; |
|
154 |
|
155 /** |
|
156 * Session with the central repository for BT SAP mode setting. |
|
157 * We load/unload BT SAP plugin. |
|
158 * Own. |
|
159 */ |
|
160 CRepository* iSapKeyCenRep; |
|
161 |
|
162 /** |
|
163 * Active object for subscribing to DUT mode property changes. |
|
164 * Own. |
|
165 */ |
|
166 CBTEngActive* iDutModeWatcher; |
|
167 |
|
168 /** |
|
169 * Active object for subscribing to phone lock property changes. |
|
170 * Own. |
|
171 */ |
|
172 CBTEngActive* iPhoneLockWatcher; |
|
173 |
|
174 /** |
|
175 * Active object for subscribing to system status property changes. |
|
176 * Own. |
|
177 */ |
|
178 CBTEngActive* iSystemStateWatcher; |
|
179 |
|
180 /** |
|
181 * Active object for subscribing to PHYCount property changes. |
|
182 * Own. |
|
183 */ |
|
184 CBTEngActive* iPHYCountWatcher; |
|
185 |
|
186 /** |
|
187 * Active object for subscribing to BT connection property changes. |
|
188 * Own. |
|
189 */ |
|
190 CBTEngActive* iBtConnectionWatcher; |
|
191 |
|
192 /** |
|
193 * Active object for subscribing to BT scanning state property changes. |
|
194 * Own. |
|
195 */ |
|
196 CBTEngActive* iBtScanningWatcher; |
|
197 |
|
198 /** |
|
199 * Active object for subscribing to emergency call property changes. |
|
200 * Own. |
|
201 */ |
|
202 CBTEngActive* iEmergencyCallWatcher; |
|
203 |
|
204 /** |
|
205 * Active object for subscribing to BT SAP mode setting changes. |
|
206 * Own. |
|
207 */ |
|
208 CBTEngActive* iSapModeWatcher; |
|
209 |
|
210 /** |
|
211 * Active object for subscribing to BD_Addr property changes. |
|
212 * Own. |
|
213 */ |
|
214 CBTEngActive* iBdaddrWatcher; |
|
215 |
|
216 /** |
|
217 * Active object for subscribing to SSP debug mode property changes. |
|
218 * Own. |
|
219 */ |
|
220 CBTEngActive* iSspDebugModeWatcher; |
|
221 |
|
222 /** |
|
223 * Active object for subscribing to BT registry property changes. |
|
224 * Own. |
|
225 */ |
|
226 CBTEngActive* iBtRegistryWatcher; |
|
227 |
|
228 /** |
|
229 * Pointer to our parent. |
|
230 * Not own. |
|
231 */ |
|
232 CBTEngServer* iServer; |
|
233 |
|
234 }; |
|
235 |
|
236 |
|
237 #endif // BTENGSRVKEYWATCHER_H |