# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1268401462 -7200 # Node ID f3bd2a0973b950f8fee9d3e30d570a3992881f00 # Parent 42de37ce7ce4dc7077e8df8094073122540127fc Revision: 201007 Kit: 201008 diff -r 42de37ce7ce4 -r f3bd2a0973b9 landmarks/locationlandmarks/internalservices/src/EPos_CPosLmLocalDbAccess.cpp --- a/landmarks/locationlandmarks/internalservices/src/EPos_CPosLmLocalDbAccess.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/landmarks/locationlandmarks/internalservices/src/EPos_CPosLmLocalDbAccess.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -130,13 +130,7 @@ { err = VerifyDatabaseNeedInitializationL(); } - else if (err != KErrNotFound && err != KErrPathNotFound && - err != KErrArgument && err != KErrAlreadyExists && - err != KErrCorrupt && err != KErrNotSupported) - { // KErrAlreadyExists if the path includes nonexisting directory. - User::Leave(err); - } - + return err; } diff -r 42de37ce7ce4 -r f3bd2a0973b9 landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp --- a/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -716,17 +716,28 @@ TInt err = iDbAccess->OpenDatabaseL(*iDbUri); if (err != KErrNone) { - // Re-create database if below error codes - if (err == KErrCorrupt || err == KErrNotSupported) + // As this is a default landmarks db, all errors other than OutOfMemory + // should be handled by replacing a corrupt db or creating a new db if one is missing. + if (err == KErrNoMemory) { - iSubSession->CreateDefaultDbL(*iDbUri, ETrue); + User::Leave(err); } else { - iSubSession->CreateDefaultDbL(*iDbUri, EFalse); + if ((err == KErrNotFound) || (err == KErrPathNotFound) + || (err == KErrArgument) || (err == KErrAlreadyExists)) + { + // Create a new database [default landmarks db] + iSubSession->CreateDefaultDbL(*iDbUri, EFalse); + } + else + { + // Try deleting the corrupted database and then create a new one + iSubSession->CreateDefaultDbL(*iDbUri, ETrue); + } + *DatabaseAccess()->InitFlagPtr() = ECreated; + User::LeaveIfError(iDbAccess->OpenDatabaseL(*iDbUri)); } - *DatabaseAccess()->InitFlagPtr() = ECreated; - User::LeaveIfError(iDbAccess->OpenDatabaseL(*iDbUri)); } } CleanupStack::PopAndDestroy(); // DbLock diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locnotprefplugin/data/locnotprefpluginview.rss --- a/locationsystemui/locationsysui/locnotprefplugin/data/locnotprefpluginview.rss Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locnotprefplugin/data/locnotprefpluginview.rss Fri Mar 12 15:44:22 2010 +0200 @@ -269,7 +269,7 @@ RESOURCE AVKON_SETTING_PAGE r_loc_coorddisplay_settings { label = qtn_loc_notation_coordinate_format; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; + softkey_resource = R_AVKON_SOFTKEYS_CANCEL; type = EAknSetListBox; editor_resource_id = r_loc_not_settings_listbox; } diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locsuplsettingsui/data/locsuplservereditor.rss --- a/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplservereditor.rss Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplservereditor.rss Fri Mar 12 15:44:22 2010 +0200 @@ -202,21 +202,29 @@ max_view_height_in_lines = 8; }; }, - DLG_LINE + DLG_LINE { - type = EAknCtPopupFieldText; - prompt = qtn_loc_server_usage; - id = ELocSuplServerIdUsageInHomeNw; - itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys | EEikDlgItemAsLabel; - control = POPUP_FIELD_TEXT - { - popupfield = POPUP_FIELD - { - width = 50; - }; - textarray = r_suplserver_editor_usageinhomenw_array; - active = 0; - }; + type = EEikCtEdwin; + prompt = qtn_loc_server_usage; + id = ELocSuplServerIdUsageInHomeNw; + itemflags = EEikDlgItemTakesEnterKey; + control = EDWIN + { + flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable | + EEikEdwinNoAutoSelection | EEikEdwinReadOnly| + EEikEdwinAvkonDisableCursor|EEikEdwinAvkonNotEditable |EEikEdwinDisplayOnly; + // maxlength = ECalenAbsoluteMaxTextEditorLength; + default_case = EAknEditorTextCase; + allowed_case_modes = EAknEditorAllCaseModes; + numeric_keymap = EAknEditorStandardNumberModeKeymap; + special_character_table = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG; + avkon_flags = EAknEditorFlagUseSCTNumericCharmap | + EAknEditorFlagDefault | + EAknEditorFlagEnablePictographInput; + // let Avkon decide which is maximum number of lines + // It's based on layout. + max_view_height_in_lines = 0; + }; } }; } @@ -359,4 +367,26 @@ buf = qtn_loc_server_rename_info_note; } +// --------------------------------------------------------- +// +// r_loc_server_usageinhomenetwork_yes +// Define "Yes" to "Usage in home network:" line of Editor Form +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_loc_server_usageinhomenetwork_yes + { + buf = qtn_loc_server_usage_yes; + } +// --------------------------------------------------------- +// +// r_loc_server_usageinhomenetwork_no +// Define "No" to "Usage in home network:" line of Editor Form +// +// --------------------------------------------------------- +// +RESOURCE TBUF r_loc_server_usageinhomenetwork_no + { + buf = qtn_loc_server_usage_no; + } // End of File diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locsuplsettingsui/data/locsuplsettingsui.rss --- a/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplsettingsui.rss Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplsettingsui.rss Fri Mar 12 15:44:22 2010 +0200 @@ -288,7 +288,7 @@ RESOURCE AVKON_SETTING_PAGE r_loc_suplusage_settings { label = qtn_loc_supl_lbl_server_use; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK; + softkey_resource = R_AVKON_SOFTKEYS_CANCEL; type = EAknSetListBox; editor_resource_id = r_loc_suplusage_settings_listbox; } diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplservereditor.h --- a/locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplservereditor.h Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplservereditor.h Fri Mar 12 15:44:22 2010 +0200 @@ -23,6 +23,9 @@ #include #include +const TInt KMaxUsageTextSize = 5; +_LIT(KNoUsageInHomeNetork, "No"); + class CAknTitlePane; class CLocSUPLSettingsUiEngine; @@ -85,7 +88,12 @@ * @param aCommandId id of the command to respond to */ void ProcessCommandL(TInt aCommandId); - + + /** + * + * + */ + void HandleDialogPageEventL( TInt aEventID ); /* * Executes the Dialog */ @@ -104,7 +112,6 @@ /** * Inherited from CCoeControl */ - void HandlePointerEventL(const TPointerEvent &aPointerEvent); TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); @@ -192,6 +199,11 @@ * it toggles value of popup field */ void TogglePopupFieldControlL( TInt aControlId ); + + /* + * toggles the txt + */ + void SetUsageinHomeNetwork( TBool aOnOff ); /* * it changes the MSK caption diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplsettingsuiengine.h --- a/locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplsettingsuiengine.h Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplsettingsuiengine.h Fri Mar 12 15:44:22 2010 +0200 @@ -311,6 +311,11 @@ */ void RemoveSessionObserver( ) const; + /** + * Sets value of highlighted AP + */ + void SetTempAPValue( TUint32 aAccessPoint); + public: /** * Inherited from MLocSUPLSettingsAdapterObserver @@ -362,6 +367,11 @@ */ TInt ShowNoteL(); + /** + * Returns value of last highlighted AP + */ + TUint32 GetTempAPValue(); + private: /** * Reference to the Engine Observer @@ -451,6 +461,13 @@ */ MSuplServerEditorObserver* iEditorObserver; + /* + * Current highlighted AP + * Set to -1 if no changes made in edit dialog box, Set to Uid of access + * point if changes made + */ + TUint32 iTempAP; + }; #endif // C_LOCSUPLSETTINGSUIENGINE_H_ diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locsuplsettingsui/src/locsuplservereditor.cpp --- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplservereditor.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplservereditor.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -270,154 +270,108 @@ DEBUG1( + CLocSUPLServerEditor::ProcessCommandL aCommandId=%d, aCommandId ); CAknForm::ProcessCommandL( aCommandId ); - switch ( aCommandId ) - { - case EAknFormCmdEdit: - { - iIsEditMode = ETrue; - SetCursorToEndL(); - HandleMSKCaptionL(); - break; - } - case ELocServerEditorDelete: - case ELocServerEditorRemove: - { - if( DeleteConfirmationQueryL() ) - { - TRAP_IGNORE( iEngine.RemoveServerL( iSlpId ) ); - // Return back to server view - TryExitL( EAknSoftkeyBack ); - } - break; - } - case ELocServerEditorDisable: - { - TRAP_IGNORE( iEngine.SetServerEnabledFlagL( iSlpId, EFalse ) ); - break; - } - case ELocServerEditorEnable: - { - TRAP_IGNORE( iEngine.SetServerEnabledFlagL( iSlpId, ETrue ) ); - break; - } - case ELocServerEditorDefine: - { - TRAP_IGNORE( iEngine.LaunchApConfiguratorL( iSlpId, this ) ); - break; - } - case ELocServerEditorChange: - case ELocServerEditorMSKChange: - { - if ( IdOfFocusControl() == ELocSuplServerIdAccessPoint ) - { - TRAP_IGNORE( iEngine.LaunchApConfiguratorL( iSlpId, this ) ); - } - else - { - if( iIsNewServer ) - { - TogglePopupFieldControlL( IdOfFocusControl() ); - } - else - { - TBool editableFlag; - TRAP_IGNORE( iEngine.GetEditableFlagL( iSlpId, editableFlag ) ); - if ( editableFlag ) - TogglePopupFieldControlL( IdOfFocusControl() ); - } - } - break; - } - case EAknCmdHelp: - { - HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(), - iAvkonAppUi->AppHelpContextL() ); - break; - } - case EEikCmdExit: - { - // The Exit is handled by the Application UI - TryExitL( EEikCmdExit ); - break; - } - default: - break; - } - DEBUG( - CLocSUPLServerEditor::ProcessCommandL ); - } - + switch (aCommandId) + { + case EAknFormCmdEdit: + { + iIsEditMode = ETrue; + SetCursorToEndL(); + HandleMSKCaptionL(); + break; + } + case ELocServerEditorDelete: + case ELocServerEditorRemove: + { + if (DeleteConfirmationQueryL()) + { + TRAP_IGNORE( iEngine.RemoveServerL( iSlpId ) ); + // Return back to server view + TryExitL(EAknSoftkeyBack); + } + break; + } + case ELocServerEditorDisable: + { + TRAP_IGNORE( iEngine.SetServerEnabledFlagL( iSlpId, EFalse ) ); + break; + } + case ELocServerEditorEnable: + { + TRAP_IGNORE( iEngine.SetServerEnabledFlagL( iSlpId, ETrue ) ); + break; + } + case ELocServerEditorDefine: + { + TRAP_IGNORE( iEngine.LaunchApConfiguratorL( iSlpId, this ) ); + break; + } + case ELocServerEditorChange: + case ELocServerEditorMSKChange: + { + CEikEdwin* usageInHomeNWPopupFieldText = (CEikEdwin*) Control( + ELocSuplServerIdUsageInHomeNw); + if (IdOfFocusControl() == ELocSuplServerIdAccessPoint) + { + TRAP_IGNORE( iEngine.LaunchApConfiguratorL( iSlpId, this ) ); + } + else + { + if (iIsNewServer) + { + TBuf des; + usageInHomeNWPopupFieldText->GetText(des); + if (!des.Compare(KNoUsageInHomeNetork)) + { + SetUsageinHomeNetwork(ETrue); + } + else + { + SetUsageinHomeNetwork(EFalse); + } + } + else + { + TBool editableFlag; + TRAP_IGNORE( iEngine.GetEditableFlagL( iSlpId, editableFlag ) ); + if (editableFlag) + { + TBuf des; + usageInHomeNWPopupFieldText->GetText(des); + if (!des.Compare(KNoUsageInHomeNetork)) + { + SetUsageinHomeNetwork(ETrue); + } + else + { + SetUsageinHomeNetwork(EFalse); + } + } + } + } + break; + } + case EAknCmdHelp: + { + HlpLauncher::LaunchHelpApplicationL(iCoeEnv->WsSession(), + iAvkonAppUi->AppHelpContextL()); + break; + } + case EEikCmdExit: + { + // The Exit is handled by the Application UI + TryExitL(EEikCmdExit); + break; + } + default: + break; + }DEBUG( - CLocSUPLServerEditor::ProcessCommandL ); + } + // --------------------------------------------------------------------------- // Derived from CEikDialog // --------------------------------------------------------------------------- // ----------------------------------------------------------------------------- -// CLocSUPLServerEditor::HandlePointerEventL -// ----------------------------------------------------------------------------- -// -void CLocSUPLServerEditor::HandlePointerEventL(const TPointerEvent &aPointerEvent) - { - DEBUG( +CLocSUPLServerEditor::HandlePointerEventL ); - CEikEdwin* serverAddress = static_cast (ControlOrNull( - ELocSuplServerIdServerAddr)); - CEikEdwin* iapEditor = static_cast (ControlOrNull( - ELocSuplServerIdAccessPoint)); - CAknPopupFieldText* usageInHomeNWPopupFieldText = - (CAknPopupFieldText*) Control(ELocSuplServerIdUsageInHomeNw); - - if (!IsEditable()) - { - CAknForm::HandlePointerEventL(aPointerEvent); - - if(aPointerEvent.iType == TPointerEvent::EButton1Up) - { - // Opens the editor on Single Click on any of the controls. Click on rest of the click does not repond - if (iapEditor->Rect().Contains(aPointerEvent.iPosition) - || usageInHomeNWPopupFieldText->Rect().Contains( - aPointerEvent.iPosition) - || serverAddress->Rect().Contains(aPointerEvent.iPosition)) - { - ProcessCommandL(EAknFormCmdEdit); - } - } - } - else if (IsEditable()) - { - if (usageInHomeNWPopupFieldText ) - { - if (usageInHomeNWPopupFieldText->Rect().Contains( - aPointerEvent.iPosition) ) - { - if( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - TogglePopupFieldControlL(IdOfFocusControl()); - if (iIsNewServer) - { - iIsModified = ETrue; - } - } - return; - } - } - - CAknForm::HandlePointerEventL(aPointerEvent); - - //check if click is on IAP Editor control - if (iapEditor) - { - if (iapEditor->Rect().Contains(aPointerEvent.iPosition) && - aPointerEvent.iType == TPointerEvent::EButton1Up ) - { - //Launch IAP Dialog - TRAP_IGNORE( iEngine.LaunchApConfiguratorL( iSlpId, this ) ); - return; - } - } - } - DEBUG( - CLocSUPLServerEditor::HandlePointerEventL ); - } - - -// ----------------------------------------------------------------------------- // CLocSUPLServerEditor::OfferKeyEventL // Receives and handles key events // ----------------------------------------------------------------------------- @@ -678,22 +632,24 @@ iIap->Des().Copy( KNullDesC ); } delete apString; - } - - //Retrieve Usage In Home Nw Field value - CAknPopupFieldText* usageInHomeNWPopupFieldText = - ( CAknPopupFieldText* ) Control( ELocSuplServerIdUsageInHomeNw ); - if( usageInHomeNWPopupFieldText ) - { - if( usageInHomeNWPopupFieldText->CurrentValueIndex() == 0 ) - { - iUsageInHomeNw = ETrue; - } - else - { - iUsageInHomeNw = EFalse; - } - } + } + + //Retrieve Usage In Home Nw Field value + CEikEdwin* usageInHomeNWPopupFieldText = (CEikEdwin*) Control( + ELocSuplServerIdUsageInHomeNw); + if (usageInHomeNWPopupFieldText) + { + TBuf des; + usageInHomeNWPopupFieldText->GetText(des); + if (!des.Compare(KNoUsageInHomeNetork)) + { + iUsageInHomeNw = ETrue; + } + else + { + iUsageInHomeNw = EFalse; + } + } if( iServerAddress->Length() > 0 ) { @@ -859,9 +815,20 @@ HBufC* apString = StringLoader::LoadL( R_LOC_SERVER_NONE ); apSelector->SetTextL( apString ); delete apString; - } - apSelector->DrawNow(); - + } + apSelector->DrawNow(); + + CEikEdwin* usageInHNWPopupFieldText = (CEikEdwin*) Control( + ELocSuplServerIdUsageInHomeNw); + if (usageInHNWPopupFieldText) + { + HBufC* usageString = StringLoader::LoadL( + R_LOC_SERVER_USAGEINHOMENETWORK_YES); + usageInHNWPopupFieldText->SetTextL(usageString); + delete usageString; + } + usageInHNWPopupFieldText->DrawNow(); + // update the title pane caption HBufC* serverTitle = StringLoader::LoadL( R_LOC_SERVER_EDITOR_TITLE ); if( serverTitle ) @@ -925,16 +892,16 @@ iIap->Des().Copy( iapName->Des() ); } - CAknPopupFieldText* usageInHNWPopupFieldText = - ( CAknPopupFieldText* ) Control( ELocSuplServerIdUsageInHomeNw ); - if( usageInHNWPopupFieldText ) - { - if( usageInHomeNwFlag ) - usageInHNWPopupFieldText->SetCurrentValueIndex( 0 ); + CEikEdwin* usageInHNWPopupFieldText = (CEikEdwin*) Control( + ELocSuplServerIdUsageInHomeNw); + if (usageInHNWPopupFieldText) + { + if (usageInHomeNwFlag) + SetUsageinHomeNetwork(EFalse); else - usageInHNWPopupFieldText->SetCurrentValueIndex( 1 ); - - UpdatePageL( ETrue ); + SetUsageinHomeNetwork(ETrue); + + UpdatePageL(ETrue); iUsageInHomeNw = usageInHomeNwFlag; } @@ -971,6 +938,7 @@ // --------------------------------------------------------------------------- // CLocSUPLServerEditor::TogglePopupFieldControlL() // it toggles value of popupfield control +// This method is no longer in use since TB 9.2 // --------------------------------------------------------------------------- // void CLocSUPLServerEditor::TogglePopupFieldControlL( TInt aControlId ) @@ -1152,5 +1120,88 @@ } } } +// ---------------------------------------------------------------------------------- +// CLocSUPLServerEditor::HandleDialogPageEventL +// ---------------------------------------------------------------------------------- +// +void CLocSUPLServerEditor::HandleDialogPageEventL(TInt aEventID) + { + DEBUG( +CLocSUPLServerEditor::HandleDialogPageEventL ); + + CAknForm::HandleDialogPageEventL(aEventID); + CEikEdwin* iapEditor = static_cast (ControlOrNull( + ELocSuplServerIdAccessPoint)); + CEikEdwin* usageInHomeNWPopupFieldText = (CEikEdwin*) Control( + ELocSuplServerIdUsageInHomeNw); + TInt focusControl(IdOfFocusControl()); + + if (!IsEditable()) + { + if (focusControl == ELocSuplServerIdUsageInHomeNw + || ELocSuplServerIdServerAddr || ELocSuplServerIdAccessPoint) + { + ProcessCommandL(EAknFormCmdEdit); + } + } + else if (aEventID == MEikDialogPageObserver::EDialogPageTapped) + { + if (focusControl == ELocSuplServerIdUsageInHomeNw) + { + if (usageInHomeNWPopupFieldText) + { + TBuf des; + usageInHomeNWPopupFieldText->GetText(des); + if (!des.Compare(KNoUsageInHomeNetork)) + { + SetUsageinHomeNetwork(ETrue); + } + else + { + SetUsageinHomeNetwork(EFalse); + } + if (iIsNewServer) + { + iIsModified = ETrue; + } + } + return; + } + if (focusControl == ELocSuplServerIdAccessPoint) + { + if (iapEditor) + { + //Launch IAP Dialog + TRAP_IGNORE( iEngine.LaunchApConfiguratorL( iSlpId, this ) ); + } + } + }DEBUG( -CLocSUPLServerEditor::HandleDialogPageEventL ); + } + +// ----------------------------------------------------------------------------- +// CLocSUPLServerEditor::SetUsageinHomeNetwork +// Set usage in network field on or off +// ----------------------------------------------------------------------------- +// +void CLocSUPLServerEditor::SetUsageinHomeNetwork(TBool aOnOff) + { + HBufC* string; + CEikEdwin* usageInHomeNWPopupFieldText = (CEikEdwin*) Control( + ELocSuplServerIdUsageInHomeNw); + if (aOnOff) + { + // load string 'ON' + string = StringLoader::LoadLC(R_LOC_SERVER_USAGEINHOMENETWORK_YES, + iCoeEnv); + } + else + { + // load string 'OFF' + string = StringLoader::LoadLC(R_LOC_SERVER_USAGEINHOMENETWORK_NO, + iCoeEnv); + } + // set Usage in Network field string as 'ON'/'OFF' + usageInHomeNWPopupFieldText->SetTextL(string); + CleanupStack::PopAndDestroy(string); + } // End of file diff -r 42de37ce7ce4 -r f3bd2a0973b9 locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsettingsuiengine.cpp --- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsettingsuiengine.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsettingsuiengine.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -68,7 +68,8 @@ iConversionBufferPtr( NULL, 0 ), iSettingsBufferPtr( NULL, 0), iCurrentSlpId( -1 ), - iEditorObserver( NULL ) + iEditorObserver( NULL ), + iTempAP(-1) { // No implementation } @@ -235,22 +236,31 @@ // left over value from the previous access iSettingsBufferPtr.Zero(); - // Obtain the Server address value from the SUPL settings - // API. If the value is set then it has to be shown to the user - // as the existing value when he tries to configure the UI - TRAP_IGNORE( iSUPLSettingsAdapter->GetIapNameL( iCurrentSlpId, iSettingsBufferPtr ) ); - // Obtain the UID for the selected Access point so that the configurator // can be highlighted TUint32 highlightUid( 0 ); - - TRAPD( error, highlightUid = ConvertIAPNameToIdL( iSettingsBufferPtr ) ); - if( error == KErrNotFound ) - { - highlightUid = 0; - } - + // if AP value is NULL, or zero, no temp AP, all previous changes have been frozen. + TInt32 tempAP = GetTempAPValue(); + if ( tempAP == -1) + { + // Obtain the Server address value from the SUPL settings + // API. If the value is set then it has to be shown to the user + // as the existing value when he tries to configure the UI + TRAP_IGNORE( iSUPLSettingsAdapter->GetIapNameL( iCurrentSlpId, iSettingsBufferPtr ) ); + + TRAPD( error, highlightUid = ConvertIAPNameToIdL( iSettingsBufferPtr ) ); + + if( error == KErrNotFound ) + { + highlightUid = 0; + } + } + else + { + highlightUid = tempAP; + } + CCmApplicationSettingsUi* apHandler = CCmApplicationSettingsUi::NewLC(); iDialogActive = ETrue; @@ -267,7 +277,7 @@ // Run CCmApplicationSettingsUi dialog only for Access points (Connection methods) // selectionUid contains UID to be highlighted, on return it will contain UID of selected CM - TRAP( error, ret = + TRAPD( error, ret = apHandler->RunApplicationSettingsL( selectionUid , CMManager::EShowConnectionMethods, filter ) ); // | CMManager::EShowAlwaysAsk @@ -283,7 +293,8 @@ CleanupStack::PopAndDestroy( apHandler ); if( ret ) - { + { + SetTempAPValue(selectionUid.iId); RCmManager cmManager; cmManager.OpenLC(); @@ -986,5 +997,23 @@ { iSUPLSettingsAdapter->RemoveSessionObserver( ); } - + +// --------------------------------------------------------------------------- +// void CLocSUPLSettingsUiEngine::GetTempAPValue +// --------------------------------------------------------------------------- +// +TUint32 CLocSUPLSettingsUiEngine::GetTempAPValue() + { + return iTempAP; + } + +// --------------------------------------------------------------------------- +// void CLocSUPLSettingsUiEngine::SetTempAPValue +// --------------------------------------------------------------------------- +// +void CLocSUPLSettingsUiEngine::SetTempAPValue( TUint32 aAccessPoint) + { + iTempAP = aAccessPoint; + } + // End of File diff -r 42de37ce7ce4 -r f3bd2a0973b9 locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt --- a/locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt Fri Feb 19 23:14:27 2010 +0200 +++ b/locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt Fri Mar 12 15:44:22 2010 +0200 @@ -2,9 +2,9 @@ # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available -# under the terms of the License "Symbian Foundation License v1.0" +# under the terms of the License "Eclipse Public License v1.0" # which accompanies this distribution, and is available -# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +# at the URL "http://www.eclipse.org/legal/epl-v10.html". # # Initial Contributors: # Nokia Corporation - initial contribution. diff -r 42de37ce7ce4 -r f3bd2a0973b9 supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -3286,8 +3286,9 @@ iSuplMsgType = ESUPL_END; SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating); //SMP Changes - iSuplSessionState = ESUPL_GENERATE; + iSuplState->GenerateMessageL(); + iSuplSessionState = ESUPL_GENERATE;//Has to be here because initialisation has to be done for NI case in reject scenario. } diff -r 42de37ce7ce4 -r f3bd2a0973b9 supl/locationsuplfw/gateway/src/epos_csuplnetinitiatedsession.cpp --- a/supl/locationsuplfw/gateway/src/epos_csuplnetinitiatedsession.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/supl/locationsuplfw/gateway/src/epos_csuplnetinitiatedsession.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -61,14 +61,18 @@ TInt majorVersion = KErrNotFound; TInt err = aSessnMgr.GetSUPLMessageVersionL(majorVersion,aClientBuf->Des()); - if(majorVersion == 1) + if(majorVersion == 2) + suplService = RSuplTerminalSubSession::ESUPL_2_0; + else suplService = RSuplTerminalSubSession::ESUPL_1_0; - else - suplService = RSuplTerminalSubSession::ESUPL_2_0; iSuplSession = aSessnMgr.CreateNewSessionL(aReqType, 0, suplService ); + + if (iSuplSession) + { iSuplSession->SetSUPLVersion(majorVersion); iSuplSessnReq = CSuplSessionRequest::NewL(aSessnMgr, iSuplSession, aServer); + } } diff -r 42de37ce7ce4 -r f3bd2a0973b9 supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp --- a/supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp Fri Feb 19 23:14:27 2010 +0200 +++ b/supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp Fri Mar 12 15:44:22 2010 +0200 @@ -406,12 +406,14 @@ } // Socket Connect has completed case EConnecting: + iTimer->Cancel(); // Valid SUPL server, Cancel timer started for this purpose if(iStatus == KErrNone) { if(iVariantEnabled) { iTrace->Trace(_L("CSuplConnection::RunL Making Secure Connection"), KTraceFileName, __LINE__); iState = EMakingSecureConn; + MakeSecureConnection(); } else @@ -603,7 +605,7 @@ { // Log iTrace->Trace(_L("CSuplConnection::CancelConnect"), KTraceFileName, __LINE__); - + iTimer->Cancel(); // Cancel all timers if (iConnArray.Count() > 1) { CompleteConnectCancel(aStatus); @@ -774,7 +776,17 @@ { iResolver.Cancel(); break; - } + } + case EConnecting: + { + iState = EFailure; + iSocket.Close(); + #ifndef __WINS__ // Bug Fix for close connection + // Close the RConnection + iConnection.Close(); + #endif + break; + } default: { if(iVariantEnabled) @@ -1143,6 +1155,7 @@ iTrace->Trace(_L("CSuplConnection::Connect(void)"), KTraceFileName, __LINE__); iState = EConnecting; + iTimer->Start(4000000); // For DNS pass case , but not a valid SUPL server iSocket.Connect(iAddress, iStatus); SetActive(); }