|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: |
|
15 * This class provides connection/session related information. |
|
16 * Both the requested and the stored AP's are here. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef INTERNET_CONNECTION_MANAGER_H |
|
22 #define INTERNET_CONNECTION_MANAGER_H |
|
23 |
|
24 //FORWARD DECLARATIONS |
|
25 class CIntConnectionInitiator; |
|
26 class CApUtils; |
|
27 class CApDataHandler; |
|
28 class CCommsDatabase; |
|
29 class CAknGlobalNote; |
|
30 class CAknGlobalConfirmationQuery; |
|
31 class CAknWaitDialog; |
|
32 class CActiveConnectorSyncWrapper; |
|
33 class TCommDbConnPref; |
|
34 class TConnSnapPref; |
|
35 |
|
36 //INCLUDES |
|
37 #include <bldvariant.hrh> |
|
38 #include <e32base.h> |
|
39 #include <cdbpreftable.h> |
|
40 #include <f32file.h> |
|
41 #include <es_sock.h> |
|
42 #include <in_sock.h> |
|
43 #include <aknprogressdialog.h> |
|
44 #include <etel.h> |
|
45 #include <exterror.h> |
|
46 #include <mconnection.h> |
|
47 #include <IdPair.h> |
|
48 #include <GsmError.h> |
|
49 #include <etelpckt.h> |
|
50 #include <etelmm.h> |
|
51 #include <etelmmerr.h> |
|
52 #include <VpnAPItem.h> |
|
53 #include <VpnApEngine.h> |
|
54 #include <ConnectionObservers.h> |
|
55 #include <errorui.h> |
|
56 #include <AknNotifyStd.h> |
|
57 |
|
58 #include <CentralRepository.h> |
|
59 #include <CoreApplicationUIsSDKCRKeys.h> |
|
60 |
|
61 //CONSTS |
|
62 const TUint32 KPrompt = 0; |
|
63 const TInt KErrGeneralConnection = -50000; |
|
64 const TInt NW_STAT_WPS_ERROR = -26041; |
|
65 const TInt KMaxStages = 3; |
|
66 |
|
67 _LIT( KConnectionResourceFileFormatter, "z:%SCONNECTIONMANAGER.RSC" ); |
|
68 |
|
69 const TInt KEtelExtErrIntervalHigh = KErrEtelGsmBase; |
|
70 const TInt KEtelExtErrIntervalLow = KEtelExtErrIntervalHigh - 1160; |
|
71 const TInt KGsmErrIntervalHigh = KErrPhoneSpecificGsmBase; |
|
72 const TInt KGsmErrIntervalLow = KGsmErrIntervalHigh - 500; |
|
73 const TInt KEtelCoreErrIntervalHigh = KErrEtelCoreBase; |
|
74 const TInt KEtelCoreErrIntervalLow = KEtelCoreErrIntervalHigh - 64; |
|
75 const static TInt KADontShowErrors[] = |
|
76 { KErrGsmCCUnassignedNumber, |
|
77 KErrGsmCCNoRouteToDestination, |
|
78 KErrGsmCCChannelUnacceptable, |
|
79 KErrGsmCCOperatorDeterminedBarring, |
|
80 KErrGsmCCUserBusy, |
|
81 KErrGsmCCUserNotResponding, |
|
82 KErrGsmCCUserAlertingNoAnswer, |
|
83 KErrGsmCCNumberChanged, |
|
84 KErrGsmCCDestinationOutOfOrder, |
|
85 KErrGsmCCInvalidNumberFormat, |
|
86 KErrGsmCCNoChannelAvailable, |
|
87 KErrGsmCCNetworkOutOfOrder, |
|
88 KErrGsmCCTemporaryFailure, |
|
89 KErrGsmCCSwitchingEquipmentCongestion, |
|
90 KErrGsmCCRequestedChannelNotAvailable, |
|
91 KErrGsmCCResourceNotAvailable, |
|
92 KErrGsmCCQualityOfServiceNotAvailable, |
|
93 KErrGsmCCIncomingCallsBarredInCug, |
|
94 KErrGsmCCRequestedFacilityNotImplemented, |
|
95 KErrGsmCCInvalidCallReferenceValue, |
|
96 KErrGsmCCUserNotInCug, |
|
97 KErrGsmCCIncompatibleDestination, |
|
98 KErrGsmCCInvalidTransitNetworkSelection, |
|
99 KErrGsmCCSemanticallyIncorrectMessage, |
|
100 KErrGsmCCIncompatibleMessageInProtocolState, |
|
101 KErrGsmCCConditionalIEError, |
|
102 KErrGsmCCUnspecifiedProtocolError, |
|
103 KErrGsmCCRequestedFacilityNotSubscribed, |
|
104 KErrGsmCCAccessInformationDiscarded, |
|
105 KErrGsmCallInProgress, |
|
106 KErrGsmNumberBarred, |
|
107 KErrGsmInvalidFdn, |
|
108 KErrGsmNotAllowed, |
|
109 KErrGsmNoService, |
|
110 KErrGsmCallServerFail, |
|
111 KErrGsmGprsActive, |
|
112 KErrGsm0707SimNotInserted, |
|
113 KErrGsm0707SIMPuk1Required, |
|
114 KErrGsm0707SimPin1Required, |
|
115 KErrGsm0707SimPin2Required, |
|
116 KErrGsm0707SimFailure, |
|
117 KErrGsm0707PhoneToSimLockRequired, |
|
118 KErrGsm0707SimWrong, |
|
119 KErrArgument, |
|
120 KErrGsmNoNumber, |
|
121 KErrGsmCCFacilityRejected, |
|
122 KErrMMEtelActivationBlockedByCallControlNoText, |
|
123 KErrMMEtelActivationBlockedByCallControlWithText |
|
124 }; |
|
125 |
|
126 const static TInt KNumsOfDontShowErrors = sizeof(KADontShowErrors) / sizeof(TInt); |
|
127 |
|
128 //these errors will not be converted to a general one! |
|
129 const static TInt KAExcludeFromConverting[] = |
|
130 { |
|
131 KErrGprsServicesNotAllowed, KErrGprsAndNonGprsServicesNotAllowed, |
|
132 KErrGprsMSIdentityCannotBeDerivedByTheNetwork, KErrGprsMSImplicitlyDetached, |
|
133 KErrGprsMSCTemporarilyNotReachable, KErrGprsLlcOrSndcpFailure, |
|
134 KErrGprsInsufficientResources, KErrGprsMissingorUnknownAPN, |
|
135 KErrGprsUnknownPDPAddress, KErrGprsUserAuthenticationFailure, |
|
136 KErrGprsActivationRejectedByGGSN, |
|
137 KErrGprsNSAPIAlreadyUsed, KErrGprsRegularContextDeactivation, |
|
138 KErrGprsQoSNotAccepted, KErrGprsReactivationRequested, |
|
139 KErrGprsFeatureNotSupported, |
|
140 KErrEtelCallNotActive, |
|
141 KErrGsmMMNetworkFailure, |
|
142 KErrGprsActivationRejected, |
|
143 KErrGsmMMServiceOptionNotSubscribed, |
|
144 KErrGsmMMServiceOptionTemporaryOutOfOrder, |
|
145 KErrPacketDataTsyMaxPdpContextsReached |
|
146 }; |
|
147 |
|
148 const static TInt KNumsOfExcludeFromConverting = sizeof(KAExcludeFromConverting) / sizeof(TInt); |
|
149 |
|
150 class MOffLineObserver |
|
151 { |
|
152 public: |
|
153 |
|
154 virtual void OfflineModeChanged( TBool aEnabled ) = 0; |
|
155 }; |
|
156 |
|
157 //This class is responsible for the logic that lies in connection handling |
|
158 NONSHARABLE_CLASS( CInternetConnectionManager ): public CBase, |
|
159 public MProgressDialogCallback, |
|
160 public MConnection, |
|
161 public MConnectionMultiStageObserver, |
|
162 public MOffLineObserver |
|
163 { |
|
164 public: |
|
165 /** |
|
166 *Symbian OS 2 phased constructor |
|
167 *@param aSilentMode: Set it to true if you don't want any userinteraction |
|
168 */ |
|
169 IMPORT_C static CInternetConnectionManager* NewL( TBool aSilentMode= EFalse ); |
|
170 |
|
171 |
|
172 /** |
|
173 *Symbian OS 2 phased constructor |
|
174 *@param aSilentMode: Set it to true if you don't want any userinteraction |
|
175 */ |
|
176 IMPORT_C static CInternetConnectionManager* NewL( CCommsDatabase* aCommsDb, TBool aSilentMode= EFalse ); |
|
177 |
|
178 /** |
|
179 *Symbian OS 2 phased constructor |
|
180 *@param aSilentMode: Set it to true if you don't want any userinteraction |
|
181 */ |
|
182 IMPORT_C static CInternetConnectionManager* NewLC( TBool aSilentMode= EFalse ); |
|
183 |
|
184 /** |
|
185 *Symbian OS 2 phased constructor |
|
186 *@param aSilentMode: Set it to true if you don't want any userinteraction |
|
187 */ |
|
188 IMPORT_C static CInternetConnectionManager* NewLC( CCommsDatabase* aCommsDb, TBool aSilentMode= EFalse ); |
|
189 |
|
190 public: |
|
191 /** |
|
192 *Connects to the network |
|
193 *It can leave with a lot of errors coming from underlying components |
|
194 *If you don't want to handle all the leaves separately TRAP it |
|
195 *and if error occured (other than OOM) call ShowGeneralConnectionErrorL |
|
196 *@param aIAPId1 the first AP id to try the connection with, if 0 the user will be prompted |
|
197 *@param aIAPId2 the second AP id to try the connection with, if 0 the user will be prompted |
|
198 *@return KErrNone if no error occured, KErrGeneral if any connection error occured |
|
199 */ |
|
200 IMPORT_C TInt ConnectL( TUint32 aIAPId1, TUint32 aIAPId2 ); |
|
201 |
|
202 /** |
|
203 *Connects to the network |
|
204 *It can leave with a lot of errors coming from underlying components |
|
205 *If you don't want to handle all the leaves separately TRAP it |
|
206 *and if error occured (other than OOM) call ShowGeneralConnectionErrorL |
|
207 *@param aIAPId the AP id to try the connection with, if 0 the user will be prompted |
|
208 *@return KErrNone if no error occured, KErrGeneral if any connection error occured |
|
209 */ |
|
210 IMPORT_C TInt ConnectL( TUint32 aIAPId ); |
|
211 |
|
212 /** |
|
213 *Call this function to show a localised general error |
|
214 *It can be used after a trapped call to ConnectL |
|
215 */ |
|
216 IMPORT_C void ShowGeneralConnectionErrorL(); |
|
217 |
|
218 /** |
|
219 *Use this function to stop the connection |
|
220 */ |
|
221 IMPORT_C void StopConnectionL(); |
|
222 |
|
223 /** |
|
224 *Use this function to find out if the old already existing connection is used |
|
225 *or a new connection is established |
|
226 */ |
|
227 IMPORT_C TBool NewConnectionEstablished( ) const; |
|
228 |
|
229 /** |
|
230 * Change Internet Accespoint ( Change Connection ) |
|
231 * @return |
|
232 */ |
|
233 IMPORT_C void ChangeIapL( TConManChangeConn& aCangeConn, |
|
234 TUint32& aNewAp ); |
|
235 |
|
236 /** |
|
237 * Ask Internet Accespoint from dialog |
|
238 * @return KErrNone if the user selected an Iap or an error code |
|
239 */ |
|
240 IMPORT_C TInt AskIap( TUint32& aNewAp ); |
|
241 |
|
242 /** |
|
243 * Shows the connection changed dialog. |
|
244 * @return none. |
|
245 */ |
|
246 IMPORT_C void ShowConnectionChangedDlg(); |
|
247 |
|
248 public: |
|
249 |
|
250 /** |
|
251 *Destructor |
|
252 */ |
|
253 virtual ~CInternetConnectionManager(); |
|
254 |
|
255 public: //MProgressDialogCallback |
|
256 |
|
257 /** |
|
258 *This is called when the Connection Wait Dialog is dismissed |
|
259 *@param aButtonId The button that was used to dismiss the dialog |
|
260 */ |
|
261 void DialogDismissedL( TInt aButtonId ); |
|
262 |
|
263 protected: |
|
264 |
|
265 /** |
|
266 *first phase constructor |
|
267 */ |
|
268 CInternetConnectionManager( TBool aSilentMode= EFalse ); |
|
269 |
|
270 /** |
|
271 *first phase constructor |
|
272 */ |
|
273 CInternetConnectionManager( CCommsDatabase* aCommsDb, TBool aSilentMode= EFalse ); |
|
274 |
|
275 private: |
|
276 |
|
277 enum TWaitIconType { EWaitNoIcon, EWaitDataIcon, EWaitGPRSIcon }; |
|
278 |
|
279 private: |
|
280 |
|
281 /*Does the connection with no check for existing one |
|
282 *It does not display any errors |
|
283 *@param aPref1 the first preference to try |
|
284 *@param aPref2 the second preference to try |
|
285 *@return KErrNone or KErrGeneral |
|
286 */ |
|
287 TInt ConnectWithoutCheckL ( TUint32 aIAPId1, TUint32 aIAPId2 ); |
|
288 |
|
289 /*Does the connection |
|
290 *It does not display any errors |
|
291 *@param aPref1 the first preference to try |
|
292 *@param aPref2 the second preference to try |
|
293 *@return KErrNone or KErrGeneral |
|
294 */ |
|
295 TInt ConnectWithoutCheckL( TUint32 aIAPId1 ); |
|
296 |
|
297 //Can be called after a ConnectWithoutCheckL |
|
298 void DisplayConnErrorL(); |
|
299 |
|
300 /*Does the connection |
|
301 *@param aPref1 the first preference to try |
|
302 *@param aPref2 the second preference to try |
|
303 *@return KErrNone or KErrGeneral |
|
304 */ |
|
305 TInt ConnectL |
|
306 ( |
|
307 TCommDbConnPref& aPref1, |
|
308 TCommDbConnPref& aPref2 |
|
309 ); |
|
310 |
|
311 /** |
|
312 *Does the connection |
|
313 *@param aPref1 the preference to try |
|
314 *@return KErrNone or KErrGeneral |
|
315 */ |
|
316 TInt ConnectL |
|
317 ( |
|
318 TCommDbConnPref& aPref1 |
|
319 ); |
|
320 |
|
321 /** |
|
322 *Check network availability |
|
323 *@param aGPRSAvailable on return it is ETrue if there is GPRS coverage |
|
324 *@return EFalse if there is no network |
|
325 */ |
|
326 TBool CheckNetworkL( TBool& aGPRSAvailable ); |
|
327 |
|
328 /** |
|
329 *Return the bearer type of the given AP. |
|
330 *@param aIAPId the IAPId |
|
331 */ |
|
332 TApBearerType BearerTypeL( TUint32 aIAPId ); |
|
333 |
|
334 /** |
|
335 *returns the name of the specified IAP |
|
336 *@param aIAPId the id of the IAP |
|
337 *@return the name of the AP |
|
338 */ |
|
339 HBufC* APNameLC( TUint32 aIAPId ) const; |
|
340 |
|
341 /** |
|
342 *Returns the whether WLAN is supported in off-line mode. |
|
343 **/ |
|
344 TBool CheckForWLAN(); |
|
345 |
|
346 private: |
|
347 |
|
348 /** |
|
349 *Do change iap. |
|
350 */ |
|
351 TBool DoChangeIapL( TUint32& aNewAp ); |
|
352 |
|
353 private: |
|
354 |
|
355 /** |
|
356 *second phase constructor |
|
357 */ |
|
358 void ConstructL(); |
|
359 |
|
360 /** |
|
361 * pops connection note while it is in connecting mode |
|
362 * @param aLabel |
|
363 * @param aIcon |
|
364 */ |
|
365 void StartWaitDialogL( HBufC* aLabel, TWaitIconType aIcon ); |
|
366 |
|
367 /** |
|
368 *Pops up query note with the default icon and OK Cancel CBA pair |
|
369 *@param aTextResId |
|
370 *@return the button id pressed on dialog dismissal |
|
371 */ |
|
372 TInt ShowConfQueryNoteL(TInt aTextResId ); |
|
373 |
|
374 /** |
|
375 *Pops up information note with the default icon |
|
376 *@param aTextResId |
|
377 */ |
|
378 void ShowInformationNoteL( TInt aTextResId ); |
|
379 |
|
380 /** |
|
381 *Pops up error note with the default icon |
|
382 *@param aTextResId |
|
383 *@param aContext The context of the error, need for special cases. by default |
|
384 * ECtxAutomatic |
|
385 */ |
|
386 void ShowErrorNoteL( |
|
387 TInt aErrorStat, |
|
388 CTextResolver::TErrorContext aContext = CTextResolver::ECtxAutomatic ); |
|
389 |
|
390 |
|
391 /** |
|
392 *Utility function to decide whether an element is in an int array |
|
393 */ |
|
394 TBool InIntArray( TInt aUpperBound, const TInt* aArray, TInt aElement ); |
|
395 |
|
396 /** |
|
397 *Utility functions that are used to establish a connection with a snap Id |
|
398 */ |
|
399 TInt ConnectWithSnapId(TUint32 aRequestedSnapId); |
|
400 |
|
401 TInt ConnectSnapWithoutCheckL(TUint32 aRequestedSnapId); |
|
402 |
|
403 TInt ConnectSnapL (TConnSnapPref& aPref1); |
|
404 |
|
405 /** |
|
406 *Pops up global note (of specified note type) with the default icon |
|
407 *@param aNoteType, the note type |
|
408 *@param aTextResId |
|
409 */ |
|
410 void ShowGlobalNoteL( TAknGlobalNoteType aNoteType, TInt aTextResId ); |
|
411 |
|
412 public: // from MConnection |
|
413 |
|
414 /** |
|
415 *Sets the requested AP later it may not be the one to be used |
|
416 *@param aRequestedAPs the requested AP idpair |
|
417 */ |
|
418 IMPORT_C void SetRequestedAPs( TIdPair aRequestedAPs ); |
|
419 |
|
420 /** |
|
421 *Sets RequestedAP |
|
422 *@param aRequestedAP the requested AP id |
|
423 */ |
|
424 IMPORT_C void SetRequestedAP( TUint32 aRequestedAPId , TBool aDefault = EFalse ); |
|
425 |
|
426 IMPORT_C TAPValidity RequestedAPValidityL(); |
|
427 |
|
428 /** |
|
429 *A query function to find out whether there is a connection which |
|
430 *was matches with the "current" connection parameters |
|
431 *@return ETrue if the condition above is satisfied EFalse otherwise. |
|
432 */ |
|
433 IMPORT_C TBool Connected(); |
|
434 |
|
435 /** |
|
436 *Call this for obtaining the AP for the current connection |
|
437 *@return the AP for the latest connection |
|
438 * NULL if there isn't any |
|
439 */ |
|
440 IMPORT_C const CApAccessPointItem* CurrentAccessPoint() const; |
|
441 |
|
442 /** |
|
443 *Returns the currently (or the last used) AP id |
|
444 *@return the currently (or the last used) AP id |
|
445 */ |
|
446 IMPORT_C TUint32 CurrentAPId() const; |
|
447 |
|
448 /** |
|
449 *Call this the find out the session security mode for the current AP |
|
450 *@retun the security mode for the current AP |
|
451 */ |
|
452 IMPORT_C TBool CurrentSessionSecure() const; |
|
453 |
|
454 /** |
|
455 *Call this the find out the connection type for the current AP |
|
456 *@retun the conection type for the current AP |
|
457 */ |
|
458 IMPORT_C TBool CurrentSessionConnectionOriented() const; |
|
459 |
|
460 /** |
|
461 *Call this the get the gateway address to be used |
|
462 *@retun the address of the gateway associated with the current AP, space for zero terminator should also be allocated |
|
463 */ |
|
464 IMPORT_C HBufC* CurrentGatewayLC() const; |
|
465 |
|
466 |
|
467 /** |
|
468 *Call this the get the start page to be used |
|
469 *@return the address of the start page associated with the current AP, space for zero terminator should also be allocated |
|
470 */ |
|
471 IMPORT_C HBufC* CurrentStartPageLC() const; |
|
472 |
|
473 /** |
|
474 *Call this function to get the name of the current Wap AP, space for zero terminator should also allocated |
|
475 *return |
|
476 */ |
|
477 IMPORT_C HBufC* CurrentApNameLC() const; |
|
478 |
|
479 /** |
|
480 *Call this the get the current connection speed to be used |
|
481 *@return the the connection speed |
|
482 */ |
|
483 IMPORT_C TApCallSpeed CurrentConnectionSpeed() const; |
|
484 |
|
485 /** |
|
486 *Call this the get the current bearer to be used |
|
487 *@return the bearer type associated with the current AP |
|
488 */ |
|
489 IMPORT_C TApBearerType CurrentBearerTypeL() const; |
|
490 |
|
491 /** |
|
492 *It closes the connection and sets the manager to offline mode |
|
493 */ |
|
494 IMPORT_C void Disconnect(); |
|
495 |
|
496 /** |
|
497 *Sets an observer on the AP changes |
|
498 *@param aObserver reference to the the AP change observer |
|
499 */ |
|
500 IMPORT_C void SetApChangeObserver( MApChangeObserver& aObserver ); |
|
501 |
|
502 /** |
|
503 *Removes the AP change observer |
|
504 */ |
|
505 IMPORT_C void UnsetApChangeObserver(); |
|
506 |
|
507 /** |
|
508 *Starts the connection process |
|
509 *@param aDisableConnNeeded if set to ETrue the initial dialog indicating that there is no connection will not appear |
|
510 *@param aIgnoreSecureAttribute if set to ETrue the security of the AP will not be taken into account when making |
|
511 making decisions about which AP to use the requested or the active |
|
512 */ |
|
513 IMPORT_C TInt StartConnectionL( TBool aDisableConnNeeded = EFalse, TBool aIgnoreSecureAttribute = EFalse ); |
|
514 |
|
515 /** |
|
516 * Returns pointer to the currently used AP. |
|
517 * @return pointer to the currently used AP. Can be NULL. |
|
518 */ |
|
519 IMPORT_C CApAccessPointItem* CurrentAP(); |
|
520 |
|
521 /** |
|
522 *Updates the current AP according to the specified base AP, it is possible to update only the WAP part |
|
523 *of the AP, and thus create a mixed AP for the current connection (and the session about to be established) |
|
524 *@param aBaseAP the base AP according to which the current AP will be updated |
|
525 *@param aOnlyWAPPart if set to ETrue only the WAP part of the current AP will be updated. otherewise the whole AP |
|
526 */ |
|
527 void UpdateCurrentAPL( CApAccessPointItem& aBaseAP, TBool aOnlyWAPpart ); |
|
528 |
|
529 /** |
|
530 * Returns the requested id pair. |
|
531 * @return requested id pair |
|
532 */ |
|
533 TIdPair& RequestedIdPair(); |
|
534 |
|
535 /** |
|
536 * Returns TRUE if there is no second preference. |
|
537 * @return TRUE if there is no second preference |
|
538 */ |
|
539 TBool NoSecondPreference() const; |
|
540 |
|
541 /** |
|
542 * Set if there is second preference |
|
543 * @param aNoSecondPreference TRUE if no second preference |
|
544 */ |
|
545 void SetNoSecondPreference( TBool aNoSecondPreference ); |
|
546 |
|
547 /** |
|
548 * Return TRUE if silent mode set. |
|
549 * @return TRUE if silent mode set. |
|
550 */ |
|
551 TBool SilentMode() const; |
|
552 |
|
553 /** |
|
554 * Returns pointer to CApUtils object. |
|
555 * @return pointer to CApUtils object. Always valid. |
|
556 */ |
|
557 CApUtils* ApUtils(); |
|
558 |
|
559 MApChangeObserver* ApObserver(); |
|
560 |
|
561 /** |
|
562 *Returns the RConnection object used to create connection. |
|
563 *@return RConnection object |
|
564 */ |
|
565 IMPORT_C RConnection& Connection(); |
|
566 |
|
567 /** |
|
568 *Return name of the connection created. |
|
569 *Ownership of name is handed over. |
|
570 *@return name of the connection |
|
571 */ |
|
572 IMPORT_C TName* ConnectionNameL(); |
|
573 |
|
574 /** |
|
575 * Return socket server |
|
576 * @return socket server |
|
577 */ |
|
578 IMPORT_C RSocketServ& SocketServer(); |
|
579 /** |
|
580 *Functions that are used to store the connection type and the snap ID |
|
581 */ |
|
582 IMPORT_C void SetConnectionType( CMManager::TCmSettingSelectionMode aConnectionType ); |
|
583 |
|
584 IMPORT_C void SetRequestedSnap (TUint32 aRequestedSnapId); |
|
585 |
|
586 /** |
|
587 * Return ETrue if we are in a 3G network |
|
588 * @return ETrue if we are in a 3G network |
|
589 */ |
|
590 TBool Check3GNetworkL(); |
|
591 |
|
592 /** |
|
593 *Checks if there is an active (HS)CSD connection in the system |
|
594 *@return TRUE if there is |
|
595 */ |
|
596 EXPORT_C TBool IsThereActiveHSCSDConnectionL(); |
|
597 |
|
598 /** |
|
599 * Checks if there is an active voice call in the system |
|
600 * @return ETrue is there's active voice call |
|
601 */ |
|
602 TBool IsThereActiveVoiceCall(); |
|
603 |
|
604 void SetInternalError( TInt aInternalError ); |
|
605 |
|
606 public: // Functions from base classes |
|
607 |
|
608 virtual void OfflineModeChanged( TBool aEnabled ); |
|
609 |
|
610 TBool IsConnectionAllowedL( TBool aDisplayError ); |
|
611 |
|
612 protected: |
|
613 |
|
614 void StartConnectionObservingL(); |
|
615 void StopConnectionObserving(); |
|
616 void ConnectionStageAchievedL(TInt); |
|
617 |
|
618 CApAccessPointItem* APItemFromAPIdLC( TUint32 aAPId ); |
|
619 CApAccessPointItem* APItemFromIAPIdLC( TUint32 aIAPId ); |
|
620 CApDataHandler* ApDataHandler(); |
|
621 TBool CheckIfAlreadyConnected( TUint32& aNewIapId ); |
|
622 |
|
623 void CheckVPNL( TUint32 aNewIap, TConManChangeConn& aChangeConn ); |
|
624 void UpdateEasyWlanFlagL(); |
|
625 |
|
626 void DoShowConnectionChangedDlgL(); |
|
627 |
|
628 void InitializeL(); |
|
629 |
|
630 private: |
|
631 |
|
632 CApAccessPointItem* iCurrentAP; |
|
633 CApDataHandler* iApDataHandler; |
|
634 CApUtils* iApUtils; |
|
635 CVpnApItem* iVpnItem; |
|
636 CVpnApEngine* iVpnEngine; |
|
637 CCommsDatabase* iCommsDb; |
|
638 CAknGlobalNote* iNote; |
|
639 RFs iRFs; |
|
640 RSocketServ iServ; |
|
641 RConnection iConnection; |
|
642 TInt iResOffset; |
|
643 |
|
644 TBool iSilentMode; |
|
645 TBool iCommsDbOwned; |
|
646 TBool iNewConnectionEstablished; |
|
647 TBool iAlreadyInUse; |
|
648 TInt iInternalError; |
|
649 TInt iLastConnectionStage; |
|
650 CAknNoteDialog* iNoteDialog; |
|
651 CActiveConnectorSyncWrapper* iSyncConnector; |
|
652 |
|
653 MApChangeObserver* iApObserver; |
|
654 TUint32 iConnId; |
|
655 TIdPair iRequestedAPIds;//< It stores the requested WAP AP ids (two prefs) |
|
656 |
|
657 CMManager::TCmSettingSelectionMode iConnectionType; |
|
658 TUint32 iRequestedSnapId; |
|
659 |
|
660 TBool iNoSecondPreference; |
|
661 TBool iAlreadyConfirmed; // not used anymore |
|
662 CConnectionStageNotifierWCB* iStageNotifier; |
|
663 TBool iConnected; |
|
664 TBool iCalledFromProcessFinish; |
|
665 CAknWaitDialog* iWaitDialog; |
|
666 CRepository* iRepository; |
|
667 TBool iInitialized; |
|
668 TBool iEasyWlan; |
|
669 |
|
670 HBufC* iConnName; // Temp fix for CDMA |
|
671 |
|
672 RTelServer iTelServer; |
|
673 RMobilePhone iMobilePhone; |
|
674 TInt iSatges[KMaxStages]; |
|
675 }; |
|
676 |
|
677 #endif// End of File |