66 : CActive( EPriorityStandard ), |
66 : CActive( EPriorityStandard ), |
67 iObserver( aObserver ), |
67 iObserver( aObserver ), |
68 iConversionBufferPtr( NULL, 0 ), |
68 iConversionBufferPtr( NULL, 0 ), |
69 iSettingsBufferPtr( NULL, 0), |
69 iSettingsBufferPtr( NULL, 0), |
70 iCurrentSlpId( -1 ), |
70 iCurrentSlpId( -1 ), |
71 iEditorObserver( NULL ) |
71 iEditorObserver( NULL ), |
|
72 iTempAP(-1) |
72 { |
73 { |
73 // No implementation |
74 // No implementation |
74 } |
75 } |
75 |
76 |
76 // --------------------------------------------------------------------------- |
77 // --------------------------------------------------------------------------- |
233 |
234 |
234 // Zeroing the Temporary buffers so that it doesn't contain any |
235 // Zeroing the Temporary buffers so that it doesn't contain any |
235 // left over value from the previous access |
236 // left over value from the previous access |
236 iSettingsBufferPtr.Zero(); |
237 iSettingsBufferPtr.Zero(); |
237 |
238 |
238 // Obtain the Server address value from the SUPL settings |
|
239 // API. If the value is set then it has to be shown to the user |
|
240 // as the existing value when he tries to configure the UI |
|
241 TRAP_IGNORE( iSUPLSettingsAdapter->GetIapNameL( iCurrentSlpId, iSettingsBufferPtr ) ); |
|
242 |
|
243 // Obtain the UID for the selected Access point so that the configurator |
239 // Obtain the UID for the selected Access point so that the configurator |
244 // can be highlighted |
240 // can be highlighted |
245 TUint32 highlightUid( 0 ); |
241 TUint32 highlightUid( 0 ); |
246 |
242 |
247 TRAPD( error, highlightUid = ConvertIAPNameToIdL( iSettingsBufferPtr ) ); |
243 // if AP value is NULL, or zero, no temp AP, all previous changes have been frozen. |
248 |
244 TInt32 tempAP = GetTempAPValue(); |
249 if( error == KErrNotFound ) |
245 if ( tempAP == -1) |
250 { |
246 { |
251 highlightUid = 0; |
247 // Obtain the Server address value from the SUPL settings |
252 } |
248 // API. If the value is set then it has to be shown to the user |
253 |
249 // as the existing value when he tries to configure the UI |
|
250 TRAP_IGNORE( iSUPLSettingsAdapter->GetIapNameL( iCurrentSlpId, iSettingsBufferPtr ) ); |
|
251 |
|
252 TRAPD( error, highlightUid = ConvertIAPNameToIdL( iSettingsBufferPtr ) ); |
|
253 |
|
254 if( error == KErrNotFound ) |
|
255 { |
|
256 highlightUid = 0; |
|
257 } |
|
258 } |
|
259 else |
|
260 { |
|
261 highlightUid = tempAP; |
|
262 } |
|
263 |
254 CCmApplicationSettingsUi* apHandler = CCmApplicationSettingsUi::NewLC(); |
264 CCmApplicationSettingsUi* apHandler = CCmApplicationSettingsUi::NewLC(); |
255 |
265 |
256 iDialogActive = ETrue; |
266 iDialogActive = ETrue; |
257 TBool ret = EFalse; |
267 TBool ret = EFalse; |
258 TCmSettingSelection selectionUid; |
268 TCmSettingSelection selectionUid; |
265 filter.AppendL( KUidCSDBearerType ); |
275 filter.AppendL( KUidCSDBearerType ); |
266 filter.AppendL( KUidPacketDataBearerType ); |
276 filter.AppendL( KUidPacketDataBearerType ); |
267 |
277 |
268 // Run CCmApplicationSettingsUi dialog only for Access points (Connection methods) |
278 // Run CCmApplicationSettingsUi dialog only for Access points (Connection methods) |
269 // selectionUid contains UID to be highlighted, on return it will contain UID of selected CM |
279 // selectionUid contains UID to be highlighted, on return it will contain UID of selected CM |
270 TRAP( error, ret = |
280 TRAPD( error, ret = |
271 apHandler->RunApplicationSettingsL( |
281 apHandler->RunApplicationSettingsL( |
272 selectionUid , CMManager::EShowConnectionMethods, filter |
282 selectionUid , CMManager::EShowConnectionMethods, filter |
273 ) ); // | CMManager::EShowAlwaysAsk |
283 ) ); // | CMManager::EShowAlwaysAsk |
274 |
284 |
275 iDialogActive = EFalse; |
285 iDialogActive = EFalse; |
281 } |
291 } |
282 CleanupStack::PopAndDestroy( &filter ); |
292 CleanupStack::PopAndDestroy( &filter ); |
283 CleanupStack::PopAndDestroy( apHandler ); |
293 CleanupStack::PopAndDestroy( apHandler ); |
284 |
294 |
285 if( ret ) |
295 if( ret ) |
286 { |
296 { |
|
297 SetTempAPValue(selectionUid.iId); |
287 RCmManager cmManager; |
298 RCmManager cmManager; |
288 cmManager.OpenLC(); |
299 cmManager.OpenLC(); |
289 |
300 |
290 RArray< TUint32 > cmArray; |
301 RArray< TUint32 > cmArray; |
291 HBufC* cmName = NULL; |
302 HBufC* cmName = NULL; |
984 // |
995 // |
985 void CLocSUPLSettingsUiEngine::RemoveSessionObserver( ) const |
996 void CLocSUPLSettingsUiEngine::RemoveSessionObserver( ) const |
986 { |
997 { |
987 iSUPLSettingsAdapter->RemoveSessionObserver( ); |
998 iSUPLSettingsAdapter->RemoveSessionObserver( ); |
988 } |
999 } |
989 |
1000 |
|
1001 // --------------------------------------------------------------------------- |
|
1002 // void CLocSUPLSettingsUiEngine::GetTempAPValue |
|
1003 // --------------------------------------------------------------------------- |
|
1004 // |
|
1005 TUint32 CLocSUPLSettingsUiEngine::GetTempAPValue() |
|
1006 { |
|
1007 return iTempAP; |
|
1008 } |
|
1009 |
|
1010 // --------------------------------------------------------------------------- |
|
1011 // void CLocSUPLSettingsUiEngine::SetTempAPValue |
|
1012 // --------------------------------------------------------------------------- |
|
1013 // |
|
1014 void CLocSUPLSettingsUiEngine::SetTempAPValue( TUint32 aAccessPoint) |
|
1015 { |
|
1016 iTempAP = aAccessPoint; |
|
1017 } |
|
1018 |
990 // End of File |
1019 // End of File |