# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271420611 -10800 # Node ID 3825cf2dc8c2c05f7c699f60a5c672f531bb5c82 # Parent 788b770ce3ae1ac2c47989d6e85649a96db46f5f Revision: 201011 Kit: 201015 diff -r 788b770ce3ae -r 3825cf2dc8c2 genericpositioningplugins/locationsuplpsy/group/bld.inf --- a/genericpositioningplugins/locationsuplpsy/group/bld.inf Tue Feb 02 10:12:24 2010 +0200 +++ b/genericpositioningplugins/locationsuplpsy/group/bld.inf Fri Apr 16 15:23:31 2010 +0300 @@ -27,7 +27,7 @@ ../data/suplpsystub.sis /epoc32/data/z/system/install/suplpsystub.sis // Conf Files... ../conf/suplpsy.confml MW_LAYER_CONFML(suplpsy.confml) -../conf/suplpsy_10206913.crml MW_LAYER_CONFML(suplpsy_10206913.crml) +../conf/suplpsy_10206913.crml MW_LAYER_CRML(suplpsy_10206913.crml) PRJ_MMPFILES nla_suplpsy.mmp diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/clientlib/src/EPos_CPosLandmarkDatabase.cpp --- a/landmarks/locationlandmarks/clientlib/src/EPos_CPosLandmarkDatabase.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/clientlib/src/EPos_CPosLandmarkDatabase.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -141,6 +141,7 @@ // TUid CPosLandmarkDatabase::ImplementationId() const { +//coverity[naming_error :FALSE] return REComSession::GetImplementationUidL (iDtorIdKey);//iDtorIdKey; //return iDtorIdKey; } diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/clientlib/src/epos_poslandmarkserialization.cpp --- a/landmarks/locationlandmarks/clientlib/src/epos_poslandmarkserialization.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/clientlib/src/epos_poslandmarkserialization.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -59,8 +59,11 @@ memclr( &header, sizeof header ); TPckg headerPack( header ); TPtrC name, desc, icon; - + //coverity[check_return :FALSE] + //coverity[unchecked_value :FALSE] aLandmark.GetLandmarkName( name ); + //coverity[check_return :FALSE] + //coverity[unchecked_value :FALSE] aLandmark.GetLandmarkDescription( desc ); header.iIsIconSet = ( KErrNone == aLandmark.GetIcon( icon, header.iIconIndex, header.iIconMaskIndex ) ); diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/clientlib/src/epos_poslmcategoryserialization.cpp --- a/landmarks/locationlandmarks/clientlib/src/epos_poslmcategoryserialization.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/clientlib/src/epos_poslmcategoryserialization.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -50,6 +50,8 @@ TPckg infoPack( header ); TPtrC name, icon; + //coverity[check_return :FALSE] + //coverity[unchecked_value :FALSE] aCategory.GetCategoryName( name ); header.iIsIconSet = ( KErrNone == aCategory.GetIcon( icon, header.iIconIndex, header.iIconMaskIndex ) ); diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/converter/src/EPos_CPosLmKmlParser.cpp --- a/landmarks/locationlandmarks/converter/src/EPos_CPosLmKmlParser.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/converter/src/EPos_CPosLmKmlParser.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -306,11 +306,15 @@ while (TextUtils::ColumnText(Pointer,aCount,&contentBuf,KPosXmlCommaSeparator) != KErrNotFound ) { + if(addressField[column] == EPositionFieldPostalCode) { if(!(IsNumber(Pointer.Left( KMaxPostalCode )))) column++; // if it is not number then set it to state } + if(column>=5) + break; + if( addressField[column] == EPositionFieldCountry) { if(IsNumber(Pointer.Left( KMaxPostalCode ))) @@ -324,7 +328,7 @@ column++; aCount++; if(aCount >= 4 || column>=5) - break; + break; } CleanupStack::PopAndDestroy(); diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/converter/src/EPos_CPosLmLmxParser.cpp --- a/landmarks/locationlandmarks/converter/src/EPos_CPosLmLmxParser.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/converter/src/EPos_CPosLmLmxParser.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -234,9 +234,11 @@ PosLmConverterUtils::AssertL( iWorkingCategory != NULL ); iWorkingCategory->SetCategoryNameL( aContent.Left( KPosLmMaxCategoryNameLength ) ); break; + //coverity[unterminated_case :FALSE] case EPosXmlAddrPlaceId: //addition for Place id PosLmConverterUtils::AssertL( iWorkingLandmark != NULL ); iWorkingLandmark->SetPlaceIdL( aContent.Left( KPosLmMaxTextFieldLength ) ); + //coverity[fallthrough : FALSE] default: // We need to check if it is a addressInfo tag. // AddressInfo Tag diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp --- a/landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -108,12 +108,10 @@ User::LeaveIfError(iDb.Create(aFileSession, aFileName)); TDeleteFile* del = new (ELeave) TDeleteFile; - CleanupStack::PushL(del); del->iFs = &aFileSession; del->iFilename.Set(aFileName); CleanupStack::PushL(TCleanupItem(DeleteFileCleanupItem, del)); - CleanupClosePushL(iDb); //Create the database table CDbColSet* columns = CDbColSet::NewLC(); @@ -134,9 +132,7 @@ User::LeaveIfError(iDb.Execute(*sql)); CleanupStack::PopAndDestroy(sql); - CleanupStack::Pop(&iDb); - CleanupStack::Pop(); //DeleteFileCleanupItem - CleanupStack::PopAndDestroy(del); + CleanupStack::PopAndDestroy(&del); //DeleteFileCleanupItem } // ----------------------------------------------------------------------------- diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/internalservices/src/EPos_CPosLmLocalDbAccess.cpp --- a/landmarks/locationlandmarks/internalservices/src/EPos_CPosLmLocalDbAccess.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/internalservices/src/EPos_CPosLmLocalDbAccess.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -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 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp --- a/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -321,6 +321,7 @@ // EXPORT_C void CPosLmLocalDatabase::CommitServerTransactionLX() { + //coverity[naming_error : FALSE] CommitServerTransactionL(); CleanupStack::Pop(); // rollback } @@ -716,17 +717,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 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalExportOp.cpp --- a/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalExportOp.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalExportOp.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -155,12 +155,15 @@ i < iNrOfSubOperations && iCurrentCategory < iCategoryIdArray.Count(); i++) { + //coverity[alloc_fn : FALSE] + //coverity[assign :FALSE] CPosLandmarkCategory* category = ReadCategoryFromDbLC(iCategoryIdArray[iCurrentCategory++]); if (iTransferOptions & CPosLandmarkDatabase::EIncludeGlobalCategoryNames) { + //coverity[leave_without_push : FALSE] SetPredefinedGlobalNameL(category); } diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/localaccess/src/EPos_RPosLmLocalAccessSubsession.cpp --- a/landmarks/locationlandmarks/localaccess/src/EPos_RPosLmLocalAccessSubsession.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/localaccess/src/EPos_RPosLmLocalAccessSubsession.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -91,6 +91,7 @@ TPosLmEventType aEventType, TPosLmItemId aId) { + //coverity[var_decl : FALSE] TPosLmEvent event; event.iEventType = aEventType; event.iLandmarkItemId = aId; diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp --- a/landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -46,8 +46,10 @@ TPosLmItemId aId, const TDesC& aName ) { CIndexItem* self = new (ELeave) CIndexItem; + CleanupStack::PushL( self ); self->iId = aId; self->iName = aName.AllocL(); + CleanupStack::Pop( self ); return self; } @@ -275,7 +277,7 @@ TInt err = iSession.SendReceive( EPosLmServerUpdateNameIndex, TIpcArgs( EPosLmServerRemoveLandmarks, &idsDes ) ); - delete ids; + delete[] ids; User::LeaveIfError( err ); } diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/searchclientlib/src/EPos_PosLmDisplayDataHandler.cpp --- a/landmarks/locationlandmarks/searchclientlib/src/EPos_PosLmDisplayDataHandler.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/searchclientlib/src/EPos_PosLmDisplayDataHandler.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -31,7 +31,6 @@ CPosLmDisplayData& aDisplayData, CPosLmDisplayItem* aDisplayItem ) { - RPointerArray& displayItems = aDisplayData.DisplayItems(); InsertItemL( aDisplayData, aDisplayItem, aDisplayData.Count() ); // append to the end } diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/server/inc/epos_lmdebug.h --- a/landmarks/locationlandmarks/server/inc/epos_lmdebug.h Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/server/inc/epos_lmdebug.h Fri Apr 16 15:23:31 2010 +0300 @@ -49,6 +49,7 @@ inline void Log( TRefByValue aFmt, ... ) { + //coverity[var_decl : FALSE] VA_LIST list; VA_START( list, aFmt ); diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp --- a/landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -754,12 +754,14 @@ if ( aMessage.Int0() == EPosLmServerUpdateLandmarks ) { +//coverity[freed_arg : FALSE] index.UpdateL( id, lmBuf ); } else { index.InsertL( id, lmBuf ); } +//coverity[pass_freed_arg : FALSE] CleanupStack::Pop( lmBuf ); } diff -r 788b770ce3ae -r 3825cf2dc8c2 landmarks/locationlandmarks/server/src/EPos_CPosLmNameIndex.cpp --- a/landmarks/locationlandmarks/server/src/EPos_CPosLmNameIndex.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/landmarks/locationlandmarks/server/src/EPos_CPosLmNameIndex.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -344,7 +344,8 @@ item->SetValid(); CleanupStack::PopAndDestroy( name ); } - + //coverity[check_return :FALSE] + //coverity[unchecked_value :FALSE] iTable.NextL(); iTablePosition++; } @@ -448,7 +449,9 @@ // void CPosLmNameIndex::InsertL( TPosLmItemId aLmid, HBufC* aName ) { - DoInsertL( aLmid, aName ); + //coverity[ alloc_fn : FALSE ] + DoInsertL( aLmid, aName ); + } //-------------------------------------------------------------------- @@ -539,7 +542,9 @@ void CPosLmNameIndex::UpdateL( TPosLmItemId aId, const TDesC& aName ) { HBufC* name = aName.AllocLC(); +//coverity[freed_arg : FALSE] UpdateL( aId, name ); +//coverity[pass_freed_arg : FALSE] CleanupStack::Pop( name ); } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/group/bld.inf --- a/locationsystemui/locationsysui/group/bld.inf Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/group/bld.inf Fri Apr 16 15:23:31 2010 +0300 @@ -114,5 +114,7 @@ //Satellite Info #include "../locblidsatelliteinfo/group/bld.inf" +// Query and Notification +#include "../queryandnotification/group/bld.inf" PRJ_TESTMMPFILES // End of File diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/help/rom/locationsysuihelps_variant.iby --- a/locationsystemui/locationsysui/help/rom/locationsysuihelps_variant.iby Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/help/rom/locationsysuihelps_variant.iby Fri Apr 16 15:23:31 2010 +0300 @@ -24,25 +24,21 @@ data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275062\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10275062\contents.zip) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275091\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10275091\contents.zip) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10283139\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10283139\contents.zip) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E66E\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E66E\contents.zip) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x1020690F\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x1020690F\index.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207462\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10207462\index.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275062\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10275062\index.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275091\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10275091\index.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10283139\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10283139\index.xml) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E66E\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E66E\index.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x1020690F\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x1020690F\keywords.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207462\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10207462\keywords.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275062\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10275062\keywords.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275091\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10275091\keywords.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10283139\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10283139\keywords.xml) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E66E\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E66E\keywords.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x1020690F\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x1020690F\meta.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207462\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10207462\meta.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275062\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10275062\meta.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10275091\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10275091\meta.xml) data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10283139\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10283139\meta.xml) - data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x2001E66E\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x2001E66E\meta.xml) #endif diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locnotprefplugin/data/locnotprefpluginview.rss --- a/locationsystemui/locationsysui/locnotprefplugin/data/locnotprefpluginview.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locnotprefplugin/data/locnotprefpluginview.rss Fri Apr 16 15:23:31 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -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 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locpsysettings/locpsysettingsui/data/locpsysettingsuiview.rss --- a/locationsystemui/locationsysui/locpsysettings/locpsysettingsui/data/locpsysettingsuiview.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locpsysettings/locpsysettingsui/data/locpsysettingsuiview.rss Fri Apr 16 15:23:31 2010 +0300 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/data/locsuplservereditor.rss --- a/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplservereditor.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplservereditor.rss Fri Apr 16 15:23:31 2010 +0300 @@ -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 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/data/locsuplsettingsui.rss --- a/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplsettingsui.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/data/locsuplsettingsui.rss Fri Apr 16 15:23:31 2010 +0300 @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -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 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplservereditor.h --- a/locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplservereditor.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/inc/locsuplservereditor.h Fri Apr 16 15:23:31 2010 +0300 @@ -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 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/src/locsuplservereditor.cpp --- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplservereditor.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplservereditor.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -46,6 +46,7 @@ #include #include // Gul Icon #include +#include #include #include @@ -269,152 +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: - { - 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 // ----------------------------------------------------------------------------- @@ -552,6 +509,16 @@ //dont close editor retVal = EFalse; } + else if( err == KErrArgument ) + { + ShowServerValidationInfoNoteL( R_LOC_SERVER_INFO_NOTE ); + iIsEditMode = ETrue; + SetEditableL( iIsEditMode ); + SetInitialCurrentLine(); + SetCursorToEndL(); + //dont close editor + retVal = EFalse; + } } else { // save the existing slp entry info @@ -576,6 +543,16 @@ SetInitialCurrentLine(); SetCursorToEndL(); } + else if( err == KErrArgument ) + { + ShowServerValidationInfoNoteL( R_LOC_SERVER_INFO_NOTE ); + iIsEditMode = ETrue; + SetEditableL( iIsEditMode ); + SetInitialCurrentLine(); + SetCursorToEndL(); + //dont close editor + retVal = EFalse; + } } HandleMSKCaptionL(); //dont close editor @@ -655,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 ) { @@ -836,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 ) @@ -902,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; } @@ -948,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 ) @@ -1129,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 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioncontainer.cpp --- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioncontainer.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioncontainer.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -269,7 +269,7 @@ { DEBUG( + CLocSUPLSessionContainer::GetHelpContext ); aContext.iContext = iContextName; - aContext.iMajor = TUid::Uid( KLOCSUPLSERVERUIUID3 ); + aContext.iMajor = TUid::Uid( KLOCSUPLSETTINGSUIUID3 ); DEBUG( - CLocSUPLSessionContainer::GetHelpContext ); } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioneditor.cpp --- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioneditor.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioneditor.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -39,6 +39,7 @@ #include #include // Gul Icon #include +#include #include #include @@ -229,6 +230,8 @@ } case EAknCmdHelp: { + HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(), + iAvkonAppUi->AppHelpContextL() ); break; } case EEikCmdExit: @@ -610,6 +613,7 @@ if( !aSeconds ) { tempString.Num(aSeconds); + AknTextUtils::LanguageSpecificNumberConversion(tempString); aTimeString = StringLoader::LoadL( R_LOC_SUPL_TRIGGER_TIME_MINUTES, tempString ); return; } @@ -622,6 +626,7 @@ TReal mins = TReal(aSeconds)/KMinToSecs; Math::Round( approxValue, mins, 2 ); tempString.Num(approxValue, fmt); + AknTextUtils::LanguageSpecificNumberConversion(tempString); aTimeString = StringLoader::LoadL( R_LOC_SUPL_TRIGGER_TIME_MINUTES, tempString ); } else if( hrs == 1 ) @@ -635,6 +640,7 @@ { Math::Round( approxValue, hrs, 2 ); tempString.Num(approxValue, fmt); + AknTextUtils::LanguageSpecificNumberConversion(tempString); aTimeString = StringLoader::LoadL( R_LOC_SUPL_TRIGGER_TIME_HOURS, tempString ); } else if( days == 1 ) @@ -645,7 +651,8 @@ { Math::Round( approxValue, days, 2 ); tempString.Num(approxValue, fmt); - aTimeString = StringLoader::LoadL( R_LOC_SUPL_TRIGGER_TIME_DAYS, tempString ); + AknTextUtils::LanguageSpecificNumberConversion(tempString); + aTimeString = StringLoader::LoadL( R_LOC_SUPL_TRIGGER_TIME_DAYS, tempString ); } } } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsettingsadapter.cpp --- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsettingsadapter.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsettingsadapter.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -448,17 +448,18 @@ { DEBUG( + CLocSUPLSettingsAdapter::AddNewServerL ); CServerParams* serverParam = CServerParams::NewL(); - serverParam->Set( + CleanupStack::PushL( serverParam ); + User::LeaveIfError(serverParam->Set( aServerAddress, aIapName, ETrue, EFalse, // default value aUsageInHomeNw, - ETrue ); + ETrue )); TInt64 slpId; User::LeaveIfError( iSUPLSettings->AddNewServer( serverParam, slpId ) ); - delete serverParam; + CleanupStack::PopAndDestroy(); DEBUG( - CLocSUPLSettingsAdapter::AddNewServerL ); } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locsysuiview/data/locsysuiviewrsc.rss --- a/locationsystemui/locationsysui/locsysuiview/data/locsysuiviewrsc.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locsysuiview/data/locsysuiviewrsc.rss Fri Apr 16 15:23:31 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locutils/data/locutils.rss --- a/locationsystemui/locationsysui/locutils/data/locutils.rss Tue Feb 02 10:12:24 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource File for the Location System UI -* Utilities -* -* -*/ - - -// RESOURCE IDENTIFIER -NAME LUPS // 4 letter ID - -// INCLUDES -#include -#include -#include - -// CONSTANTS - -// RESOURCE DEFINITIONS - -//---------------------------------------------------- -// -// -// Needed or loading the resource fails! -// -//---------------------------------------------------- -// -RESOURCE RSS_SIGNATURE - { - } - - -//---------------------------------------------------- -// -// r_vpbk_email_selector -// Resource used while selecting WEB URL field for -// Phonebook Search. -// -//---------------------------------------------------- -// -RESOURCE VPBK_FIELD_TYPE_SELECTOR r_vpbk_url_selector - { - versitProperties = - { - VBK_FIELD_VERSIT_PROPERTY - { - name = EVPbkVersitNameURL; - } - }; - } - -//---------------------------------------------------- -// -// r_vpbk_email_selector -// Resource used while selecting EMAIL field for -// Phonebook Search. -// -//---------------------------------------------------- -// -RESOURCE VPBK_FIELD_TYPE_SELECTOR r_vpbk_email_selector - { - versitProperties = - { - VBK_FIELD_VERSIT_PROPERTY - { - name = EVPbkVersitNameEMAIL; - } - }; - } - -//---------------------------------------------------- -// -// r_vpbk_sipurl_selector -// Resource used while selecting SIP URL field for -// Phonebook Search. -// -//---------------------------------------------------- -// -RESOURCE VPBK_FIELD_TYPE_SELECTOR r_vpbk_sipurl_selector - { - versitProperties = - { - VBK_FIELD_VERSIT_PROPERTY - { - name = EVPbkVersitNameX; - extensionName = "X-SIP"; - } - }; - } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locutils/group/locutils.mmp --- a/locationsystemui/locationsysui/locutils/group/locutils.mmp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locutils/group/locutils.mmp Fri Apr 16 15:23:31 2010 +0300 @@ -43,17 +43,11 @@ #endif // System Include -APP_LAYER_SYSTEMINCLUDE +MW_LAYER_SYSTEMINCLUDE USERINCLUDE . USERINCLUDE ../inc -SOURCEPATH ../data -START RESOURCE locutils.rss -HEADER -TARGETPATH RESOURCE_FILES_DIR -END - LIBRARY euser.lib LIBRARY bafl.lib LIBRARY avkon.lib @@ -63,9 +57,6 @@ LIBRARY sysutil.lib LIBRARY eposprvtyp.lib -LIBRARY vpbkeng.lib -LIBRARY pbk2presentation.lib - #ifdef LOC_ENABLE_DEBUG_PRINT LIBRARY flogger.lib #endif diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locutils/inc/locrequestorutilsresolver.h --- a/locationsystemui/locationsysui/locutils/inc/locrequestorutilsresolver.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locutils/inc/locrequestorutilsresolver.h Fri Apr 16 15:23:31 2010 +0300 @@ -20,23 +20,10 @@ #define CLOCREQUESTORUTILSRESOLVER_H_ // INCLUDES -#include // MIdleFindObserver -#include // TPbkFieldId -#include -#include +#include //FORWARD DECLARATION -class CPbkFieldIdArray; -class CPbkIdleFinder; -class CPbkContactEngine; -class CActiveSchedulerWait; class CPosRequestor; -class MVPbkContactOperationBase; -class MVPbkContactLinkArray; -class MVPbkStoreContact; -class MVPbkFieldTypeList; -class CPbk2SortOrderManager; -class MPbk2ContactNameFormatter; // CLASS DECLARATION @@ -45,8 +32,7 @@ * @lib locutils.lib * @since 3.0 */ -class CLocRequestorUtilsResolver : public CBase, - public MCenRepNotifyHandlerCallback +class CLocRequestorUtilsResolver : public CBase { public: // Constructors and destructor @@ -108,90 +94,6 @@ * The Symbian 2nd Phase Constructor is always Private */ void ConstructL(); - - private: - /** - * From base class MCenRepNotifyHandlerCallback - * This callback method is used to notify the client about - * changes for integer value keys, i.e. key type is EIntKey. - * - * @param aId Id of the key that has changed. - * @param aNewValue The new value of the key. - */ - virtual void HandleNotifyInt( TUint32 aId, TInt aNewValue ); - - /** - * This callback method is used to notify the client about errors - * in the handler. Any error in handling causes the handler to stop - * handling any more notifications. - * - * @param aId Id of the key this instance listens for or if - * notifications for whole repository are listened, could - * also be KInvalidNotificationId. - * @param aError Error code. - * @param aHandler Pointer to the handler instance. - */ - virtual void HandleNotifyError( TUint32 aId, TInt aError, - CCenRepNotifyHandler* aHandler ); - - private: // New Methods - /** - * This resolves the requestor by searching the contacts database - * based on the requestor Id Information. - * This searches only the default contact database now. - */ - void ResolveRequestorNameL( CPosRequestor& aRequestor ); - - /** - * This resolves the requestor by searching the contacts database - * based on Phone Number. This searches only the default contact - * database now. - */ - void SearchByPhoneNumberL( CPosRequestor& aRequestor ); - - /** - * This resolves the requestor by searching the contacts database - * based on Other Fields. Used to search E-mail , SIP URL and Web URL - * type fields. This searches only the default contact database now. - */ - void SearchByOtherFieldsL( CPosRequestor& aRequestor, - TPbkFieldId aFieldType ); - - /** - * This resolves the requestor by searching for the requestor - * string in al the fields in the contacts database. - * This searches only the default contact database now. - */ - void SearchByAllFieldsL( CPosRequestor& aRequestor ); - - /** - * The Contact Searchs based on other fields can return contact cards - * that do not match in the specified field but in some other field. - * This method checks if the match occurs in the exact specified field. - */ - TBool IsContactExactRequestorMatchL( CPosRequestor& aRequestor, - TContactItemId& aCntItemId, - TPbkFieldId aFieldType ); - - /** - * This sets the contact card name in the requestor. - * Also the Requestor Format is changes to GenericName - */ - void SetContactNameToRequestorL( CPosRequestor& aRequestor, - TContactItemId& aCntItemId ); - - private: // member data - // Own : Handle to the Contact Engine used to resolve the requestors - CPbkContactEngine* iPbkContactEngine; - - // Central repository instance. - CRepository* iCenRepSession; - - // Central repository notify handler instance. - CCenRepNotifyHandler* iCenRepNotifyHandler; - - // Matched numbers - TInt iNumDigitsToMatch; }; #endif // CLOCREQUESTORUTILSRESOLVER_H_ diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locutils/inc/locrequestorutilsresolverimpl2.h --- a/locationsystemui/locationsysui/locutils/inc/locrequestorutilsresolverimpl2.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locutils/inc/locrequestorutilsresolverimpl2.h Fri Apr 16 15:23:31 2010 +0300 @@ -19,24 +19,9 @@ #ifndef CLOCREQUESTORUTILSRESOLVER_H_ #define CLOCREQUESTORUTILSRESOLVER_H_ -// INCLUDES -#include -#include -#include -#include -#include -#include //FORWARD DECLARATION -class CVPbkContactManager; -class CActiveSchedulerWait; class CPosRequestor; -class MVPbkContactOperationBase; -class MVPbkContactLinkArray; -class MVPbkStoreContact; -class MVPbkFieldTypeList; -class CPbk2SortOrderManager; -class MPbk2ContactNameFormatter; // CLASS DECLARATION @@ -45,10 +30,7 @@ * @lib locutils.lib * @since 3.0 */ -class CLocRequestorUtilsResolver : public CActive, - public MVPbkContactFindObserver, - public MVPbkSingleContactOperationObserver, - public MVPbkContactStoreListObserver +class CLocRequestorUtilsResolver : public CBase { public: // Constructors and destructor @@ -99,107 +81,7 @@ * @return name descriptor, ownership is transferred to caller */ IMPORT_C HBufC* RequestorNameL( const CPosRequestor& aRequestor ); - - protected: // From Base class MVPbkContactFindObserver. - /** - * Called when find is complete. The ownership of results in transferred - * to this class. - * In case of an error during find, the aResults may contain only - * partial results of the find. - * - * @param aResults Array of contact links that matched the find. - * Callee must take ownership of this object in - * the end of the function, ie. in case the function - * does not leave. - */ - virtual void FindCompleteL(MVPbkContactLinkArray* aResults); - - /** - * Called in case the find fails for some reason. - * - * @param aError One of the system wide error codes. - */ - virtual void FindFailed(TInt aError); - - protected: // From Base class MVPbkSingleContactOperationObserver - /** - * Called when operation is completed. - * - * @param aOperation the completed operation. - * @param aContact the contact returned by the operation. - * Client must take the ownership immediately. - * - */ - virtual void VPbkSingleContactOperationComplete( - MVPbkContactOperationBase& aOperation, - MVPbkStoreContact* aContact); - - /** - * Called if the operation fails. - * - * @param aOperation the failed operation. - * @param aError error code of the failure. - */ - virtual void VPbkSingleContactOperationFailed( - MVPbkContactOperationBase& aOperation, - TInt aError); - - protected: //From base class MVPbkContactStoreListObserver - /** - * Called when the opening process is complete, - * ie. all stores have been reported - * either failed or successful open. - */ - virtual void OpenComplete(); - - protected: //From base class MVPbkContactStoreObserver - /** - * Called when a contact store is ready to use. - */ - virtual void StoreReady(MVPbkContactStore& aContactStore); - - /** - * Called when a contact store becomes unavailable. - * Client may inspect the reason of the unavailability and decide whether or not - * it will keep the store opened (ie. listen to the store events). - * @param aContactStore The store that became unavailable. - * @param aReason The reason why the store is unavailable. - * This is one of the system wide error codes. - */ - virtual void StoreUnavailable(MVPbkContactStore& aContactStore, TInt aReason); - - /** - * Called when changes occur in the contact store. - * @see TVPbkContactStoreEvent - * - * @param aStoreEvent Event that has occured. - */ - virtual void HandleStoreEventL( - MVPbkContactStore& aContactStore, - TVPbkContactStoreEvent aStoreEvent); - - protected: - /** - * From Base class CActive - * This method is called by the ActiveScheduler when the asynchronous - * operation gets completed. - */ - virtual void RunL(); - - /** - * From Base class CActive - * If RunL leaves then it is handled in RunError. - * @param aError the ErrorCode on which RunL did a Leave. - */ - virtual TInt RunError(TInt aError); - - /** - * From Base class CActive - * DoCancel is called when the operation performed by the Active Object - * needs to be cancelled. - */ - virtual void DoCancel(); - + private: // Constructors /** * C++ default constructor. @@ -210,96 +92,6 @@ * The Symbian 2nd Phase Constructor is always Private */ void ConstructL(); - - private: // New Methods - /** - * This resolves the requestor by searching the contacts database - * based on the requestor Id Information. - * This searches only the default contact database now. - */ - void ResolveRequestorNameL(CPosRequestor& aRequestor); - - /** - * This resolves the requestor by searching the contacts database - * based on Phone Number. - * This searches only the default contact database now. - */ - void ResolveRequestorByPhoneNumberL( - CPosRequestor& aRequestor); - - /** - * This resolves the requestor by searching the contacts database - * based on Other Fields. Used to search based on E-mail and URL - * type. This searches only the default contact database now. - */ - void ResolveRequestorByOtherFieldsL( - CPosRequestor& aRequestor, - MVPbkFieldTypeList* aFieldType); - - /** - * This sets the contact card name in the requestor. - * Also the Requestor Format is changes to GenericName - */ - void SetContactNameToRequestorL(TInt aCntLinkArrayIndex); - - private: // Helper methods - /** - * Schedule this dumy Active object to run again. - */ - void ScheduleAORun(); - - /** - * Complete the Contact resolving operation. - */ - void CompleteRequest(); - - private: // State of Contacts Resolving - enum TContactResolverState - { - KNoProcessing = 0, - KResolveRequestor, - KMatchedContacts, - KRetrievedContactInfo, - KResolvingCompleted - }; - - private: // member data - // Ref : The current requestor stack that is being resolved. - RPointerArray* iRequestors; - - // Own : Handle to the Contact Engine used to resolve the requestors - CVPbkContactManager* iPbkContactEngine; - - // Own: Parameter for the MPbk2ContactNameFormatter - CPbk2SortOrderManager* iPbkSortManager; - - // Own: Parameter for the Find API - MPbk2ContactNameFormatter* iPbkCntFormatter; - - // Own : ActiveSchedulerWait Loop. - CActiveSchedulerWait iWait; - - // Own : Handle to the Current operation being performed - MVPbkContactOperationBase* iCntsOperation; - - // Own : the Link to the matched contacts - MVPbkContactLinkArray* iCntLinkArray; - - // Own: The Contact retrieved - MVPbkStoreContact* iContact; - - // The current state of contacts resolving - TContactResolverState iState; - - // The index of the current requestor that is being processed. - TInt iCount; - - // The offset returned by the AddResourceFile - // Used to delete the resource file. - TInt iResourceOffset; - - // Eikon Env - CEikonEnv* iEnv; }; #endif // CLOCREQUESTORUTILSRESOLVER_H_ diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locutils/src/locrequestorutilsresolverimpl2.cpp --- a/locationsystemui/locationsysui/locutils/src/locrequestorutilsresolverimpl2.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locutils/src/locrequestorutilsresolverimpl2.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -21,45 +21,16 @@ #include #include + #include #include #include -// Virtual Phonebook Engine API -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Virtual Phonebook Presentation API -#include -#include -#include -#include -#include -#include - -#include #include "locrequestorutilsresolverimpl2.h" #include "locutilsdebug.h" #include "locfileutils.h" -#include -// This is a non localisable resource file hence we can directly refer to the -// file as .rsc and we don't need to use the BaflUtils to load this resource -// file. -_LIT(KLocUtilsRscFile, "\\resource\\locutils.rsc"); // ============= CLocRequestorUtilsResolver MEMBER FUNCTIONS ================= // --------------------------------------------------------------------------- @@ -83,14 +54,6 @@ // CLocRequestorUtilsResolver::~CLocRequestorUtilsResolver() { - delete iCntsOperation; - delete iCntLinkArray; - delete iContact; - delete iPbkContactEngine; - delete iPbkSortManager; - delete iPbkCntFormatter; - - iEnv->DeleteResourceFile( iResourceOffset ); } // --------------------------------------------------------------------------- @@ -98,21 +61,9 @@ // --------------------------------------------------------------------------- // EXPORT_C void CLocRequestorUtilsResolver::ProcessRequestorsL( - RPointerArray& aRequestors ) + RPointerArray& /*aRequestors*/ ) { - // The Contact Stores are all opened and setup for Search Operation - // Let us start with the first requestor now. - // The iCount member denotes the current requestor being processed. - // Initialise the value to zero. - iCount = 0; - - iRequestors = &aRequestors; - // Initialize the state machine. - iState = KNoProcessing; - // Start the Active Object. - ScheduleAORun(); - - iWait.Start(); + // Removed this functionality to avoid App layer dependency } // ----------------------------------------------------------------------------- @@ -161,310 +112,6 @@ return aRequestor.RequestorIdString().AllocL(); } - -// --------------------------------------------------------------------------- -// This is the callback method triggered when contacts matching succeeds. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::FindCompleteL(MVPbkContactLinkArray* aResults) - { - iCntLinkArray = aResults; - // Set State to process the matched contacts - iState = KMatchedContacts; - // Schedule to run the Active Object again. - ScheduleAORun(); - } - - -// --------------------------------------------------------------------------- -// This is the callback method triggered when contacts matching fails -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::FindFailed(TInt /*aError*/) - { - // Search in one of the contact stores failed. - // No operation to be done in this phase. - // All actions are done after the find is completed fully in - // FindCompleteL - } - -// --------------------------------------------------------------------------- -// This is the callback method triggered when retrieving contact details -// from a Contact Link -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::VPbkSingleContactOperationComplete( - MVPbkContactOperationBase& /*aOperation*/, - MVPbkStoreContact* aContact) - { - iContact = aContact; - // Set State to process the retrieved contacts Information. - iState = KRetrievedContactInfo; - // Schedule to run the Active Object again. - ScheduleAORun(); - } - - -// --------------------------------------------------------------------------- -// This is the callback method triggered when there is an error in -// retrieving contact details from a Contact Link -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::VPbkSingleContactOperationFailed( - MVPbkContactOperationBase& /*aOperation*/, - TInt /*aError*/) - { - // In this case we cannot get the Contact card name. - // Hence the requestor detail cannot be updated. - // So let us move to the next state. - // The state machine takes care of *not* updating the requestor - // information. - // Set State to process the retrieved contacts Information. - iState = KRetrievedContactInfo; - // Schedule to run the Active Object again. - ScheduleAORun(); - } - - -// --------------------------------------------------------------------------- -// This is the callback method triggered when closing / opening the -// contacts stores. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::OpenComplete() - { - // Set State to Start Requestor resolving. - iState = KResolveRequestor; - // Schedule to run the Active Object again. - ScheduleAORun(); - } - - -// --------------------------------------------------------------------------- -// This is the callback method triggered when closing / opening one -// contact store. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::StoreReady( - MVPbkContactStore& /*aContactStore*/) - { - //Nothing to do here - } - - -// --------------------------------------------------------------------------- -// This is the callback method triggered when an opened contact store becomes -// unavailable. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::StoreUnavailable( - MVPbkContactStore& /*aContactStore*/, - TInt /*aReason*/) - { - //Nothing to do here - } - - -// --------------------------------------------------------------------------- -// This is the callback method triggered when any event happens with the -// opened contact stores. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::HandleStoreEventL( - MVPbkContactStore& /*aContactStore*/, - TVPbkContactStoreEvent /*aStoreEvent*/) - { - // We don't worry about contact , group events with any contact store. - // Also backup / restore is taken care of in the verifier dialogs and - // so we don't need to worry about backup / restore events with this store - // as well. - // Hence no processing is needed here. - // Just overriden since the base class method is pure virtual. - } - - -// ----------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::RunL -// RunL runs the full state machine operations -// ----------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::RunL() - { - // No need to check iStatus since this is a dummy Active Object and the - // asynchronous operation was completed locally. - switch( iState ) - { - case KNoProcessing: - { - MVPbkContactStoreList& cntStoreList = - iPbkContactEngine->ContactStoresL(); - cntStoreList.OpenAllL(*this); - } - break; - - case KResolveRequestor: - { - TInt count = iRequestors->Count(); - if ( iCount < count ) - { - // Till there are more requestors to resolve continue this - // operation. - ResolveRequestorNameL( *(*iRequestors)[iCount] ); - } - else - { - // Set State to complete requestors resolving process. - iState = KResolvingCompleted; - ScheduleAORun(); - } - } - break; - - case KMatchedContacts: - { - // Once the Find operation is completed the control reaches here - // and the result is stored in iCntLinkArray - if ( iCntLinkArray && iCntLinkArray->Count() == 1 ) - { - delete iCntsOperation; - iCntsOperation = NULL; - - SetContactNameToRequestorL(0); - } - else - { - delete iCntsOperation; - delete iCntLinkArray; - - iCntLinkArray = NULL; - iCntsOperation = NULL; - - // There is no match or more than 1 match in contact stores. - // So no more operation to be done on this requestor. - // Move onto the next requestor and start resolving process again. - iCount++; - // Set State to Start Requestor resolving. - iState = KResolveRequestor; - // Schedule to run the Active Object again. - ScheduleAORun(); - } - } - break; - - case KRetrievedContactInfo: - { - if ( iContact ) - { - HBufC* name = - iPbkCntFormatter->GetContactTitleOrNullL( - iContact->Fields(), - MPbk2ContactNameFormatter::EUseSeparator); - if ( name ) - { - CleanupStack::PushL(name); - // Set the requestor Type as Generic Name otherwise clipping - // would be done as if this is a number. - // Number clipping is done from beginning while text clipping - // is done from the end. Hence this is not trivial. - (*iRequestors)[iCount]->SetRequestorIdL( - CPosRequestor::EIdFormatGenericName, - *name ); - CleanupStack::PopAndDestroy( name ); - } - } - - // Delete all information related to the current requestor resolving - // operation - - delete iContact; - delete iCntLinkArray; - delete iCntsOperation; - - iContact = NULL; - iCntLinkArray = NULL; - iCntsOperation = NULL; - - // Start next requestor resolving operation. - iCount++; - iState = KResolveRequestor; - ScheduleAORun(); - } - break; - - case KResolvingCompleted: - { - // All the handles regarding the requestor resolving namely iContact, - // iCntLinkArray and iCntsOperation have already been cleaned up. - // The only remaining item is the Contact Sotre handle. - MVPbkContactStoreList& cntStoreList = - iPbkContactEngine->ContactStoresL(); - // Although CloseAll takes a handle to the observer of type - // MVPbkContactStoreListObserver does not provide any callback mechanism. - // It merely uses it to match in the observer array and remove it from the - // array. - cntStoreList.CloseAll(*this); - CompleteRequest(); - } - break; - } - - } - - -// ----------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::RunError -// Handle RunL error cases. -// ----------------------------------------------------------------------------- -// -TInt CLocRequestorUtilsResolver::RunError(TInt /*aError*/) - { - switch ( iState ) - { - case KNoProcessing: - // Leave occured while opening Contact Stores. Just complete the - // resolving request. - CompleteRequest(); - break; - case KResolveRequestor: - // ResolvRequestorNameL caused the leave. So current requestor - // cannot be resolved. - case KMatchedContacts: - // RetrieveContactL caused a leave. Contact Name cannot be retrieved - case KRetrievedContactInfo: - // Settings the Requestor Id name failed. - delete iContact; - delete iCntLinkArray; - delete iCntsOperation; - - iContact = NULL; - iCntLinkArray = NULL; - iCntsOperation = NULL; - //So just set requestor count to next and trigger - // the AO in the same state. - iCount++; - iState = KResolveRequestor; - ScheduleAORun(); - break; - case KResolvingCompleted: - // Leave occured while opening Contact Stores. Just complete the - // resolving request. - CompleteRequest(); - break; - } - return KErrNone; - } - - -// ----------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::DoCancel -// Handle Cancel operation. -// ----------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::DoCancel() - { - //Nothing to be done here. - } - // --------------------------------------------------------------------------- // CLocRequestorUtilsResolver::CLocRequestorUtilsResolver // C++ default constructor can NOT contain any code, that @@ -472,9 +119,8 @@ // --------------------------------------------------------------------------- // CLocRequestorUtilsResolver::CLocRequestorUtilsResolver() - :CActive(EPriorityStandard) { - CActiveScheduler::Add(this); + // Nothing to do. } // --------------------------------------------------------------------------- @@ -484,299 +130,7 @@ // void CLocRequestorUtilsResolver::ConstructL() { - iEnv = CEikonEnv::Static(); - - // Retrieve the URI list of contact stores to be used for searching - CPbk2StoreConfiguration* cntStoreCfg = CPbk2StoreConfiguration::NewL(); - CleanupStack::PushL(cntStoreCfg); - - CVPbkContactStoreUriArray* uriArray = - cntStoreCfg->SearchStoreConfigurationL(); - - CleanupStack::PushL(uriArray); - - // Create the Virtual Phonebook Contact Manager class. - // This class provides Search functionality. - iPbkContactEngine = CVPbkContactManager::NewL(*uriArray); - - // Contact Store Configuration and URI Array classes are not - // needed anymore. - CleanupStack::PopAndDestroy(2, cntStoreCfg); - - // The Sort Manager is a parameter to the Contact Formatter Constructor - iPbkSortManager = - CPbk2SortOrderManager::NewL(iPbkContactEngine->FieldTypes()); - - // The Phonebook Formatter is a paramter to the Search method in the - // contact manager. - iPbkCntFormatter = - Pbk2ContactNameFormatterFactory::CreateL( - iPbkContactEngine->FieldTypes(), - *iPbkSortManager); - - TFileName* resourceFile = new( ELeave ) TFileName; - CleanupStack::PushL( resourceFile ); - - resourceFile->Append( KLocUtilsRscFile ); - - TFileName* dllDrive = new( ELeave ) TFileName; - CleanupStack::PushL( dllDrive ); - Dll::FileName( *dllDrive ); - - LocFileUtils::GetFileWithCorrectDriveL( *dllDrive, *resourceFile ); - iResourceOffset = iEnv->AddResourceFileL( *resourceFile ); - - CleanupStack::PopAndDestroy( 2, resourceFile ); + // Nothing to do. } - -// --------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::ResolveRequestorNameL -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::ResolveRequestorNameL( - CPosRequestor& aRequestor ) - { - // There are 2 types of Requestors - // 1. Contact - // 2. Service and - // There are 9 types of Requestor id Formats - // 1. Generic Name - // 2. Phone Number - // 3. URL - // 4. E-mail - // 5. SIP URL - // 6. IMS Public Identity - // 7. MIN - // 8. MDN - // 9. Unknown - // The following are the different cases for resolving. - - switch(aRequestor.RequestorIdFormat()) - { - case CPosRequestor::EIdFormatGenericName: - // The requestor is identified by name. - // Hence there is no need to change the requestor String. - // So complete the resolving operation for this requestor. - iState = KResolveRequestor; - // Increment the count of resolved requestors. - iCount++; - ScheduleAORun(); - break; - - case CPosRequestor::EIdFormatPhoneNumber: - ResolveRequestorByPhoneNumberL(aRequestor); - break; - - case CPosRequestor::EIdFormatUrl: - { - // The requestor is identified by URL. - CVPbkFieldTypeRefsList* fieldTypeList = - CVPbkFieldTypeRefsList::NewL(); - CleanupStack::PushL(fieldTypeList); - - const MVPbkFieldTypeList& fieldTypes = - iPbkContactEngine->FieldTypes(); - - // create last name field to the contact - TResourceReader reader; - iEnv->CreateResourceReaderLC(reader, - R_VPBK_URL_SELECTOR); - CVPbkFieldTypeSelector* urlSelector = - CVPbkFieldTypeSelector::NewL(reader, fieldTypes); - CleanupStack::PushL(urlSelector); - - for (TInt i = 0; i < fieldTypes.FieldTypeCount(); ++i) - { - const MVPbkFieldType& fieldType = fieldTypes.FieldTypeAt(i); - if (urlSelector->IsFieldTypeIncluded(fieldType)) - { - fieldTypeList->AppendL(fieldType); - break; - } - } - - // urlSelector, R_VPBK_URL_SELECTOR buffer - CleanupStack::PopAndDestroy(2); - - ResolveRequestorByOtherFieldsL( aRequestor, fieldTypeList ); - CleanupStack::PopAndDestroy(fieldTypeList); - } - break; - - case CPosRequestor::EIdFormatEmail: - { - CVPbkFieldTypeRefsList* fieldTypeList = - CVPbkFieldTypeRefsList::NewL(); - CleanupStack::PushL(fieldTypeList); - - const MVPbkFieldTypeList& fieldTypes = - iPbkContactEngine->FieldTypes(); - - // create last name field to the contact - TResourceReader reader; - iEnv->CreateResourceReaderLC(reader, - R_VPBK_EMAIL_SELECTOR); - CVPbkFieldTypeSelector* emailSelector = - CVPbkFieldTypeSelector::NewL(reader, fieldTypes); - CleanupStack::PushL(emailSelector); - - for (TInt i = 0; i < fieldTypes.FieldTypeCount(); ++i) - { - const MVPbkFieldType& fieldType = fieldTypes.FieldTypeAt(i); - if (emailSelector->IsFieldTypeIncluded(fieldType)) - { - fieldTypeList->AppendL(fieldType); - break; - } - } - - // emailSelector, R_VPBK_EMAIL_SELECTOR buffer - CleanupStack::PopAndDestroy(2); - - ResolveRequestorByOtherFieldsL( aRequestor, fieldTypeList ); - CleanupStack::PopAndDestroy(fieldTypeList); - } - break; - - case CPosRequestor::EIdFormatSIPUrl: - { - CVPbkFieldTypeRefsList* fieldTypeList = - CVPbkFieldTypeRefsList::NewL(); - CleanupStack::PushL(fieldTypeList); - - const MVPbkFieldTypeList& fieldTypes = - iPbkContactEngine->FieldTypes(); - - // create last name field to the contact - TResourceReader reader; - iEnv->CreateResourceReaderLC(reader, - R_VPBK_SIPURL_SELECTOR); - CVPbkFieldTypeSelector* sipUrlSelector = - CVPbkFieldTypeSelector::NewL(reader, fieldTypes); - CleanupStack::PushL(sipUrlSelector); - - for (TInt i = 0; i < fieldTypes.FieldTypeCount(); ++i) - { - const MVPbkFieldType& fieldType = fieldTypes.FieldTypeAt(i); - if (sipUrlSelector->IsFieldTypeIncluded(fieldType)) - { - fieldTypeList->AppendL(fieldType); - break; - } - } - - // sipUrlSelector, R_VPBK_SIPURL_SELECTOR buffer - CleanupStack::PopAndDestroy(2); - - ResolveRequestorByOtherFieldsL( aRequestor, fieldTypeList ); - CleanupStack::PopAndDestroy(fieldTypeList); - } - break; - - case CPosRequestor::EIdFormatIMSPublicIdentity: - case CPosRequestor::EIdFormatMIN: - case CPosRequestor::EIdFormatMDN: - // In this case we match by any field in the Contacts - { - const MVPbkFieldTypeList& gblFieldTypeList = - iPbkContactEngine->FieldTypes(); - - ResolveRequestorByOtherFieldsL( aRequestor, - const_cast(&gblFieldTypeList) ); - } - break; - - default: - // If the requestor format is unknown then it won't be resolved. - // This case is for any future additions to the format types. - // Nothing to do here as of now. - // So complete the resolving operation for this requestor. - iState = KResolveRequestor; - // Increment the count of resolved requestors. - iCount++; - ScheduleAORun(); - break; - } - } - - -// --------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::ResolveRequestorByPhoneNumberL -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::ResolveRequestorByPhoneNumberL( - CPosRequestor& aRequestor ) - { - - // The requestor is identified by Phone Number. - // Use the MatchPhoneNumberL of CPbkPhoneEngine - iCntsOperation = iPbkContactEngine->MatchPhoneNumberL( - aRequestor.RequestorIdString(), - KMaxPhoneMatchLength, - *this); - } - - -// --------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::ResolveRequestorByOtherFieldsL -// Searches the Contacts Database Synchronously using the field and -// information specified in the requestor. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::ResolveRequestorByOtherFieldsL( - CPosRequestor& aRequestor, - MVPbkFieldTypeList* aFieldTypeList) - { - // If the format is URL or E-mail etc then use FindL of CVPbkContactManager - iCntsOperation = iPbkContactEngine->FindL(aRequestor.RequestorIdString(), - *aFieldTypeList, - *this); - } - - -// --------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::SetContactNameToRequestor -// --------------------------------------------------------------------------- -// - -void CLocRequestorUtilsResolver::SetContactNameToRequestorL( - TInt aCntLinkArrayIndex) - { - iCntsOperation = iPbkContactEngine->RetrieveContactL( - iCntLinkArray->At(aCntLinkArrayIndex), - *this); - } - - -// --------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::ScheduleAORun -// Schedule to Run this dummy Active Object once again. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::ScheduleAORun() - { - // This results in the RunL getting called. - if ( !IsActive() ) - { - SetActive(); - TRequestStatus* status = &iStatus; - User::RequestComplete(status, KErrNone); - } - } - - -// --------------------------------------------------------------------------- -// CLocRequestorUtilsResolver::ScheduleAORun -// Schedule to Run this dummy Active Object once again. -// --------------------------------------------------------------------------- -// -void CLocRequestorUtilsResolver::CompleteRequest() - { - // Stop the ActiveScheduler Wait Loop to complete the requestor resolving - // operation. - iWait.AsyncStop(); - } - - // End of File diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locverifier/inc/lpdperiodicprocessor.h --- a/locationsystemui/locationsysui/locverifier/inc/lpdperiodicprocessor.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locverifier/inc/lpdperiodicprocessor.h Fri Apr 16 15:23:31 2010 +0300 @@ -20,8 +20,7 @@ #define CLPDPERIODICPROCESSOR_H // INCLUDES -#include -#include +#include #include #include "lpdsuplsettingsadapterobserver.h" diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locverifier/inc/lpdperiodicreqinfo.h --- a/locationsystemui/locationsysui/locverifier/inc/lpdperiodicreqinfo.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locverifier/inc/lpdperiodicreqinfo.h Fri Apr 16 15:23:31 2010 +0300 @@ -20,7 +20,7 @@ #define CLPDPERIODICREQINFO_H #include -#include +#include /** * Periodic info structure to Que. diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locverifier/inc/lpdquerylauncherbase.h --- a/locationsystemui/locationsysui/locverifier/inc/lpdquerylauncherbase.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locverifier/inc/lpdquerylauncherbase.h Fri Apr 16 15:23:31 2010 +0300 @@ -25,7 +25,7 @@ #include #include #include -#include +#include // SYSTEM INCLUDE diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locverifier/inc/lpdverifierplugin.h --- a/locationsystemui/locationsysui/locverifier/inc/lpdverifierplugin.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locverifier/inc/lpdverifierplugin.h Fri Apr 16 15:23:31 2010 +0300 @@ -18,7 +18,7 @@ // INCLUDES -#include +#include #include #include diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/locverifier/src/lpdrequestorprocessor.cpp --- a/locationsystemui/locationsysui/locverifier/src/lpdrequestorprocessor.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationsystemui/locationsysui/locverifier/src/lpdrequestorprocessor.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -25,7 +25,7 @@ #include #include #include -#include +#include // CONSTANTS _LIT( KUnknownRequestor, "Unknown" ); diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/BWINS/EPOSPRVQNIFU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/BWINS/EPOSPRVQNIFU.DEF Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,20 @@ +EXPORTS + ??0CPosPrivacyNotifier@@IAE@XZ @ 1 NONAME ; CPosPrivacyNotifier::CPosPrivacyNotifier(void) + ??1CPosPrivacyNotifier@@UAE@XZ @ 2 NONAME ; CPosPrivacyNotifier::~CPosPrivacyNotifier(void) + ?BaseConstructL@CPosPrivacyNotifier@@IAEXVTUid@@H@Z @ 3 NONAME ; void CPosPrivacyNotifier::BaseConstructL(class TUid, int) + ?CancelReason@CPosPrivacyNotifier@@QBE?AW4TPosVerifyCancelReason@@XZ @ 4 NONAME ; enum TPosVerifyCancelReason CPosPrivacyNotifier::CancelReason(void) const + ?CheckClientSecureId@CPosPrivacyNotifier@@QAEHVTSecureId@@@Z @ 5 NONAME ; int CPosPrivacyNotifier::CheckClientSecureId(class TSecureId) + ?CompleteAllRequests@CPosPrivacyNotifier@@QAEXH@Z @ 6 NONAME ; void CPosPrivacyNotifier::CompleteAllRequests(int) + ?CompleteRequest@CPosPrivacyNotifier@@QAEXJH@Z @ 7 NONAME ; void CPosPrivacyNotifier::CompleteRequest(long, int) + ?CurrentRequest@CPosPrivacyNotifier@@QBEJXZ @ 8 NONAME ; long CPosPrivacyNotifier::CurrentRequest(void) const + ?GetRequestsL@CPosPrivacyNotifier@@QBEXAAV?$RArray@J@@@Z @ 9 NONAME ; void CPosPrivacyNotifier::GetRequestsL(class RArray &) const + ?LocationRequestDecision@CPosPrivacyNotifier@@QBE?AW4TPosRequestDecision@@XZ @ 10 NONAME ; enum TPosRequestDecision CPosPrivacyNotifier::LocationRequestDecision(void) const + ?NotificationReason@CPosPrivacyNotifier@@QBE?AW4TPosNotificationReason@@XZ @ 11 NONAME ; enum TPosNotificationReason CPosPrivacyNotifier::NotificationReason(void) const + ?NotifierBase@CPosPrivacyNotifier@@QBEPAVMEikSrvNotifierBase2@@XZ @ 12 NONAME ; class MEikSrvNotifierBase2 * CPosPrivacyNotifier::NotifierBase(void) const + ?QueryTimeoutStrategy@CPosPrivacyNotifier@@QBE?AW4TPosRequestDecision@@XZ @ 13 NONAME ; enum TPosRequestDecision CPosPrivacyNotifier::QueryTimeoutStrategy(void) const + ?RequestSource@CPosPrivacyNotifier@@QBE?AW4TPosRequestSource@@XZ @ 14 NONAME ; enum TPosRequestSource CPosPrivacyNotifier::RequestSource(void) const + ?RequestTypeL@CPosPrivacyNotifier@@QBE?AW4TRequestType@1@J@Z @ 15 NONAME ; enum CPosPrivacyNotifier::TRequestType CPosPrivacyNotifier::RequestTypeL(long) const + ?RequestorCountL@CPosPrivacyNotifier@@QBEHXZ @ 16 NONAME ; int CPosPrivacyNotifier::RequestorCountL(void) const + ?RequestorLC@CPosPrivacyNotifier@@QBEPAVCPosRequestor@@H@Z @ 17 NONAME ; class CPosRequestor * CPosPrivacyNotifier::RequestorLC(int) const + ?SetCurrentRequestL@CPosPrivacyNotifier@@QAEXJ@Z @ 18 NONAME ; void CPosPrivacyNotifier::SetCurrentRequestL(long) + diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/EABI/eposprvqnifU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/EABI/eposprvqnifU.DEF Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,24 @@ +EXPORTS + _ZN19CPosPrivacyNotifier14BaseConstructLE4TUidi @ 1 NONAME + _ZN19CPosPrivacyNotifier15CompleteRequestEli @ 2 NONAME + _ZN19CPosPrivacyNotifier18SetCurrentRequestLEl @ 3 NONAME + _ZN19CPosPrivacyNotifier19CheckClientSecureIdE9TSecureId @ 4 NONAME + _ZN19CPosPrivacyNotifier19CompleteAllRequestsEi @ 5 NONAME + _ZN19CPosPrivacyNotifierC2Ev @ 6 NONAME + _ZN19CPosPrivacyNotifierD0Ev @ 7 NONAME + _ZN19CPosPrivacyNotifierD1Ev @ 8 NONAME + _ZN19CPosPrivacyNotifierD2Ev @ 9 NONAME + _ZNK19CPosPrivacyNotifier11RequestorLCEi @ 10 NONAME + _ZNK19CPosPrivacyNotifier12CancelReasonEv @ 11 NONAME + _ZNK19CPosPrivacyNotifier12GetRequestsLER6RArrayIlE @ 12 NONAME + _ZNK19CPosPrivacyNotifier12NotifierBaseEv @ 13 NONAME + _ZNK19CPosPrivacyNotifier12RequestTypeLEl @ 14 NONAME + _ZNK19CPosPrivacyNotifier13RequestSourceEv @ 15 NONAME + _ZNK19CPosPrivacyNotifier14CurrentRequestEv @ 16 NONAME + _ZNK19CPosPrivacyNotifier15RequestorCountLEv @ 17 NONAME + _ZNK19CPosPrivacyNotifier18NotificationReasonEv @ 18 NONAME + _ZNK19CPosPrivacyNotifier20QueryTimeoutStrategyEv @ 19 NONAME + _ZNK19CPosPrivacyNotifier23LocationRequestDecisionEv @ 20 NONAME + _ZTI19CPosPrivacyNotifier @ 21 NONAME ; ## + _ZTV19CPosPrivacyNotifier @ 22 NONAME ; ## + diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/group/EPos_PrivacyQNInterface.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/group/EPos_PrivacyQNInterface.mmp Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for handling SUPL_INIT message. +* +*/ + + + +TARGET eposprvqnif.dll +TARGETTYPE dll +UID 0x1000008d 0x101f7a88 + +VENDORID 0x70000001 +CAPABILITY ALL -TCB + +SOURCEPATH ../src +SOURCE EPos_CPosPrivacyNotifier.cpp +SOURCE EPos_CPosPrivacyNotifierExtension.cpp +SOURCE EPos_CPosRequestHandler.cpp + +USERINCLUDE ../inc + +MW_LAYER_SYSTEMINCLUDE_SYMBIAN + +LIBRARY euser.lib +LIBRARY estor.lib +LIBRARY eiksrv.lib +LIBRARY eposprvtyp.lib + +SMPSAFE diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/group/bld.inf Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,26 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for handling SUPL_INIT message. +* +*/ + +#include + +PRJ_MMPFILES +EPos_PrivacyQNInterface.mmp + +PRJ_EXPORTS +./lbsqueryandnotification.iby CORE_MW_LAYER_IBY_EXPORT_PATH(lbsqueryandnotification.iby) + +// End of file diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/group/lbsqueryandnotification.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/group/lbsqueryandnotification.iby Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,29 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for handling SUPL_INIT message. +* +*/ +#ifndef __LBS_QUERYANDNOTIFICATION_IBY__ +#define __LBS_QUERYANDNOTIFICATION_IBY__ + + +REM LBS Query And Notification Api + +#if !defined(SYMBIAN_EXCLUDE_LOCATION) && defined(SYMBIAN_INCLUDE_LOCATION_ADVANCED_DIALOG) + +file=ABI_DIR\DEBUG_DIR\eposprvqnif.dll System\libs\eposprvqnif.dll + +#endif // SYMBIAN_EXCLUDE_LOCATION && SYMBIAN_INCLUDE_LOCATION_ADVANCED_DIALOG + +#endif diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosPrivacyNotifierExtension.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosPrivacyNotifierExtension.h Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,204 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for privacy notifier extension helper. +* +*/ + + + + +/** + @file + @internalComponent + @released +*/ + +#ifndef CPOSPRIVACYNOTIFIEREXTENSION_H +#define CPOSPRIVACYNOTIFIEREXTENSION_H + +// INCLUDES +#include +#include +#include +#include +// FORWARD DECLARATIONS +class CPosRequestHandler; + +// CLASS DECLARATION + +/** +* The privacy notifier extension helper class. +*/ +NONSHARABLE_CLASS(CPosPrivacyNotifierExtension) : public CBase, public MEikSrvNotifierBase2 + { + public: + + /** + * Two-phased constructor. + */ + static CPosPrivacyNotifierExtension* NewL( + CPosPrivacyNotifier* aPrivNotifier); + + /** + * Destructor. + */ + ~CPosPrivacyNotifierExtension(); + + public: // New functions + + /** + * Finds the request id in the array which matches the specified + * request id. + * @param aRequestId The id of a query or notification request. + * @return The index of the matching request id within the array. + * KErrNotFound, if no matching request id can be found. + */ + TInt Find(TPosQNRequestId aRequestId) const; + + /** + * Resets data + */ + void ResetData(); + + /** + * Removes a request from the array containing all outstanding requests. + * @param aRequestId The id of a query or notification request. + * @return The index of the matching request id within the array. + * KErrNotFound, if no matching request id can be found. + */ + TInt RemoveRequestFromArray(TPosQNRequestId aRequestId); + + /** + * Empties the array containing all outstanding requests. + */ +// void RemoveAllRequestsFromArray(); + + /** + * Prepares the current request by getting RequestorStack. + */ + void PrepareL(TPosQNRequestId aRequestId); + + /** + * This method completes a privacy query or notification request. + * + * @param aRequestId The id of the privacy query or notification request + * to complete. + * @param aCompletionCode The request completion code. + */ + void CompleteRequest( + /* IN */ TPosQNRequestId aRequestId, + /* IN */ TInt aCompletionCode + ); + + /** + * This method completes all outstanding requests. + * + * This function should be used if a serious error is encountered. All + * requests can then be completed with the same error code. + * + * @param aCompletionCode The request completion code. + */ + void CompleteAllRequests( + /* IN */ TInt aCompletionCode + ); + + public: // Functions from base classes + + /** + * From MEikSrvNotifierBase2 Called to destroy notifier. + */ + void Release(); + + /** + * From MEikSrvNotifierBase2 Called when the DLL is loaded. + * @return info object containing UID, channel and priority + */ + TNotifierInfo RegisterL(); + + /** + * From MEikSrvNotifierBase2 + * @return info object containing UID, channel and priority + */ + TNotifierInfo Info() const; + + /** + * From MEikSrvNotifierBase2 + * + * Not supported, leaves if called. + * @param aBuffer Input descriptor. Not used. + * @return TPtrC8 + */ + TPtrC8 StartL(const TDesC8& aBuffer); + + /** + * From MEikSrvNotifierBase2 + * + * @param aBuffer Input descriptor, contains the format. Not used. + * @param aReplySlot Reply slot. Not used. + * @param aMessage Used to write data back to client + */ + void StartL( + const TDesC8& aBuffer, + TInt aReplySlot, + const RMessagePtr2& aMessage + ); + + /** + * From MEikSrvNotifierBase2 + * Cancels all outstanding requests. + */ + void Cancel(); + + /** + * From MEikSrvNotifierBase2 + * Starts the notifier dialog. + * @param aBuffer Input descriptor, contains the format. + * A TPosQNInputData is expected as input. + * @return TPtrC8 + */ + TPtrC8 UpdateL(const TDesC8& aBuffer); + + private: + /** + * C++ default constructor. + */ + CPosPrivacyNotifierExtension(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL(CPosPrivacyNotifier* aPrivNotifier); + + // By default, prohibit copy constructor + CPosPrivacyNotifierExtension(const CPosPrivacyNotifierExtension&); + // Prohibit assigment operator + CPosPrivacyNotifierExtension& operator= ( + const CPosPrivacyNotifierExtension&); + + public: // Data + TNotifierInfo iNotifierInfo; + RArray iRequestArray; + TPosQNRequestId iCurrentRequestId; + RPosRequestorStack iRequestorStack; + RMessagePtr2 iMessage; + + private: // Data + CPosPrivacyNotifier* iPrivacyNotifier; + CPosRequestHandler* iRequestHandler; + + }; + +#endif // CPOSPRIVACYNOTIFIEREXTENSION_H + +// End of File diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosRequestHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosRequestHandler.h Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,107 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for privacy notifier request handling helper. +* +*/ + + + + +/** + @file + @internalComponent + @released +*/ + +#ifndef EPOS_CPOSREQUESTHANDLER_H +#define EPOS_CPOSREQUESTHANDLER_H + +// INCLUDES +#include +#include +#include + +// FORWARD DECLARATIONS +class CPosPrivacyNotifier; + +// CLASS DECLARATION + +/** +* The privacy notifier request handling helper class. +*/ +NONSHARABLE_CLASS(CPosRequestHandler) : public CActive + { + public: // Constructors and destructors + + /** + * Two-phased constructor. + */ + static CPosRequestHandler* NewL( + CPosPrivacyNotifier* aNotifier, + CPosPrivacyNotifierExtension* aExtension); + + /** + * Destructor. + */ + ~CPosRequestHandler(); + + public: // New functions + + /** + * Starts the active scheduler. + * @param aInputData Data containing update parameters. + */ + void ScheduleRequest(const TPosQNInputData& aInputData); + + protected: // Functions from base classes + + /** + * From CActive. + */ + void RunL(); + + /** + * From CActive. + */ + void DoCancel(); + + /** + * From CActive. + */ + TInt RunError(TInt aError); + + private: + + /** + * Private C++ default constructor. + */ + CPosRequestHandler(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL( + CPosPrivacyNotifier* aNotifier, + CPosPrivacyNotifierExtension* aExtension); + + private: // Data + + CPosPrivacyNotifier* iPrivacyNotifier; + CPosPrivacyNotifierExtension* iExtension; + TPosQNInputData iInputData; + +}; + +#endif // EPOS_CPOSREQUESTHANDLER_H + diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifier.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifier.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,490 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for LBS Privacy Query & Notify (Q&N) privacy notifiers. +* +*/ + + + +#include +#include +#include +#include +#include "EPos_CPosPrivacyNotifierExtension.h" + +#if defined(NRH_UNIT_TEST) +// For the NRH unit test, use a custom notifier UID. +// This is so that we can have both the unit test +// Q&N notifier and the integration test Q&N notifier +// (using the real UID) in the same ROM. +const TUid KNotifierUid = { 0x10283744 }; +#else +const TUid KNotifierUid = { KPosPrivacyNotifierImplUid }; +#endif // NRH_UNIT_TEST + + +// --------------------------------------------------------------------------- +/** +Default constructor. + +This constructor assumes that the notifier only supports +EBasicCapabilities, i.e. the notifier supports queries but only +notifications of accepted requests are supported. If the notifier +is more advanced, the overloaded constructor should be used. +*/ +EXPORT_C CPosPrivacyNotifier::CPosPrivacyNotifier() + { + } + +// --------------------------------------------------------------------------- +/** +Symbian 2nd phase constructor. Must be called first thing during construction. + +The notifier must specify channel and priority. These attributes are +defined by the Notifier Framework in eiknotapi.h. + +The different priority values are defined in +MEikSrvNotifierBase2::TNotifierPriority. + +@param aChannel A channel. See definition in Notifier Framework. +@param aPriority A notifier priority. See definition in Notifier Framework. + +@see MEikSrvNotifierBase2::TNotifierPriority +*/ +EXPORT_C void CPosPrivacyNotifier::BaseConstructL( + TUid aChannel, + TInt aPriority) + { + iExtension = CPosPrivacyNotifierExtension::NewL(this); + iExtension->iNotifierInfo.iChannel = aChannel; + iExtension->iNotifierInfo.iPriority = aPriority; + iExtension->iNotifierInfo.iUid = KNotifierUid; + } + +// --------------------------------------------------------------------------- +EXPORT_C CPosPrivacyNotifier::~CPosPrivacyNotifier() + { + delete iExtension; + } + +// --------------------------------------------------------------------------- +/** +Retrieves a handle to the notifier base. + +This handle is needed to populate the notifier base array in the +notifier factory method. + +@return A handle to the notifier base. +*/ +EXPORT_C MEikSrvNotifierBase2* CPosPrivacyNotifier::NotifierBase() const + { + return iExtension; + } + +// --------------------------------------------------------------------------- +/** +Retrieves the cancel reason. + +Cancel reason can only be retrieved when HandleRequestCancelled or +HandleAllRequestCancelled is running. If the method is called at another +time, it will return ECancelReasonNotAvailable. + +Note that the TCancelReason enum is designed to be extendable, +i.e. new values may be added in the future. This means that any +unrecognized value must be treated like ECancelReasonNotAvailable. + +@return The cancel reason. + +@see HandleRequestCancelled() +@see HandleAllRequestCancelled() +@see ECancelReasonNotAvailable +@see TCancelReason +*/ +EXPORT_C TPosVerifyCancelReason + CPosPrivacyNotifier::CancelReason() const + { + TPosQNRequestId requestId = CurrentRequest(); + TInt index = iExtension->Find(requestId); + + if (index == KErrNotFound) + { + return EPosCancelReasonNotAvailable; + } + + return iExtension->iRequestArray[index].iCancelReason; + } + +// --------------------------------------------------------------------------- +/** +Returns a list of all outstanding privacy query and notification requests. + +If there are no outstanding requests, an empty array will be returned. + +@param aRequestArray On return, this array will contain all + outstanding query and notification requests. +*/ +EXPORT_C void CPosPrivacyNotifier::GetRequestsL( + RArray& aRequestArray) const + { + aRequestArray.Reset(); + for (TInt i = 0; i < iExtension->iRequestArray.Count(); i++) + { + User::LeaveIfError( + aRequestArray.Append(iExtension->iRequestArray[i].iId)); + } + } + +// --------------------------------------------------------------------------- +/** +Checks whether a request is privacy query or notification type. + +@param aRequestId The ID of the request to check. +@return @p EQuery if query type and ENotification if notification type. + +@leave If the specified request is not an outstanding request, this method + will leave with error code KErrNotFound. +*/ +EXPORT_C CPosPrivacyNotifier::TRequestType CPosPrivacyNotifier::RequestTypeL( + TPosQNRequestId aRequestId) const + { + TInt index = iExtension->Find(aRequestId); + __ASSERT_ALWAYS(index != KErrNotFound, User::Leave(KErrNotFound)); + + if (iExtension->iRequestArray[index].iType == + TPosQNInputData::EQuery) + { + return CPosPrivacyNotifier::EQuery; + } + + return CPosPrivacyNotifier::ENotification; + } + +// --------------------------------------------------------------------------- +/** +Sets the request which the notifier wants to read information about. + +Current request specifies the request which will be accessed when +RequestorCountL and RequestorLC are called. + +@param aRequestId The ID of the current request. + +@leave If the specified request is not an outstanding request, this method + will leave with error code KErrNotFound. +*/ +EXPORT_C void CPosPrivacyNotifier::SetCurrentRequestL( + TPosQNRequestId aRequestId) + { + iExtension->PrepareL(aRequestId); + } + +// --------------------------------------------------------------------------- +/** +Returns the ID of the current request. + +Current request specifies the request which will be accessed when +RequestorCountL and RequestorLC are called. + +@return The ID of the current request. If the current request has + become invalid, e.g. the request set as current has been cancelled, + KPosNullQNRequestId will be returned. + +@see RequestorCountL() +@see RequestorLC() +*/ +EXPORT_C TPosQNRequestId CPosPrivacyNotifier::CurrentRequest() const + { + return iExtension->iCurrentRequestId; + } + +// --------------------------------------------------------------------------- +/** +Retrieves the timeout strategy for a query. + +Timeout strategy specifies what the decision will be if the +verification query times out. The decision is either +EPosDecisionRejected or EPosDecisionAccepted. + +Before calling this method, current request must first be set by +calling SetCurrentRequestL. + +Timeout strategy can only be retrieved for a query request. If the +current request is a notification, this method will return +EPosDecisionNotAvailable. + +Note that the TPosRequestDecision enum is designed to be +extendable, i.e. new values may be added in the future. This means +that any unrecognized value must be treated like +EPosDecisionNotAvailable. + +@return The timeout strategy. + +@see SetCurrentRequestL() +*/ +EXPORT_C TPosRequestDecision CPosPrivacyNotifier::QueryTimeoutStrategy() const + { + TPosQNRequestId requestId = CurrentRequest(); + TInt index = iExtension->Find(requestId); + + if (index == KErrNotFound || + iExtension->iRequestArray[index].iType == + TPosQNInputData::ENotification) + { + return EPosDecisionNotAvailable; + } + + return iExtension->iRequestArray[index].iTimeoutStrategy; + } + +// --------------------------------------------------------------------------- +/** +Retrieves the source of the location request. + +Before calling this method, current request must first be set by +calling SetCurrentRequestL. + +Note that the TPosRequestSource enum is designed to be extendable, +i.e. new values may be added in the future. This means that any +unrecognized value must be treated like EPosRequestSourceNotAvailable. + +@return The request source, e.g. EPosRequestSourceNetwork or + EPosRequestSourceNotAvailable if the request source is not specified. + +@see SetCurrentRequestL() +@see TPosRequestSource +*/ +EXPORT_C TPosRequestSource CPosPrivacyNotifier::RequestSource() const + { + TPosQNRequestId requestId = CurrentRequest(); + TInt index = iExtension->Find(requestId); + + if (index == KErrNotFound) + { + return EPosRequestSourceNotAvailable; + } + + return iExtension->iRequestArray[index].iRequestSource; + } + +// --------------------------------------------------------------------------- +/** +Retrieves whether the location request was accepted or rejected. + +For notification requests, this method will return the request +decision. For queries, this method will return EPosDecisionNotAvailable. + +Before calling this method, current request must first be set by +calling SetCurrentRequestL, otherwise this method will return +EPosDecisionNotAvailable. + +Note that the TPosRequestDecision enum is designed to be +extendable, i.e. new values may be added in the future. +This means that any unrecognized value must be treated like +EPosDecisionNotAvailable. + +@return Whether the location request was accepted or rejected, or + EPosDecisionNotAvailable if the outcome has not yet been decided. + +@see SetCurrentRequestL() +@see TPosRequestDecision +*/ +EXPORT_C TPosRequestDecision + CPosPrivacyNotifier::LocationRequestDecision() const + { + TPosQNRequestId requestId = CurrentRequest(); + TInt index = iExtension->Find(requestId); + + if (index == KErrNotFound || + iExtension->iRequestArray[index].iType == TPosQNInputData::EQuery) + { + return EPosDecisionNotAvailable; + } + + return iExtension->iRequestArray[index].iRequestDecision; + } + +// --------------------------------------------------------------------------- +/** +Retrieves the reason for a notification. + +Note that the TPosNotificationReason enum is designed to be +extendable, i.e. new values may be added in the future. This means +that any unrecognized value must be treated like +EPosNotificationReasonNotAvailable. +If the notification reason is not known, the notification request +should be completed with code KErrNotSupported. + +@return The notification reason. + For queries, this method will return EPosNotificationReasonNotAvailable. + + Before calling this method, current request must first be set by + calling SetCurrentRequestL, otherwise this method will return + EPosNotificationReasonNotAvailable. + +@see EPosNotificationReasonNotAvailable +@see SetCurrentRequestL() +@see TPosNotificationReason +*/ +EXPORT_C TPosNotificationReason CPosPrivacyNotifier::NotificationReason() const + { + TPosQNRequestId requestId = CurrentRequest(); + TInt index = iExtension->Find(requestId); + + if (index == KErrNotFound || + iExtension->iRequestArray[index].iType == TPosQNInputData::EQuery) + { + return EPosNotificationReasonNotAvailable; + } + + return iExtension->iRequestArray[index].iNotificationReason; + } + +// --------------------------------------------------------------------------- +/** +Returns the number of requestors in the current request. + +Before calling this method, current request must first be set by +calling SetCurrentRequestL. + +@return The number of requestors in the current request. + +@leave If the current request has not been set or the current request is no + longer valid, e.g. because it has been cancelled or completed, this + method will leave with error code KErrNotFound. + +@see SetCurrentRequestL() +*/ +EXPORT_C TInt CPosPrivacyNotifier::RequestorCountL() const + { + __ASSERT_ALWAYS(CurrentRequest() != KPosNullQNRequestId, + User::Leave(KErrNotFound)); + + return iExtension->iRequestorStack.Count(); + } + +// --------------------------------------------------------------------------- +/** +Returns basic information about the requestor at a specified index. + +Before calling this method, current request must first be set by +calling SetCurrentRequestL. + +Whether the requestor is a contact or a service can be found by +calling CPosRequestor::RequestorType. + +If the requestor is a contact, the requestor object can be cast to +CPosContactRequestor. + +If the requestor is a service, the requestor object can be cast to +CPosServiceRequestor. + +@param aRequestorIndex The index of the requestor. +@return Information about the requestor. + +@leave If the specified requestor index is not valid, i.e. less than 0 or + larger than or equal to RequestorCountL, this method will + leave with error code KErrArgument. + + If the current request has not been set or the current request is no + longer valid, e.g. because it has been cancelled or completed, this method + will leave with error code KErrNotFound. + +@see SetCurrentRequestL() +@see RequestorCountL() +@see CPosContactRequestor +@see CPosServiceRequestor +@see CPosRequestor::RequestorType +*/ +EXPORT_C CPosRequestor* CPosPrivacyNotifier::RequestorLC( + TInt aRequestorIndex) const + { + __ASSERT_ALWAYS(CurrentRequest() != KPosNullQNRequestId, + User::Leave(KErrNotFound)); + + __ASSERT_ALWAYS(aRequestorIndex >= 0 && + aRequestorIndex < iExtension->iRequestorStack.Count(), + User::Leave(KErrArgument)); + + CPosRequestor* requestor = iExtension->iRequestorStack[aRequestorIndex]; + TInt type = requestor->RequestorType(); + CPosRequestor::TRequestorIdFormat format = requestor->RequestorIdFormat(); + TPtrC idString = requestor->RequestorIdString(); + + if (type == CPosRequestor::ERequestorService) + { + CPosServiceRequestor* serviceRequestor = CPosServiceRequestor::NewLC(format, idString); + serviceRequestor->SetRequestType(requestor->RequestType()); + serviceRequestor->SetNetworkType(requestor->NetworkType()); + return serviceRequestor; + } + + CPosContactRequestor* contactRequestor = CPosContactRequestor::NewLC(format, idString); + contactRequestor->SetRequestType(requestor->RequestType()); + contactRequestor->SetNetworkType(requestor->NetworkType()); + return contactRequestor; + } + +// --------------------------------------------------------------------------- +/** +This method completes a privacy query or notification request. + +@param aRequestId The ID of the privacy query or notification request + to complete. +@param aCompletionCode The request completion code. + If the request is a privacy query, the completion code should be one of: + - KErrNone if query is accepted by the phone user. + - KErrAccessDenied if query is rejected by the phone user. + - KErrTimedOut if the query times out. + + If the request is a privacy notification, the completion code should be one of: + - KErrNone if the phone user dismisses the privacy notification + - KErrTimedOut if the notification times out. +*/ +EXPORT_C void CPosPrivacyNotifier::CompleteRequest( + TPosQNRequestId aRequestId, + TInt aCompletionCode) + { + iExtension->CompleteRequest(aRequestId, aCompletionCode); + } + +// --------------------------------------------------------------------------- +/** +This method completes all outstanding requests. + +This method can be used to accept or reject all outstanding +requests by completing with codes @p KErrNone or @p KErrAccessDenied +respectively. All notification requests will also be completed with +this code. + +@param aCompletionCode The request completion code. +*/ +EXPORT_C void CPosPrivacyNotifier::CompleteAllRequests(TInt aCompletionCode) + { + iExtension->CompleteAllRequests(aCompletionCode); + } + +// --------------------------------------------------------------------------- +/** +Checks that the Privacy UI was launched by the expected client. + +The caller specifies the secure ID of the expected client and this +method returns whether the Privacy UI was launched by that client or not. + +@param aSecureId The secureID of the expected client +@return ETrue if the client that called the notifier is the expected client +*/ +#pragma message("NOTE: CPosPrivacyNotifier::CheckClientSecureId has no type/return definition.") +EXPORT_C TBool CPosPrivacyNotifier::CheckClientSecureId(TSecureId aSecureId) + { + return iExtension->iMessage.SecureId() == aSecureId; + } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifierExtension.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifierExtension.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,293 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +// INCLUDE FILES +#include +#include +#include +#include "EPos_CPosPrivacyNotifierExtension.h" +#include "EPos_CPosRequestHandler.h" + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CPosPrivacyNotifierExtension::CPosPrivacyNotifierExtension() + { + } + +// ----------------------------------------------------------------------------- +// CPosPrivacyNotifierExtension::ConstructL +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::ConstructL( + CPosPrivacyNotifier* aPrivNotifier) + { + iRequestHandler = CPosRequestHandler::NewL(aPrivNotifier, this); + iPrivacyNotifier = aPrivNotifier; + ResetData(); + } + +// Two-phased constructor +CPosPrivacyNotifierExtension* CPosPrivacyNotifierExtension::NewL( + CPosPrivacyNotifier* aPrivNotifier) + { + CPosPrivacyNotifierExtension* self = new (ELeave) + CPosPrivacyNotifierExtension; + CleanupStack::PushL(self); + self->ConstructL(aPrivNotifier); + CleanupStack::Pop(self); + return self; + } + +// Destructor +CPosPrivacyNotifierExtension::~CPosPrivacyNotifierExtension() + { + iRequestorStack.ResetAndDestroy(); + iRequestArray.Close(); + delete iRequestHandler; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::Find +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CPosPrivacyNotifierExtension::Find(TPosQNRequestId aRequestId) const + { + for (TInt index = 0; index < iRequestArray.Count(); index++) + { + if (iRequestArray[index].iId == aRequestId) + { + return index; + } + } + return KErrNotFound; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::ResetData +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::ResetData() + { + iRequestorStack.ResetAndDestroy(); + iCurrentRequestId = KPosNullQNRequestId; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::RemoveRequestFromArray +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CPosPrivacyNotifierExtension::RemoveRequestFromArray( + TPosQNRequestId aRequestId) + { + TInt index = Find(aRequestId); + if (index == KErrNotFound) + { + return KErrNotFound; + } + + iRequestArray.Remove(index); + return index; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::PrepareL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::PrepareL( + TPosQNRequestId aRequestId) + { + TInt index = Find(aRequestId); + __ASSERT_ALWAYS(index != KErrNotFound, User::Leave(KErrNotFound)); + + iCurrentRequestId = aRequestId; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::CompleteRequest +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::CompleteRequest( + TPosQNRequestId aRequestId, + TInt aCompletionCode) + { + TInt index = Find(aRequestId); + if (index != KErrNotFound) + { + if (iRequestArray[index].iType == TPosQNInputData::EQuery) + { + // A verification request and the requestor is expecting a response + iMessage.Complete(aCompletionCode); + } + else + { + // Intentionally empty. The request was for displaying a notification + // The requestor is not expecting a response + } + + iRequestArray.Remove(index); + ResetData(); + } + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::CompleteAllRequests +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::CompleteAllRequests(TInt aCompletionCode) + { + CompleteRequest(iCurrentRequestId, aCompletionCode); + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::Release +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::Release() + { + delete iPrivacyNotifier; + iPrivacyNotifier = NULL; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::RegisterL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +CPosPrivacyNotifierExtension::TNotifierInfo + CPosPrivacyNotifierExtension::RegisterL() + { + return iNotifierInfo; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::Info +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +CPosPrivacyNotifierExtension::TNotifierInfo + CPosPrivacyNotifierExtension::Info() const + { + return iNotifierInfo; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::StartL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +TPtrC8 CPosPrivacyNotifierExtension::StartL(const TDesC8& /*aBuffer*/) + { + return TPtrC8(); + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::StartL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::StartL( + const TDesC8& /*aBuffer*/, + TInt /*aReplySlot*/, + const RMessagePtr2& aMessage) + { + iMessage = aMessage; + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::Cancel +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosPrivacyNotifierExtension::Cancel() + { + if (iRequestArray.Count() > 0) + { + TPosQNRequestId reqId = iRequestArray[0].iId; + iPrivacyNotifier->HandleRequestCancelled(reqId); + CompleteRequest(reqId, KErrCancel); + } + } + +// --------------------------------------------------------- +// CPosPrivacyNotifierExtension::UpdateL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +TPtrC8 CPosPrivacyNotifierExtension::UpdateL(const TDesC8& aBuffer) + { + TPtrC8 tposQnData = aBuffer.Left(KPosQNInputDataClassSize); + + TPckgBuf input; + input.Copy(tposQnData); + TPosQNInputData update = input(); + + TInt index = Find(update.iId); + if (update.iCancelReason == EPosCancelReasonNotAvailable || + (update.iCancelReason == EPosCancelReasonTimeout && + update.iNotificationReason == EPosVerificationTimeout) ) + { + HBufC8* buf = HBufC8::NewLC(update.iDataSize); + TPtrC8 bufPtr = aBuffer.Mid(KPosQNInputDataClassSize); + + RDesReadStream stream(bufPtr); + CleanupClosePushL(stream); + iRequestorStack.InternalizeL(stream); + CleanupStack::PopAndDestroy(2, buf); //buf, stream + + User::LeaveIfError(iRequestArray.Append(update)); + iRequestHandler->ScheduleRequest(update); + } + else + { + if (index == KErrNotFound) + { + User::Leave(KErrArgument); + } + + iRequestArray[index].iCancelReason = update.iCancelReason; + } + + return TPtrC8(); + } + +// End of File diff -r 788b770ce3ae -r 3825cf2dc8c2 locationsystemui/locationsysui/queryandnotification/src/EPos_CPosRequestHandler.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationsystemui/locationsysui/queryandnotification/src/EPos_CPosRequestHandler.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,111 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for privacy notifier request handling helper. +* +*/ + + + +#include +#include "EPos_CPosRequestHandler.h" +#include "EPos_CPosPrivacyNotifierExtension.h" + +// ================= MEMBER FUNCTIONS ======================= + +// C++ default constructor can NOT contain any code, that +// might leave. +// +CPosRequestHandler::CPosRequestHandler() : + CActive(CActive::EPriorityHigh) + { + } + +// EPOC default constructor can leave. +void CPosRequestHandler::ConstructL( + CPosPrivacyNotifier* aNotifier, + CPosPrivacyNotifierExtension* aExtension) + { + iPrivacyNotifier = aNotifier; + iExtension = aExtension; + CActiveScheduler::Add(this); + } + +// Two-phased constructor. +CPosRequestHandler* CPosRequestHandler::NewL( + CPosPrivacyNotifier* aNotifier, + CPosPrivacyNotifierExtension* aExtension) + { + CPosRequestHandler* self = + new(ELeave) CPosRequestHandler; + CleanupStack::PushL(self); + self->ConstructL(aNotifier, aExtension); + CleanupStack::Pop(self); + return self; + } + +// Destructor +CPosRequestHandler::~CPosRequestHandler() + { + Cancel(); + } + +// --------------------------------------------------------- +// CPosRequestHandler::ScheduleRequest +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosRequestHandler::ScheduleRequest(const TPosQNInputData& aInputData) + { + iInputData = aInputData; + + SetActive(); + TRequestStatus* status = &iStatus; + User::RequestComplete(status, KErrNone); + } + +// --------------------------------------------------------- +// CPosRequestHandler::RunL +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosRequestHandler::RunL() + { + iPrivacyNotifier->HandleNewRequestL(iInputData.iId); + } + +// --------------------------------------------------------- +// CPosRequestHandler::DoCancel +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +void CPosRequestHandler::DoCancel() + { + } + +// --------------------------------------------------------- +// CPosRequestHandler::RunError +// +// (other items were commented in a header). +// --------------------------------------------------------- +// +TInt CPosRequestHandler::RunError(TInt aError) + { + iExtension->CompleteRequest(iInputData.iId, aError); + return KErrNone; + } + +// End of File diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/lbtmgmtui/data/lbtmgmtpluginview.rss --- a/locationtriggering/lbtmgmtui/data/lbtmgmtpluginview.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/lbtmgmtui/data/lbtmgmtpluginview.rss Fri Apr 16 15:23:31 2010 +0300 @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/lbtmgmtui/src/lbtmgmtdebug.cpp --- a/locationtriggering/lbtmgmtui/src/lbtmgmtdebug.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/lbtmgmtui/src/lbtmgmtdebug.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -50,6 +50,7 @@ // void Debug( TRefByValue aText, ... ) { + // coverity[var_decl : FALSE] VA_LIST args; VA_START( args, aText ); diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltcontainer/src/lbtcontainerareafilter.cpp --- a/locationtriggering/ltcontainer/src/lbtcontainerareafilter.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltcontainer/src/lbtcontainerareafilter.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -306,8 +306,7 @@ // Add rectangular filtering here. if(aEntry != NULL) { - CLbtTriggerEntry* trigEntry=aEntry->TriggerEntry(); - CLbtGeoRect* rectArea=static_cast(iArea); + CLbtGeoRect* rectArea=static_cast(iArea); TReal northLat,southLat,eastLong,westLong; rectArea->GetBorder(southLat,northLat,westLong,eastLong); CLbtExtendedTriggerInfo* contExtInfo = aEntry->ExtendedTriggerInfo(); diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltcontainer/src/lbtcontainertriggerentry.cpp --- a/locationtriggering/ltcontainer/src/lbtcontainertriggerentry.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltcontainer/src/lbtcontainertriggerentry.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -228,7 +228,7 @@ } else { - entry=CLbtStartupTrigger::NewL(); + // We use clone only for session triggers. } if(dynInfo!=NULL) diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltcontainer/src/lbtdbtriggersmanager.cpp --- a/locationtriggering/ltcontainer/src/lbtdbtriggersmanager.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltcontainer/src/lbtdbtriggersmanager.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -1367,7 +1367,13 @@ CompleteClientRequest( KErrServerBusy ); return; } - + + if( aFilter == NULL ) + { + CompleteClientRequest( KErrArgument ); + return; + } + // Check if this filter is application for the type of triggers supported by DB CLbtListTriggerOptions* options = aFilter->ListOptions(); if(options) @@ -1379,12 +1385,6 @@ } } - if( aFilter == NULL ) - { - CompleteClientRequest( KErrArgument ); - return; - } - // Store the parameters first for later references iFilter = aFilter; iTriggers = &aTriggers; @@ -2478,7 +2478,6 @@ if( !(aAttrMask & CLbtTriggerEntry::EAttributeCondition) ) { - CLbtTriggerConditionBase* condBase = clientEntry->GetCondition(); clientEntry->SetCondition(NULL); } @@ -2938,7 +2937,6 @@ CLbtExtendedTriggerInfo* extdInfo = iEntry->ExtendedTriggerInfo(); CLbtTriggerConditionArea* cond = static_cast(trigger->GetCondition()); CLbtGeoAreaBase * areaBase = cond->TriggerArea(); - CLbtGeoCircle* area = static_cast(cond->TriggerArea()); // Insert a Row in the View iView.InsertL(); // Insert a row. Column order matches sql select statement diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltcontainer/src/lbtramtriggersmanager.cpp --- a/locationtriggering/ltcontainer/src/lbtramtriggersmanager.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltcontainer/src/lbtramtriggersmanager.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -238,8 +238,6 @@ return; } - CLbtListTriggerOptions* listOptions=aFilter->ListOptions(); - // Store client data iFilter = aFilter; iClientSecurityPolicy = aSecurityPolicy; @@ -272,7 +270,6 @@ break; CLbtListTriggerOptions* listOptions = iFilter->ListOptions(); - CLbtContainerFilter* contFilter = iFilter->ContainerFilter(); CLbtExtendedTriggerInfo* contExtInfo = tEntry->ExtendedTriggerInfo(); TLbtTriggerDynamicInfoFieldsMask dynInfoMask; TLbtTriggerAttributeFieldsMask attrMask; @@ -281,7 +278,6 @@ ++count; if( !LbtContainerUtilities::RunSecurityPolicy( tEntry, iClientSecurityPolicy ) ) { - continue; } @@ -296,9 +292,10 @@ if(isFilterPresent > 0 && isEntryRequested) { entry = CLbtContainerTriggerEntry::NewL(); - CleanupStack::PushL( entry ); + iClientTriggerArray->Append( entry ); + clientEntry = CLbtSessionTrigger::NewL(); - entry->SetTriggerEntry(clientEntry); + entry->SetTriggerEntry( clientEntry ); if( attrMask & CLbtTriggerEntry::EAttributeId ) { @@ -324,10 +321,11 @@ { CLbtTriggerConditionArea* cond = static_cast(trigEntry->GetCondition()); // Condition area to be sent back to client - CLbtTriggerConditionArea* condArea=CLbtTriggerConditionArea::NewL(); + CLbtTriggerConditionArea* condArea=CLbtTriggerConditionArea::NewLC(); CLbtGeoAreaBase* area = LbtContainerUtilities::CopyGeoAreaL( cond->TriggerArea() ); condArea->SetTriggerArea( area ); condArea->SetDirection( cond->Direction() ); + CleanupStack::Pop( condArea ); clientEntry->SetCondition( condArea ); } @@ -352,6 +350,16 @@ info->iFiredLocality=tEntry->DynInfo()->iFiredLocality; } + if(isDynInfoPresent) + { + entry->SetDynInfo(info); + } + else + { + delete info; + } + + if( dataMask & CLbtContainerTriggerEntry::EContainerAttributeHysteresisRadius ) { if(clientExtInfo == NULL) @@ -419,19 +427,7 @@ { entry->SetExtendedTriggerInfo(clientExtInfo); } - - if(isDynInfoPresent) - { - entry->SetDynInfo(info); - } - - if( entry != NULL ) - { - iClientTriggerArray->Append( entry ); - CleanupStack::Pop( entry ); - } } - } if( tEntry == NULL ) @@ -645,93 +641,72 @@ CLbtTriggerEntry* trigEntry = iClientTriggerEntry->TriggerEntry(); CLbtExtendedTriggerInfo* trigExtInfo = iClientTriggerEntry->ExtendedTriggerInfo(); TLbtTriggerDynamicInfo* trigDynInfo = iClientTriggerEntry->DynInfo(); - + + // Append the modification information + MLbtTriggerStore::TLbtTriggerModifiedInfo info; + info.iTriggerId = entry->TriggerEntry()->Id(); + TSecureId sid = entry->ExtendedTriggerInfo()->OwnerSid(); + info.iOwner.iUid= (TInt)(sid.iId); + iIdArray.Append(info); /* contTrigEntry is the trigger entry which is a part of * the container trigger entry retrieved from the tree */ - CLbtSessionTrigger* contTrigEntry = static_cast (entry->TriggerEntry()); + CLbtSessionTrigger* contTrigEntry = NULL; + if( entry->TriggerEntry() ) + { + contTrigEntry = static_cast (entry->TriggerEntry()); + + CLbtTriggerConditionArea* condArea = static_cast (contTrigEntry->GetCondition()); + CLbtGeoAreaBase* geoArea = condArea->TriggerArea(); + info.iAreaType = geoArea->Type(); + } + else + { + contTrigEntry=CLbtSessionTrigger::NewL(); + entry->SetTriggerEntry( contTrigEntry ); + } /* Contextinfo is the extended information present in the entry * retrieved from the tree */ CLbtExtendedTriggerInfo* contExtInfo = entry->ExtendedTriggerInfo(); - TLbtTriggerDynamicInfo* contDynInfo = NULL; - contDynInfo = entry->DynInfo(); - - // Append the modification information - MLbtTriggerStore::TLbtTriggerModifiedInfo info; - info.iTriggerId = entry->TriggerEntry()->Id(); - CLbtTriggerConditionArea* condArea = static_cast (contTrigEntry->GetCondition()); - CLbtGeoAreaBase* geoArea = condArea->TriggerArea(); - info.iAreaType = geoArea->Type(); - TSecureId sid = entry->ExtendedTriggerInfo()->OwnerSid(); - info.iOwner.iUid= (TInt)(sid.iId); - iIdArray.Append(info); + TLbtTriggerDynamicInfo* contDynInfo = entry->DynInfo(); if(trigEntry!=NULL) { if( iAttrMask & CLbtTriggerEntry::EAttributeId ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } - contTrigEntry->SetId(trigEntry->Id()); + contTrigEntry->SetId(trigEntry->Id()); } if( iAttrMask & CLbtTriggerEntry::EAttributeName ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } contTrigEntry->SetNameL(trigEntry->Name()); } if( iAttrMask & CLbtTriggerEntry::EAttributeState ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } contTrigEntry->SetState(trigEntry->State()); } if( iAttrMask & CLbtTriggerEntry::EAttributeRearmTime ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } contTrigEntry->SetTimeToRearm((trigEntry->TimeToRearm())); } if( iAttrMask & CLbtTriggerEntry::EAttributeRequestor ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } //clientEntry->SetRequestorL(trigEntry->GetRequestor()); } if( iAttrMask & CLbtTriggerEntry::EAttributeManagerUi ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } contTrigEntry->SetManagerUi(trigEntry->ManagerUi()); } if( iAttrMask & CLbtTriggerEntry::EAttributeCondition ) { - if(contTrigEntry==NULL) - { - contTrigEntry=CLbtSessionTrigger::NewL(); - } - CLbtTriggerConditionArea* condArea = static_cast (contTrigEntry->GetCondition()); CLbtGeoAreaBase* geoArea = condArea->TriggerArea(); CLbtTriggerConditionArea* cond=static_cast (trigEntry->GetCondition()); @@ -750,7 +725,6 @@ CLbtGeoCell* containerCell = static_cast(geoArea); CLbtGeoCell* geoCell = static_cast (cond->TriggerArea()); - // TODO: Check if we need to retreive GSM and WCDMA info containerCell->SetNetworkType(geoCell->NetworkType()); containerCell->SetNetworkCountryCode(geoCell->NetworkCountryCode()); containerCell->SetNetworkIdentityCode(geoCell->NetworkIdentityCode()); @@ -840,6 +814,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetHysteresisRadius(trigExtInfo->HysteresisRadius()); } @@ -849,6 +824,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetTriggerFiredState(trigExtInfo->IsTriggerFired()); } @@ -858,6 +834,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetFiredInfo( trigExtInfo->GetFiredInfo() ); } @@ -867,6 +844,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetOwnerSid(trigExtInfo->OwnerSid()); } @@ -876,6 +854,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetTriggerRectangleArea(trigExtInfo->TriggerReactangleArea()); } @@ -885,6 +864,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetStrategyDataL(trigExtInfo->StategyData()); } @@ -894,6 +874,7 @@ if(contExtInfo==NULL) { contExtInfo=CLbtExtendedTriggerInfo::NewL(); + entry->SetExtendedTriggerInfo( contExtInfo ); } contExtInfo->SetTriggerFireOnCreation(trigExtInfo->IsTriggerFireOnCreation()); } @@ -906,6 +887,7 @@ if(contDynInfo == NULL) { contDynInfo = new TLbtTriggerDynamicInfo; + entry->SetDynInfo( contDynInfo ); } contDynInfo->iValidity = trigDynInfo->iValidity; } @@ -965,8 +947,7 @@ filter->ProcessFilter(tEntry,isFilterPresent,isEntryRequested); if(isFilterPresent>0 && isEntryRequested) { - CLbtTriggerEntry* trigEntry = tEntry->TriggerEntry(); - AppendTriggerInfo(tEntry); + AppendTriggerInfo(tEntry); } } tEntry=iTriggerIdTree->GetNextEntryL(); @@ -1094,7 +1075,6 @@ info->iValidity = aValidity; entry->SetDynInfo(info); } - CLbtTriggerEntry* trigEntry = entry->TriggerEntry(); AppendTriggerInfo(entry); } } @@ -1193,7 +1173,6 @@ iFilterBase->ProcessFilter(tEntry,isFilterPresent,isEntryRequested); if(isFilterPresent > 0 && isEntryRequested) { - CLbtTriggerEntry* trigEntry = tEntry->TriggerEntry(); AppendTriggerInfo(tEntry); } } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltcontextsourceplugin/src/lbtcontextsourceplugin.cpp --- a/locationtriggering/ltcontextsourceplugin/src/lbtcontextsourceplugin.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltcontextsourceplugin/src/lbtcontextsourceplugin.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -189,9 +189,7 @@ LBTCONTEXTSOURCEPLUGINDEBUG( "CLBTContextSourcePlugin::ParseTriggerInformationL : IN " ); - const RSettingParameterArray& parameters - = aItem.Parameters(); - + // Add check for improper syntax of XML file if ( aItem.Name() != KTriggerLocation ) { @@ -533,9 +531,6 @@ { const CCFContextSourceSetting& item = aSettingList.Item( i ); - const RSettingParameterArray& parameters - = item.Parameters(); - // Add check for improper syntax of XML file if ( item.Name() != KTriggerLocation ) { diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltserver/ltserverlogic/src/lbtlistaooperation.cpp --- a/locationtriggering/ltserver/ltserverlogic/src/lbtlistaooperation.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltserver/ltserverlogic/src/lbtlistaooperation.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -436,9 +436,8 @@ // HandleOperationClosureL method internally calls LoadOrUnloadStrategyPluginL // method which may leave only during the loading operation,but here the expected // behaviour is the unloading of strategy plugin which never fails .Hence we have ignored. - + LbtGlobal::RequestComplete(iMessage,KErrCancel); TRAP_IGNORE( iObserver.HandleOperationClosureL(this,KErrCancel) ); - LbtGlobal::RequestComplete(iMessage,KErrCancel); } } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltserver/ltserverlogic/src/lbtserverlogic.cpp --- a/locationtriggering/ltserver/ltserverlogic/src/lbtserverlogic.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltserver/ltserverlogic/src/lbtserverlogic.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -335,8 +335,7 @@ } // The request can only be through the LT management API. - // ToDo : Check for capabilities. - if ( TLbtManagementLibrary != aType ) + if ( TLbtManagementLibrary != aType ) { // This is not a management library. Hence return access denied. aMessage.Complete( KErrAccessDenied ); @@ -982,11 +981,7 @@ FUNC_ENTER("CLbtServerLogic::ValidateCreateTriggerMessage"); // The server should check for the following parameters // 1. capability checks for security. - // 2. checks for the Trigger area, ie. radius. (ToDo) - - // Check if the requesting process has location and write user data capability - // ToDo : check the required set of capabilities from req spec. - if( !aMessage.HasCapability(ECapabilityLocation) || + if( !aMessage.HasCapability(ECapabilityLocation) || !aMessage.HasCapability(ECapabilityWriteUserData) ) { return KErrPermissionDenied; @@ -1133,6 +1128,7 @@ // Populate the change event structure to send the information to the client based // on the message for which the notification needs to be made + // coverity[var_decl : FALSE] TLbtTriggerChangeEvent event; switch(aOperation->GetFunction()) @@ -1207,6 +1203,7 @@ RArray array; RMessage2 message; + // coverity[var_decl : FALSE] TLbtTriggerChangeEvent event; // sort by SID the retrieved list of triggers that were modified. @@ -1611,6 +1608,7 @@ FUNC_ENTER("CLbtServerLogic::HandleContainerTriggerChange"); RMessage2 message; + // coverity[var_decl : FALSE] TLbtTriggerChangeEvent event; // If there is change in the single trigger, set the trigger id else // update KLbtNullTriggerId for trigger id diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltserver/ltserverlogic/src/lbttriggermodifyaooperation.cpp --- a/locationtriggering/ltserver/ltserverlogic/src/lbttriggermodifyaooperation.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltserver/ltserverlogic/src/lbttriggermodifyaooperation.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -222,15 +222,18 @@ { FUNC_ENTER("CLbtTriggerModifyAOOperation::CancelModifyOperation"); Cancel(); - - if( iStatus.Int() == KLbtErrPartial ) + + // HandleOperationClosureL might leave either when it tries to unload strategy + // or during notification. Nothing can be done when this happens. Hence it will + // be ignored. + if( iStatus.Int() == KLbtErrPartial ) { LOG("Partial completion"); - iObserver.HandleOperationClosureL( this,KErrNone ); + TRAP_IGNORE( iObserver.HandleOperationClosureL( this,KErrNone ) ); } - else + else { - iObserver.HandleOperationClosureL( this,iStatus.Int() ); + TRAP_IGNORE( iObserver.HandleOperationClosureL( this,iStatus.Int() ) ); } } @@ -313,7 +316,6 @@ filter->AddTriggerIdL( iTriggerId ); options->SetFilter( filter ); CleanupStack::Pop(filter); - // ToDo : if msg from LT client API then add SID filter as well. break; } case ELbtDeleteTriggers: @@ -323,8 +325,7 @@ InternalizeFilterFromIpcLC( iMessage, KParamFilter ); options->SetFilter( filter ); CleanupStack::Pop(filter); - // ToDo : if msg from LT client API then add SID filter as well. - break; + break; } } @@ -512,6 +513,7 @@ { FUNC_ENTER("CLbtTriggerModifyAOOperation::HandleModifyTriggerStateOpL"); CLbtTriggerFilterBase* filter = NULL; + // coverity[var_decl : FALSE] CLbtTriggerEntry::TLbtTriggerState triggerState; switch ( iFunction ) diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/group/lbtstrategy.mmp --- a/locationtriggering/ltstrategyengine/group/lbtstrategy.mmp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/group/lbtstrategy.mmp Fri Apr 16 15:23:31 2010 +0300 @@ -21,7 +21,7 @@ #include #include - + TARGET lbtstrategy.dll TARGETTYPE PLUGIN UID 0x10009d8d 0x10283132 @@ -45,7 +45,7 @@ SOURCE lbtpsychangelistner.cpp SOURCE lbtcelliddatabase.cpp -/* TODO: Need to add location monitor */ + USERINCLUDE ../inc USERINCLUDE ../../inc diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/inc/lbtcellsupervisor.h --- a/locationtriggering/ltstrategyengine/inc/lbtcellsupervisor.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/inc/lbtcellsupervisor.h Fri Apr 16 15:23:31 2010 +0300 @@ -93,7 +93,7 @@ void Resume(); /** - * TODO: Check if this needed. + * Resets cell supervision */ void Reset(); diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/inc/lbtcoordinatesupervisor.h --- a/locationtriggering/ltstrategyengine/inc/lbtcoordinatesupervisor.h Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/inc/lbtcoordinatesupervisor.h Fri Apr 16 15:23:31 2010 +0300 @@ -45,9 +45,7 @@ class CLbtCoOrdinateSupervisor : public CActive, public MCellChangeObserver, public MLbtPsyChangeObserver - { - struct TTriggerArea; /** * Enum that specifies whether we need proper fix using any of the psy diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/src/lbtcellsupervisor.cpp --- a/locationtriggering/ltstrategyengine/src/lbtcellsupervisor.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/src/lbtcellsupervisor.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -150,7 +150,7 @@ // void CLbtCellSupervisor::Reset() { - // TODO: Check if this needed. + iRecentlyFiredTriggerArray.Reset(); } @@ -326,8 +326,8 @@ if(dataMask) { + // This is dummy position info. It has no significance. TPositionInfo dummy; - // TODO : Remove dummy position info iView->UpdateTriggerInfo( CLbtGeoAreaBase::ECellular,dummy, aTrigger, dataMask ); } } @@ -335,7 +335,7 @@ // EXIT Trigger else { - + //This is not currently supported. } aTrigger->SetStrategyData( strategyData ); } @@ -427,8 +427,8 @@ if(dataMask) { + // This is dummy position info. It has no significance. TPositionInfo dummy; - // TODO : Remove dummy position info iView->UpdateTriggerInfo( CLbtGeoAreaBase::ECellular,dummy, aTrigger, dataMask ); } } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/src/lbtcoordinatesupervisor.cpp --- a/locationtriggering/ltstrategyengine/src/lbtcoordinatesupervisor.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/src/lbtcoordinatesupervisor.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -438,7 +438,6 @@ if( iStatus.Int() == KPositionQualityLoss ) { - // TODO: Remove this. Only for Debug TPosition currentPosition; iPosInfo.GetPosition( currentPosition ); LOG("Received KPositionQualityLoss"); @@ -692,7 +691,6 @@ } break; - // TODO: Cell ID triggers need to be handled default: break; } @@ -1169,7 +1167,6 @@ { FUNC_ENTER("CLbtCoOrdinateSupervisor::EstimateSleepInterval"); - // TODO: Need to use GPS speed for observed speed values TReal maxUserSpeed = iSettings.iMaximumUserSpeed; TReal actualEstimatedSpeed = KMinProjSpeed; @@ -1365,30 +1362,6 @@ iProcessingInterval = seconds.Int(); iSleepInterval = iSleepInterval.Int() - iProcessingInterval; } - - // TODO: Check with Krishna on the commented code - // Check to determine if GPS method used for location information. If - // true, then need to use the GPS tracking mode interval here - /*if( iLocationRequestor->GPSUsed() ) - { - if( ( iSleepInterval.Int() < - iSettings.iMinimumLocationUpdateInterval ) || - ( iSleepInterval.Int() - iSettings.iGpsTrackingModeInterval ) < 5 ) - { - iSleepInterval = iSettings.iGpsTrackingModeInterval; - } - } - else - // - { - // If GPS not used check if sleep interval is less than minimum - // update interval. If true then use minimum update interval - if( iSleepInterval.Int() < - iSettings.iMinimumLocationUpdateInterval ) - { - iSleepInterval = iSettings.iMinimumLocationUpdateInterval; - } - }*/ } // If sleep interval is less than KMinSleepInterval and the UE is travelling in @@ -1584,20 +1557,12 @@ } else if( KErrNone == iStatus.Int() || KErrAbort == iStatus.Int() ) { - // TODO: Check accuracy of movement monitor and - // if there was any detection made. - // For accuracy, pass the distance to nearest trigger as a reference - // for movement detector plugin. If accuracy cannot be met then - // go ahead with acquiring current location else need to switch to - // movement detection mode. RequestTerminalPosition( iSettings.iLocationRequestTimeout ); } - - // Error in timer operation else { + LOG1("Error in timer:%d",iStatus.Int()); } - } @@ -1802,14 +1767,14 @@ { if( KErrNotFound == err ) { - // determine update interval iState = iProjectedState = EIdle; } else { + // TODO: Report error to server. This can be done only after + // introducing new state to strategy dynamic info. Term(); - // TODO: Server needs to be notified about termination of supervision } return err; } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/src/lbtstatusmanager.cpp --- a/locationtriggering/ltstrategyengine/src/lbtstatusmanager.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/src/lbtstatusmanager.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -19,9 +19,8 @@ #include #include - #include "lbtstatusmanager.h" - +#include "lbtlogger.h" // ======== MEMBER FUNCTIONS ======== @@ -72,7 +71,7 @@ iLastLocAcqStatus = aStatus; if( KErrNone != msg ) { - // TODO: log error message here + LOG1("Error updating status info:%d",msg); } } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/src/lbtstrategyengine.cpp --- a/locationtriggering/ltstrategyengine/src/lbtstrategyengine.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/src/lbtstrategyengine.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -154,7 +154,7 @@ } else { - iCellSupervisor->Reset(); // TODO: Check if this needed + iCellSupervisor->Reset(); } } @@ -215,7 +215,7 @@ iCellSupervisor->StopSupervision(); } - // Todo: Remove the dummy positionInfo + // This is dummy position info, this is no significance. TPositionInfo dummy; iView->Refresh( dummy, aEventMask, aTriggerIds ); } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/ltstrategyengine/src/lbttriggerview.cpp --- a/locationtriggering/ltstrategyengine/src/lbttriggerview.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/ltstrategyengine/src/lbttriggerview.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -407,7 +407,7 @@ } ); if( KErrNone != err ) { - // TODO: Log warning message that entries could not be deleted + LOG("Entries could not be deleted"); } } @@ -1100,7 +1100,7 @@ } else { - // TODO: Log error message mentioning the trigger ID + LOG1("Invalid trigger ID:%d",( *aIDs )[index]); InvalidateTrigger( ( *aIDs )[index] ); } } @@ -1353,7 +1353,7 @@ FUNC_ENTER("CLbtTriggerView::RunL"); if( KErrNone != iStatus.Int() ) { - // TODO: Log error here + LOG1("iStatus.Int = %d",iStatus.Int() ); // TODO: Check if error needs to be reported through the // observer interface } diff -r 788b770ce3ae -r 3825cf2dc8c2 locationtriggering/rom/locationtriggering.iby --- a/locationtriggering/rom/locationtriggering.iby Tue Feb 02 10:12:24 2010 +0200 +++ b/locationtriggering/rom/locationtriggering.iby Fri Apr 16 15:23:31 2010 +0300 @@ -51,7 +51,7 @@ // Backup and restore registeration file data=DATAZ_\private\1028312B\backup_registration.xml \private\1028312B\backup_registration.xml -// TODO: This is temporary untill cenrep CR is approved +// Central repository file data=DATAZ_\private\10202be9\1028312F.txt \private\10202be9\1028312F.txt // Location Triggering Management Library diff -r 788b770ce3ae -r 3825cf2dc8c2 locsrv_plat/group/bld.inf --- a/locsrv_plat/group/bld.inf Tue Feb 02 10:12:24 2010 +0200 +++ b/locsrv_plat/group/bld.inf Fri Apr 16 15:23:31 2010 +0300 @@ -41,5 +41,6 @@ #include "../location_triggering_management_api/group/bld.inf" #include "../location_triggering_status_information_api/group/bld.inf" #include "../oma_supl_asn_codec_plugin_api/group/bld.inf" +#include "../query_and_notification_api/group/bld.inf" #include "../location_local_variation_api/group/bld.inf" diff -r 788b770ce3ae -r 3825cf2dc8c2 locsrv_plat/query_and_notification_api/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locsrv_plat/query_and_notification_api/group/bld.inf Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,27 @@ +/* +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: File that exports the files belonging to +: SUPL Settings API +* +*/ + + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS + +../inc/EPos_CPosPrivacyNotifier.h MW_LAYER_PLATFORM_EXPORT_PATH(EPos_CPosPrivacyNotifier.h) diff -r 788b770ce3ae -r 3825cf2dc8c2 locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h Fri Apr 16 15:23:31 2010 +0300 @@ -0,0 +1,141 @@ +/* +* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Class for LBS Privacy Query & Notify (Q&N) privacy notifiers. +* +*/ + + + +#ifndef CPOSPRIVACYNOTIFIER_H +#define CPOSPRIVACYNOTIFIER_H + +// INCLUDES +#include +#include +#include + +// DATA TYPES + + +// CONSTANT DECLARATIONS +/** +@publishedPartner +@deprecated +*/ +const TPosQNRequestId KPosNullQNRequestId = -1; + +// FORWARD DECLARATIONS +class CPosPrivacyNotifierExtension; +class CPosRequestor; +class MEikSrvNotifierBase2; + +// CLASS DECLARATION +/** +Base class for LBS Privacy Query & Notify (Q&N) privacy notifiers. + +A privacy notifier is a UI plug-in which handles privacy query and +notification requests. + +This class contains declarations for event methods that must be implemented +by the notifier in order to receive information about new requests or +cancelled requests. + +It also contains methods for accessing information about a request and for +completing a request. + +@publishedPartner +@deprecated +*/ +class CPosPrivacyNotifier : public CBase + { + public: + /** + Specifies whether the requested dialog should be a query or a + notification dialog. + */ + enum TRequestType { + /** Query dialog requested. */ + EQuery = 0, + /** Notification dialog requested. */ + ENotification + }; + + public: + IMPORT_C virtual ~CPosPrivacyNotifier(); + + public: + + /** + * This method is called when a new privacy query or notification has + * been requested. + * + * @param aRequestId The ID of the new query or notification request. + */ + virtual void HandleNewRequestL( + /* IN */ TPosQNRequestId aRequestId + ) = 0; + + /** + * This method is called when a privacy query or notification request is + * cancelled. + * + * It is not necessary to call @ref CompleteRequest for a cancelled + * request. + * + * @param aRequestId The ID of the cancelled query or notification + * request. + */ + virtual void HandleRequestCancelled( + /* IN */ TPosQNRequestId aRequestId + ) = 0; + + /** + * This method is called to cancel all outstanding requests. + * + * It is not necessary to call @ref CompleteRequest for a cancelled + * request. + */ + virtual void HandleAllRequestCancelled() = 0; + + IMPORT_C MEikSrvNotifierBase2* NotifierBase() const; + IMPORT_C TPosVerifyCancelReason CancelReason() const; + IMPORT_C void GetRequestsL(RArray& aRequestArray) const; + IMPORT_C TRequestType RequestTypeL(TPosQNRequestId aRequestId) const; + IMPORT_C void SetCurrentRequestL(TPosQNRequestId aRequestId); + IMPORT_C TPosQNRequestId CurrentRequest() const; + IMPORT_C TPosRequestDecision QueryTimeoutStrategy() const; + IMPORT_C TPosRequestSource RequestSource() const; + IMPORT_C TPosRequestDecision LocationRequestDecision() const; + IMPORT_C TPosNotificationReason NotificationReason() const; + IMPORT_C TInt RequestorCountL() const; + IMPORT_C CPosRequestor* RequestorLC(TInt aRequestorIndex) const; + IMPORT_C void CompleteRequest(TPosQNRequestId aRequestId, TInt aCompletionCode); + IMPORT_C void CompleteAllRequests(TInt aCompletionCode); + IMPORT_C TBool CheckClientSecureId(TSecureId aSecureId); + + protected: + IMPORT_C CPosPrivacyNotifier(); + IMPORT_C void BaseConstructL(TUid aChannel,TInt aPriority); + + private: + // By default, prohibit copy constructor + CPosPrivacyNotifier( const CPosPrivacyNotifier& ); + // Prohibit assigment operator + CPosPrivacyNotifier& operator= ( const CPosPrivacyNotifier& ); + + private: + CPosPrivacyNotifierExtension* iExtension; + }; + +#endif // CPOSPRIVACYNOTIFIER_H diff -r 788b770ce3ae -r 3825cf2dc8c2 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 Tue Feb 02 10:12:24 2010 +0200 +++ b/locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt Fri Apr 16 15:23:31 2010 +0300 @@ -1,19 +1,20 @@ -# -# 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 "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# -# +/* +* 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 "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: MMP file for STIF Test Framework's Hardcoded test +* module. +* +*/ # Doxyfile 1.4.1 diff -r 788b770ce3ae -r 3825cf2dc8c2 package_definition.xml --- a/package_definition.xml Tue Feb 02 10:12:24 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/asnconverterpluginapi/src/epos_comasuplreport.cpp --- a/supl/locationomasuplprotocolhandler/asnconverterpluginapi/src/epos_comasuplreport.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/asnconverterpluginapi/src/epos_comasuplreport.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -406,6 +406,10 @@ iOptionalMask |= KSessionListShift; + sessionList.Close(); + reportDataList.Close(); + + } /* diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/notifier/notifier/data/epos_omasuplnotifier.rss --- a/supl/locationomasuplprotocolhandler/notifier/notifier/data/epos_omasuplnotifier.rss Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/notifier/notifier/data/epos_omasuplnotifier.rss Fri Apr 16 15:23:31 2010 +0300 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -243,17 +243,32 @@ aStatus = KRequestPending; TRequestStatus *status = &aStatus; - if( iIsInitilized && iOMASuplProtocolHandler1 ) + + if( iIsInitilized ) { - iOMASuplProtocolHandler1->RunSessionL( - aSuplSession, + if( aSuplSession->GetSUPLVersion() == 1 ) + { + iOMASuplProtocolHandler1->RunSessionL( + aSuplSession, aStatus, aHslpAddress, aFallBack, aFirstReq, aAllowedCapabilities, aRequestID); - } + } + else if( aSuplSession->GetSUPLVersion() == 2 ) + { + iOMASuplProtocolHandler2->RunSessionL( + aSuplSession, + aStatus, + aHslpAddress, + aFallBack, + aFirstReq, + aAllowedCapabilities, + aRequestID); + } + } else { User::RequestComplete(status,KErrOMASuplUnInitilized); @@ -281,7 +296,9 @@ aStatus = KRequestPending; TRequestStatus *status = &aStatus; - if( iIsInitilized && iOMASuplProtocolHandler1 ) + if( iIsInitilized ) + { + if( aSuplSession->GetSUPLVersion() == 1 ) { iOMASuplProtocolHandler1->RunSessionL( aSuplSession, @@ -292,7 +309,20 @@ aAllowedCapabilities, aQop, aRequestID); - } + } + else if( aSuplSession->GetSUPLVersion() == 2 ) + { + iOMASuplProtocolHandler2->RunSessionL( + aSuplSession, + aStatus, + aHslpAddress, + aFallBack, + aFirstReq, + aAllowedCapabilities, + aQop, + aRequestID); + } + } else { User::RequestComplete(status,KErrOMASuplUnInitilized); diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasupletelnotifier.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasupletelnotifier.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasupletelnotifier.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -115,10 +115,13 @@ // void COMASuplETelNotifier::CheckForRoaming() { - iCellMode = EOMASuplCellIdHome; - iTrace->Trace(_L("COMASuplETelNotifier::CheckForRoaming..."),KTraceFileName, __LINE__); - iPhone.GetHomeNetwork( iStatus, iHomeNetworkInfoPkg); - SetActive(); + iTrace->Trace(_L("COMASuplETelNotifier::CheckForRoaming..."),KTraceFileName, __LINE__); + if( !IsActive() ) + { + iCellMode = EOMASuplCellIdHome; + iPhone.GetHomeNetwork( iStatus, iHomeNetworkInfoPkg); + SetActive(); + } } // ----------------------------------------------------------------------------- @@ -128,10 +131,13 @@ // void COMASuplETelNotifier::GetCurrentNetwork() { - iCellMode = EOMASuplCellIdCurrent; - iTrace->Trace(_L("COMASuplETelNotifier::GetCurrentNetwork..."),KTraceFileName, __LINE__); - iPhone.GetCurrentNetwork( iStatus, iNetworkInfoPkg, iLocationInfo ); - SetActive(); + iTrace->Trace(_L("COMASuplETelNotifier::GetCurrentNetwork..."),KTraceFileName, __LINE__); + if( !IsActive() ) + { + iCellMode = EOMASuplCellIdCurrent; + iPhone.GetCurrentNetwork( iStatus, iNetworkInfoPkg, iLocationInfo ); + SetActive(); + } } // ----------------------------------------------------------------------------- @@ -141,10 +147,13 @@ // void COMASuplETelNotifier::NotifyCurrentNetworkChange() { - iCellMode = EOMASuplCellIdNotify; - iTrace->Trace(_L("COMASuplETelNotifier::NotifyCurrentNetworkChange..."),KTraceFileName, __LINE__); - iPhone.NotifyCurrentNetworkChange( iStatus, iNetworkInfoPkg, iLocationInfo ); - SetActive(); + iTrace->Trace(_L("COMASuplETelNotifier::NotifyCurrentNetworkChange..."),KTraceFileName, __LINE__); + if( !IsActive() ) + { + iCellMode = EOMASuplCellIdNotify; + iPhone.NotifyCurrentNetworkChange( iStatus, iNetworkInfoPkg, iLocationInfo ); + SetActive(); + } } // ----------------------------------------------------------------------------- diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -219,6 +219,7 @@ CSuplSessionBase* SuplSession = COMASuplSession::NewL(*iCommManager, iMobilePhone, iSuplSettings, iSuplStorageSettings, aRequestType, *this, iPosHandler, iIMSI, *this, aIpcSessionId,iOMASuplAsnHandlerBaseImpl); + SuplSession->SetSUPLVersion(1); User::LeaveIfError(iSuplSessions.Append(SuplSession)); return SuplSession; } diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -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 complete.. } diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasupletelnotifier.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasupletelnotifier.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasupletelnotifier.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -115,10 +115,13 @@ // void COMASuplETelNotifier::CheckForRoaming() { - iCellMode = EOMASuplCellIdHome; - iTrace->Trace(_L("COMASuplETelNotifier::CheckForRoaming..."),KTraceFileName, __LINE__); - iPhone.GetHomeNetwork( iStatus, iHomeNetworkInfoPkg); - SetActive(); + iTrace->Trace(_L("COMASuplETelNotifier::CheckForRoaming..."),KTraceFileName, __LINE__); + if( !IsActive() ) + { + iCellMode = EOMASuplCellIdHome; + iPhone.GetHomeNetwork( iStatus, iHomeNetworkInfoPkg); + SetActive(); + } } // ----------------------------------------------------------------------------- @@ -128,10 +131,13 @@ // void COMASuplETelNotifier::GetCurrentNetwork() { - iCellMode = EOMASuplCellIdCurrent; - iTrace->Trace(_L("COMASuplETelNotifier::GetCurrentNetwork..."),KTraceFileName, __LINE__); - iPhone.GetCurrentNetwork( iStatus, iNetworkInfoPkg, iLocationInfo ); - SetActive(); + iTrace->Trace(_L("COMASuplETelNotifier::GetCurrentNetwork..."),KTraceFileName, __LINE__); + if( !IsActive() ) + { + iCellMode = EOMASuplCellIdCurrent; + iPhone.GetCurrentNetwork( iStatus, iNetworkInfoPkg, iLocationInfo ); + SetActive(); + } } // ----------------------------------------------------------------------------- @@ -141,10 +147,13 @@ // void COMASuplETelNotifier::NotifyCurrentNetworkChange() { - iCellMode = EOMASuplCellIdNotify; - iTrace->Trace(_L("COMASuplETelNotifier::NotifyCurrentNetworkChange..."),KTraceFileName, __LINE__); - iPhone.NotifyCurrentNetworkChange( iStatus, iNetworkInfoPkg, iLocationInfo ); - SetActive(); + iTrace->Trace(_L("COMASuplETelNotifier::NotifyCurrentNetworkChange..."),KTraceFileName, __LINE__); + if( !IsActive() ) + { + iCellMode = EOMASuplCellIdNotify; + iPhone.NotifyCurrentNetworkChange( iStatus, iNetworkInfoPkg, iLocationInfo ); + SetActive(); + } } // ----------------------------------------------------------------------------- diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplprotocolmanager2.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplprotocolmanager2.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplprotocolmanager2.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -226,7 +226,7 @@ *this, aIpcSessionId, iOMASuplAsnHandlerBaseImpl); - + SuplSession->SetSUPLVersion(2); User::LeaveIfError(iSuplSessions.Append(SuplSession)); return SuplSession; } @@ -256,7 +256,10 @@ iTrace->Trace(_L("NotifyOnPlugInUnInstallation starting"), KTraceFileName, __LINE__); iSuplEcomEventWatcher->NotifyOnPlugInUnInstallation(); } - iNotifier = COMASuplETelNotifier::NewL(*this,iMobilePhone); + if(!iNotifier) + { + iNotifier = COMASuplETelNotifier::NewL(*this,iMobilePhone); + } iTrace->Trace(_L("ETEL Notifier created"), KTraceFileName, __LINE__); iTrace->Trace(_L("COMASUPLProtocolManager2::InitializeL completed"), KTraceFileName, __LINE__); diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp --- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -5554,6 +5554,7 @@ // ----------------------------------------------------------------------------- void COMASuplSession::RemoveActiveSession() { + if (iTrace) iTrace->Trace(_L("Removing Trigger Session from DB..."), KTraceFileName, __LINE__); //may need to reset the iActiveSessionId to 0 so that self deletion event will not come to same session... TInt err = iSuplStorageSettings->DeleteSessionRecord(iSETSessionUniqueId); diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp --- a/supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -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(); } diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp --- a/supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -516,9 +516,19 @@ OtherProperties |= KEditable; } - TBuf tempBuf; + TBuf tempBuf; + TBuf tempIapBuf; tempBuf.Copy(*SLPAddress); - tempBuf.Trim(); + tempIapBuf.Copy(*IAPName); + tempBuf.TrimAll(); + tempIapBuf.TrimAll(); + + if( tempBuf.Length() == 0 ) + { + CleanupStack::PopAndDestroy(3); //SLPAddress,IAPName,manuName + User::Leave(KErrArgument); + } + iSQLString.Copy(KInsertIntoTable); iSQLString.Append(KCreateTableName); @@ -594,7 +604,7 @@ iSQLString.Append(KCommaSeparator); iSQLString.Append(KQuotes); - iSQLString.Append(*IAPName); + iSQLString.Append(tempIapBuf); iSQLString.Append(KQuotes); iSQLString.Append(KCommaSeparator); diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationsuplfw/settingsapi/src/epos_csuplsettings.cpp --- a/supl/locationsuplfw/settingsapi/src/epos_csuplsettings.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationsuplfw/settingsapi/src/epos_csuplsettings.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -284,9 +284,12 @@ //-------------------------------------------------------------------------------------- EXPORT_C TInt CSuplSettings::SetServerAddress( const TInt64 aSlpId, const TDesC& aServerAddress) { - if(aServerAddress.Length() <= 0) + TBuf serveraddr; + serveraddr.Copy(aServerAddress); + serveraddr.TrimAll(); + if(serveraddr.Length() <= 0) return KErrArgument; - return iSettingsEngine->SetServerAddress(aSlpId,aServerAddress); + return iSettingsEngine->SetServerAddress(aSlpId,serveraddr); } //------------------------------------------------------------------------------------- //CSuplSettings::GetServerAddress() @@ -304,10 +307,12 @@ //-------------------------------------------------------------------------------------- EXPORT_C TInt CSuplSettings::SetIapName( const TInt64 aSlpId, const TDesC& aIapName) { - - if(aIapName.Length() <= 0) + TBuf iapname; + iapname.Copy(aIapName); + iapname.TrimAll(); + if(iapname.Length() <= 0) return KErrArgument; - return iSettingsEngine->SetIapName(aSlpId,aIapName); + return iSettingsEngine->SetIapName(aSlpId,iapname); } //------------------------------------------------------------------------------------- //CSuplSettings::GetIapName() diff -r 788b770ce3ae -r 3825cf2dc8c2 supl/locationsuplfw/terminalinitiationapi/src/epos_suplterminalapi.cpp --- a/supl/locationsuplfw/terminalinitiationapi/src/epos_suplterminalapi.cpp Tue Feb 02 10:12:24 2010 +0200 +++ b/supl/locationsuplfw/terminalinitiationapi/src/epos_suplterminalapi.cpp Fri Apr 16 15:23:31 2010 +0300 @@ -840,6 +840,8 @@ if (!serverAddress || !iapName) { + delete serverAddress; + delete iapName; return KErrNoMemory; } delete iSuplStorageSettings;