|
1 /* |
|
2 * Copyright (c) 2004 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: Declares Connection Ui Utilities Client classes. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CONNECTIONUIUTILITIESCLIENT_H__ |
|
20 #define __CONNECTIONUIUTILITIESCLIENT_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <ConnectionUiUtilities.h> |
|
25 #include "ConnectionUiUtilitiesCommon.h" |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * RConnectionUiUtilitiesSession |
|
35 */ |
|
36 class RConnectionUiUtilitiesSession : public RSessionBase |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Constructor. |
|
42 */ |
|
43 RConnectionUiUtilitiesSession(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~RConnectionUiUtilitiesSession(); |
|
49 |
|
50 /** |
|
51 * Connect to the notifier server. Must be called before any other |
|
52 * function (c'tor excepted). |
|
53 * @return KErrNone if connection succeeded and a standard error code |
|
54 * otherwise. |
|
55 */ |
|
56 TInt Connect(); |
|
57 |
|
58 /** |
|
59 * Disconnect from the notifier server. |
|
60 */ |
|
61 void Close(); |
|
62 |
|
63 public: |
|
64 /** |
|
65 * Notifier. Search available WLAN networks, and user can select one of |
|
66 * them |
|
67 * @param aNetworkPrefs Return parameter, contains id, connection |
|
68 * mode and security mode of selected wlan |
|
69 * network |
|
70 * @param aStatus status object of notifier or user does not |
|
71 * select a network. |
|
72 * @param aIsAsyncVersion ETrue if called by a really asynchronous |
|
73 * function |
|
74 */ |
|
75 void SearchWLANNetwork( |
|
76 TPckgBuf<TConnUiUiWlanNetworkPrefs>& aNetworkPrefs, |
|
77 TRequestStatus& aStatus, |
|
78 TBool aIsAsyncVersion ); |
|
79 |
|
80 /** |
|
81 * Cancel SearchWLANNetwork |
|
82 */ |
|
83 void CancelSearchWLANNetwork(); |
|
84 |
|
85 /** |
|
86 * Notifier. Shows a query, "Do you want to create a WLAN connection in |
|
87 * Off-line mode?" |
|
88 * @param aStatus status object of notifier |
|
89 * @param aIsAsyncVersion ETrue if called by a really asynchronous |
|
90 * function |
|
91 */ |
|
92 void OffLineWlanNote( TRequestStatus& aStatus, TBool aIsAsyncVersion ); |
|
93 |
|
94 /** |
|
95 * Cancel OffLineWlan Note |
|
96 */ |
|
97 void CancelOffLineWlanNote(); |
|
98 |
|
99 /** |
|
100 * Notifier. Pops up an information note: |
|
101 * "Operation not possible in Off-line mode" |
|
102 */ |
|
103 void OffLineWlanDisabledNote( TRequestStatus& aStatus ); |
|
104 |
|
105 /** |
|
106 * Notifier. Shows a data query, "Enter WEP key for WLAN" |
|
107 * @param aKey Key entered by user |
|
108 * @return ETrue if user select OK, EFalse otherwise |
|
109 */ |
|
110 void EasyWepDlg( TPckgBuf< TWepKeyData >& aKey, |
|
111 TRequestStatus& aStatus ); |
|
112 |
|
113 /** |
|
114 * Cancel Easy Wep dialog |
|
115 */ |
|
116 void CancelEasyWepDlg(); |
|
117 |
|
118 /** |
|
119 * Notifier. Shows a data query, "Enter pre-shared key for WLAN" |
|
120 * @param aKey Key entered by user |
|
121 * @return ETrue if user select OK, EFalse otherwise |
|
122 */ |
|
123 void EasyWpaDlg( TPckgBuf< TBuf< KEasyWpaQueryMaxLength > >& aKey, |
|
124 TRequestStatus& aStatus ); |
|
125 |
|
126 /** |
|
127 * Cancel Easy Wpa dialog |
|
128 */ |
|
129 void CancelEasyWpaDlg(); |
|
130 |
|
131 /** |
|
132 * Pops up an information note: |
|
133 * "Selected WLAN network has no coverage" |
|
134 */ |
|
135 void WLANNetworkUnavailableNote( TRequestStatus& aStatus ); |
|
136 |
|
137 /** |
|
138 * Confirmation note is used after the connection has been successfully |
|
139 * established via destination and connection method. |
|
140 * @param aDestId Id of used destination. |
|
141 * @param aConnMId Id of used connection method. |
|
142 * @param aStatus Status object of notifier. |
|
143 */ |
|
144 void ConnectedViaDestAndConnMethodNote( const TUint32 aDestId, |
|
145 const TUint32 aConnMId, |
|
146 TRequestStatus& aStatus ); |
|
147 /** |
|
148 * Cancel ConnectedViaDestAndConnMethodNote notifier. |
|
149 */ |
|
150 void CancelConnectedViaDestAndConnMethodNote(); |
|
151 |
|
152 /** |
|
153 * Information note is used when "Automatically" roaming is enabled |
|
154 * The actual connection establishment take places in the background |
|
155 * (no wait note). |
|
156 * @param aConnMId Id of used connection method. |
|
157 * @param aStatus Status object of notifier. |
|
158 */ |
|
159 void ChangingConnectionToNote( const TUint32 aConnMId, |
|
160 TRequestStatus& aStatus ); |
|
161 |
|
162 /** |
|
163 * Cancel ChangingConnectionToNote notifier. |
|
164 */ |
|
165 void CancelChangingConnectionToNote(); |
|
166 |
|
167 /** |
|
168 * Notifier. Shows a query, "Connect to\n '%0U' via\n '%1U'?" |
|
169 * @param aResult Result of user selection, ETrue if user accepted |
|
170 * roaming, to more preferred method, EFlase otherwise |
|
171 * @param aHomeNetwork home or foreign network |
|
172 * @param aStatus Status object of notifier. |
|
173 */ |
|
174 void ConfirmMethodUsageQuery( TMsgQueryLinkedResults& aResult, |
|
175 const TBool aHomeNetwork, |
|
176 TRequestStatus& aStatus); |
|
177 |
|
178 /** |
|
179 * Cancel ConfirmMethodUsageQuery |
|
180 */ |
|
181 void CancelConfirmMethodUsageQuery(); |
|
182 |
|
183 |
|
184 /** |
|
185 * Confirmation note is used after the connection has been successfully |
|
186 * established via a connection method. |
|
187 * @param aConnMId Id of used connection method. |
|
188 * @param aStatus Status object of notifier. |
|
189 */ |
|
190 void ConnectedViaConnMethodNote( const TUint32 aConnMId, |
|
191 TRequestStatus& aStatus ); |
|
192 /** |
|
193 * Cancel ConnectedViaConnMethodNote notifier. |
|
194 */ |
|
195 void CancelConnectedViaConnMethodNote(); |
|
196 |
|
197 /** |
|
198 * This note is displayed when power-save feature of the WLAN station |
|
199 * is incompatible and thus battery consumption of the mobile will increase. |
|
200 * @param aDisable ETrue if user wants to disable this note in the future. |
|
201 * @param aStatus Status object of notifier. |
|
202 */ |
|
203 void WlanPowerSaveTestNote( TBool& aDisable, TRequestStatus& aStatus ); |
|
204 |
|
205 /** |
|
206 * Cancel WlanPowerSaveTestNote notifier. |
|
207 */ |
|
208 void CancelWlanPowerSaveTestNote(); |
|
209 |
|
210 /** |
|
211 * Notifier. Prompts WAPI-PSK. |
|
212 * Shows a data query, "Enter pre-shared key for WLAN" |
|
213 * @param aKey Key entered by user |
|
214 * @return ETrue if user select OK, EFalse otherwise |
|
215 */ |
|
216 void EasyWapiDlg( TPckgBuf< TBuf< KEasyWapiQueryMaxLength > >& aKey, |
|
217 TRequestStatus& aStatus ); |
|
218 |
|
219 /** |
|
220 * Cancel EasyWapiDlg notifier. |
|
221 */ |
|
222 void CancelEasyWapiDlg(); |
|
223 |
|
224 /** |
|
225 * Pops up an information note: |
|
226 * "No WLAN networks are available at the moment. Connection not available." |
|
227 */ |
|
228 void NoWLANNetworksAvailableNote( TRequestStatus& aStatus ); |
|
229 |
|
230 /** |
|
231 * Discreet popup. Shows "connecting via %U" discreet popup. |
|
232 * @param aInfo Information about bearer. |
|
233 */ |
|
234 void ConnectingViaDiscreetPopup( TPckgBuf< TConnUiConnectingViaDiscreetPopup>& aInfo, |
|
235 TRequestStatus& aStatus ); |
|
236 |
|
237 /** |
|
238 * Cancel ConnectingViaDiscreetPopup notifier. |
|
239 */ |
|
240 void CancelConnectingViaDiscreetPopup(); |
|
241 |
|
242 /** |
|
243 * Discreet popup. Shows discreet popup about connection error. |
|
244 * @param aErrCode Error code. |
|
245 */ |
|
246 void ConnectionErrorDiscreetPopup( TPckgBuf< TInt >& aErrCode, |
|
247 TRequestStatus& aStatus ); |
|
248 |
|
249 /** |
|
250 * Cancel ConnectionErrorDiscreetPopup notifier. |
|
251 */ |
|
252 void CancelConnectionErrorDiscreetPopup(); |
|
253 |
|
254 private: |
|
255 |
|
256 // Pointer to the client interface |
|
257 RNotifier* iNotifier; |
|
258 |
|
259 // used for get response from notifier |
|
260 TBuf8<8> iResponseStrOffLineWlanNote; |
|
261 |
|
262 // used for get response from notifier |
|
263 TBuf8<8> iResponseStrOffLineWlanDisabledNote; |
|
264 |
|
265 // used for get response from notifier |
|
266 TBuf8<8> iResponseStrWLANNetworkUnavailableNote; |
|
267 |
|
268 // used for get response from notifier |
|
269 TBuf8<8> iResponseStrConnectingNote; |
|
270 |
|
271 TPckg<TBool> iBool; // get response from Query |
|
272 TPckg<TMsgQueryLinkedResults> iResponseMsgQuery; |
|
273 |
|
274 TPckgBuf<TConnUiUiDestConnMethodNoteId> iPassedInfo; |
|
275 |
|
276 // used for get response from notifier |
|
277 TBuf8<8> iResponseStrNoWLANNetworksAvailableNote; |
|
278 }; |
|
279 |
|
280 |
|
281 #endif /* __CONNECTIONUIUTILITIESCLIENT_H__ */ |
|
282 |
|
283 // End of File |
|
284 |