equal
deleted
inserted
replaced
21 #include <e32base.h> |
21 #include <e32base.h> |
22 |
22 |
23 #include "mpmserversession.h" |
23 #include "mpmserversession.h" |
24 #include "mpmcommsdataccess.h" |
24 #include "mpmcommsdataccess.h" |
25 |
25 |
26 class CMPMDialog; |
|
27 class CMPMWlanQueryDialog; |
|
28 class CMPMConfirmDlgStarting; |
26 class CMPMConfirmDlgStarting; |
29 class TMpmConnPref; |
27 class TMpmConnPref; |
30 |
28 |
31 /** |
29 /** |
32 * Handles IAP selection. MPM Server session |
30 * Handles IAP selection. MPM Server session |
64 public: // CMPMServerSession interface |
62 public: // CMPMServerSession interface |
65 /** |
63 /** |
66 * Two-phased constructor. |
64 * Two-phased constructor. |
67 */ |
65 */ |
68 static CMPMIapSelection* NewL( CMPMCommsDatAccess* aCommsDatAccess, |
66 static CMPMIapSelection* NewL( CMPMCommsDatAccess* aCommsDatAccess, |
69 CMPMServerSession* aSession ); |
67 CMPMServerSession* aSession, |
|
68 CConnectionUiUtilities* aConnUiUtils ); |
70 |
69 |
71 /** |
70 /** |
72 * Destructor. |
71 * Destructor. |
73 */ |
72 */ |
74 virtual ~CMPMIapSelection(); |
73 virtual ~CMPMIapSelection(); |
87 * |
86 * |
88 * @since S60 v3.2 |
87 * @since S60 v3.2 |
89 */ |
88 */ |
90 void ExplicitConnectionL(); |
89 void ExplicitConnectionL(); |
91 |
90 |
92 /** |
|
93 * Updates connection dialog contents if |
|
94 * the dilog is shown |
|
95 * |
|
96 * @since S60 v3.2 |
|
97 */ |
|
98 void UpdateConnectionDialogL(); |
|
99 |
|
100 public: |
91 public: |
101 /** |
92 /** |
102 * Starts Wlan query if Iap is wlan iap. |
93 * Returns true if given iap is a wlan iap. |
103 * |
94 * |
104 * @param aIapId Id of Iap |
95 * @param aIapId Id of Iap |
105 * @param aIsRoaming True if wlan query is for roaming |
96 * @return ETrue if iap aIap is wlan |
106 * @return ETrue if wlan query was started |
97 * @since symbian^4 |
107 * @since S60 v3.2 |
98 */ |
108 */ |
99 TBool IsIapWlanL( TUint32 aIapId ); |
109 TBool StartWlanQueryIfNeededL( |
|
110 TUint32 aIapId, |
|
111 TBool aIsRoaming = EFalse ); |
|
112 |
100 |
113 /** |
101 /** |
114 * Part of selecting best IAP at connection start. Called when WLAN scan |
102 * Part of selecting best IAP at connection start. Called when WLAN scan |
115 * is completed. Continues IAP selection according to the iChooseIapState. |
103 * is completed. Continues IAP selection according to the iChooseIapState. |
116 * |
104 * |
127 * @param aError Message status |
115 * @param aError Message status |
128 * @param aPolicyPref Policy preference to be returned, NULL if no |
116 * @param aPolicyPref Policy preference to be returned, NULL if no |
129 * preference should be passed |
117 * preference should be passed |
130 */ |
118 */ |
131 void ChooseIapComplete( TInt aError, const TMpmConnPref* aPolicyPref ); |
119 void ChooseIapComplete( TInt aError, const TMpmConnPref* aPolicyPref ); |
132 |
|
133 /** |
|
134 * Callback function used after Wlan network has been selected. |
|
135 * Uses HandleUserIapSelectionL to complete IAP selection. |
|
136 * |
|
137 * @since 3.2 |
|
138 * @param aError Error code from selection |
|
139 * @param aIapId Element id of IAP record if different than reported before. |
|
140 * May be 0, when error occurred in selection or when no new Iap id is set. |
|
141 * |
|
142 */ |
|
143 void UserWlanSelectionDoneL( TInt aError, TUint32 aIapId ); |
|
144 |
120 |
145 /** |
121 /** |
146 * Stops displaying the starting dialog. |
122 * Stops displaying the starting dialog. |
147 * |
123 * |
148 * @since 3.2 |
124 * @since 3.2 |
266 /** |
242 /** |
267 * Handles implicit connection wlan note displaying |
243 * Handles implicit connection wlan note displaying |
268 * @since 3.2 |
244 * @since 3.2 |
269 */ |
245 */ |
270 void ImplicitConnectionWlanNoteL(); |
246 void ImplicitConnectionWlanNoteL(); |
271 |
247 |
272 /** |
248 /** |
273 * Gets current cellular data usage setting |
249 * Gets current cellular data usage setting |
274 * @since 5.2 |
250 * @since 5.2 |
275 */ |
251 */ |
276 TInt CurrentCellularDataUsage() const; |
252 TInt CurrentCellularDataUsage() const; |
279 |
255 |
280 /** |
256 /** |
281 * C++ default constructor. |
257 * C++ default constructor. |
282 */ |
258 */ |
283 CMPMIapSelection( CMPMCommsDatAccess* aCommsDatAccess, |
259 CMPMIapSelection( CMPMCommsDatAccess* aCommsDatAccess, |
284 CMPMServerSession* aSession ); |
260 CMPMServerSession* aSession, |
|
261 CConnectionUiUtilities* aConnUiUtils ); |
285 |
262 |
286 /** |
263 /** |
287 * ConstructL |
264 * ConstructL |
288 */ |
265 */ |
289 void ConstructL(); |
266 void ConstructL(); |
300 TChooseIapState iChooseIapState; |
277 TChooseIapState iChooseIapState; |
301 |
278 |
302 // Used for commsdat related functionalities |
279 // Used for commsdat related functionalities |
303 CMPMCommsDatAccess* iCommsDatAccess; |
280 CMPMCommsDatAccess* iCommsDatAccess; |
304 |
281 |
|
282 // Handle to connection UI utilities |
|
283 CConnectionUiUtilities* iConnUiUtils; |
|
284 |
305 // Contains state info whether PrefIapnotifs can be sent |
285 // Contains state info whether PrefIapnotifs can be sent |
306 // and saved IAP info structure. |
286 // and saved IAP info structure. |
307 TStoredIapInfo iStoredIapInfo; |
287 TStoredIapInfo iStoredIapInfo; |
308 |
288 |
309 // Stored available Iaps |
289 // Stored available Iaps |
312 // pointer to Session |
292 // pointer to Session |
313 CMPMServerSession* iSession; |
293 CMPMServerSession* iSession; |
314 |
294 |
315 // Pointer to Confirmation dialog. |
295 // Pointer to Confirmation dialog. |
316 CMPMConfirmDlgStarting* iConfirmDlgStarting; |
296 CMPMConfirmDlgStarting* iConfirmDlgStarting; |
317 |
|
318 // Pointer to the dialog active object. |
|
319 CMPMDialog* iDialog; |
|
320 |
|
321 // Pointer to Wlan query dialog. |
|
322 CMPMWlanQueryDialog* iWlanDialog; |
|
323 |
297 |
324 // Stores the boolean value whether next best iaps |
298 // Stores the boolean value whether next best iaps |
325 // exists in explicit connection start. |
299 // exists in explicit connection start. |
326 TBool iNextBestExists; |
300 TBool iNextBestExists; |
327 |
301 |