Revision: 201011 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 31 Mar 2010 22:18:21 +0300
branchRCL_3
changeset 8 6fcbaa43369c
parent 7 19bff11d6c18
child 9 e000e7e1f1b1
Revision: 201011 Kit: 201013
landmarks/locationlandmarks/clientlib/src/EPos_CPosLandmarkDatabase.cpp
landmarks/locationlandmarks/clientlib/src/epos_poslandmarkserialization.cpp
landmarks/locationlandmarks/clientlib/src/epos_poslmcategoryserialization.cpp
landmarks/locationlandmarks/converter/src/EPos_CPosLmKmlParser.cpp
landmarks/locationlandmarks/converter/src/EPos_CPosLmLmxParser.cpp
landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp
landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp
landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalExportOp.cpp
landmarks/locationlandmarks/localaccess/src/EPos_RPosLmLocalAccessSubsession.cpp
landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp
landmarks/locationlandmarks/searchclientlib/src/EPos_PosLmDisplayDataHandler.cpp
landmarks/locationlandmarks/server/inc/epos_lmdebug.h
landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp
landmarks/locationlandmarks/server/src/EPos_CPosLmNameIndex.cpp
locationsystemui/locationsysui/group/bld.inf
locationsystemui/locationsysui/locblidsatelliteinfo/inc/satellitecontrol.h
locationsystemui/locationsysui/locblidsatelliteinfo/src/satellitecontrol.cpp
locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioneditor.cpp
locationsystemui/locationsysui/locutils/src/locphonenumberformat.cpp
locationsystemui/locationsysui/locutils/src/loctextutils.cpp
locationsystemui/locationsysui/locverifier/inc/lpdperiodicprocessor.h
locationsystemui/locationsysui/locverifier/inc/lpdperiodicreqinfo.h
locationsystemui/locationsysui/locverifier/inc/lpdquerylauncherbase.h
locationsystemui/locationsysui/locverifier/inc/lpdverifierplugin.h
locationsystemui/locationsysui/locverifier/src/lpdrequestorprocessor.cpp
locationsystemui/locationsysui/queryandnotification/BWINS/EPOSPRVQNIFU.DEF
locationsystemui/locationsysui/queryandnotification/EABI/eposprvqnifU.DEF
locationsystemui/locationsysui/queryandnotification/group/EPos_PrivacyQNInterface.mmp
locationsystemui/locationsysui/queryandnotification/group/bld.inf
locationsystemui/locationsysui/queryandnotification/group/lbsqueryandnotification.iby
locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosPrivacyNotifierExtension.h
locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosRequestHandler.h
locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifier.cpp
locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifierExtension.cpp
locationsystemui/locationsysui/queryandnotification/src/EPos_CPosRequestHandler.cpp
locsrv_plat/group/bld.inf
locsrv_plat/query_and_notification_api/group/bld.inf
locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h
locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt
package_definition.xml
supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp
supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler.iby
supl/locationsuplfw/gateway/src/epos_csuplnetinitiatedsession.cpp
--- a/landmarks/locationlandmarks/clientlib/src/EPos_CPosLandmarkDatabase.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/clientlib/src/EPos_CPosLandmarkDatabase.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -141,6 +141,7 @@
 //
 TUid CPosLandmarkDatabase::ImplementationId() const
     {
+//coverity[naming_error :FALSE]
     return REComSession::GetImplementationUidL (iDtorIdKey);//iDtorIdKey;
     //return iDtorIdKey;
     }
--- a/landmarks/locationlandmarks/clientlib/src/epos_poslandmarkserialization.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/clientlib/src/epos_poslandmarkserialization.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -59,8 +59,11 @@
     memclr( &header, sizeof header );
     TPckg<TLandmarkBufferHeader> 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 ) );
--- a/landmarks/locationlandmarks/clientlib/src/epos_poslmcategoryserialization.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/clientlib/src/epos_poslmcategoryserialization.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -50,6 +50,8 @@
     TPckg<TCategoryBufferHeader> 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 ) );
--- a/landmarks/locationlandmarks/converter/src/EPos_CPosLmKmlParser.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/converter/src/EPos_CPosLmKmlParser.cpp	Wed Mar 31 22:18:21 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();
--- a/landmarks/locationlandmarks/converter/src/EPos_CPosLmLmxParser.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/converter/src/EPos_CPosLmLmxParser.cpp	Wed Mar 31 22:18:21 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
--- a/landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/dbreg/src/EPos_CPosLmDbRegistry.cpp	Wed Mar 31 22:18:21 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
     }
 
 // -----------------------------------------------------------------------------
--- a/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalDatabase.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -321,6 +321,7 @@
 //
 EXPORT_C void CPosLmLocalDatabase::CommitServerTransactionLX()
     {
+    //coverity[naming_error : FALSE]
     CommitServerTransactionL();
     CleanupStack::Pop(); // rollback
     }
--- a/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalExportOp.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/localaccess/src/EPos_CPosLmLocalExportOp.cpp	Wed Mar 31 22:18:21 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);
                 }
 
--- a/landmarks/locationlandmarks/localaccess/src/EPos_RPosLmLocalAccessSubsession.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/localaccess/src/EPos_RPosLmLocalAccessSubsession.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -91,6 +91,7 @@
     TPosLmEventType aEventType,
     TPosLmItemId aId)
     {
+    //coverity[var_decl : FALSE]
     TPosLmEvent event;
     event.iEventType = aEventType;
     event.iLandmarkItemId = aId;
--- a/landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/localaccess/src/epos_rposlmlocalnameindex.cpp	Wed Mar 31 22:18:21 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 );
     }
 
--- a/landmarks/locationlandmarks/searchclientlib/src/EPos_PosLmDisplayDataHandler.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/searchclientlib/src/EPos_PosLmDisplayDataHandler.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -31,7 +31,6 @@
     CPosLmDisplayData& aDisplayData,
     CPosLmDisplayItem* aDisplayItem )
     {
-    RPointerArray<CPosLmDisplayItem>& displayItems = aDisplayData.DisplayItems();
     InsertItemL( aDisplayData, aDisplayItem, aDisplayData.Count() ); // append to the end
     }
 
--- a/landmarks/locationlandmarks/server/inc/epos_lmdebug.h	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/server/inc/epos_lmdebug.h	Wed Mar 31 22:18:21 2010 +0300
@@ -49,6 +49,7 @@
 
 inline void Log( TRefByValue<const TDesC> aFmt, ... )
     {
+    //coverity[var_decl : FALSE]
     VA_LIST list;
     VA_START( list, aFmt );
 
--- a/landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/server/src/EPos_CPosLmLocalAccessSubsession.cpp	Wed Mar 31 22:18:21 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 );
         }
     
--- a/landmarks/locationlandmarks/server/src/EPos_CPosLmNameIndex.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/landmarks/locationlandmarks/server/src/EPos_CPosLmNameIndex.cpp	Wed Mar 31 22:18:21 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 );
     }
 
--- a/locationsystemui/locationsysui/group/bld.inf	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/group/bld.inf	Wed Mar 31 22:18:21 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  
--- a/locationsystemui/locationsysui/locblidsatelliteinfo/inc/satellitecontrol.h	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locblidsatelliteinfo/inc/satellitecontrol.h	Wed Mar 31 22:18:21 2010 +0300
@@ -22,7 +22,7 @@
 #define __SATELLITE_CONTROL_H__
 
 // INCLUDE FILES
-#include <AknLayoutDef.h>
+#include <aknlayoutdef.h>
 #include <AknUtils.h>
 #include "SatInfoConsts.h"
 #include "MSatelliteEng.h"
--- a/locationsystemui/locationsysui/locblidsatelliteinfo/src/satellitecontrol.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locblidsatelliteinfo/src/satellitecontrol.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -33,7 +33,7 @@
 #include <lbssatellite.h>
 #include <satellite.mbg>
 #include <eikapp.h>
-#include <AknLayout2Def.h>
+#include <aknlayout2def.h>
 #include <layoutmetadata.cdl.h>
 //===HEADER FILE INCLUDED FOR HACK=======
 #include <AknLayoutFont.h>
--- a/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioneditor.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locsuplsettingsui/src/locsuplsessioneditor.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -613,6 +613,7 @@
 	if( !aSeconds )
 		{
         tempString.Num(aSeconds);
+		AknTextUtils::LanguageSpecificNumberConversion(tempString);
         aTimeString = StringLoader::LoadL( R_LOC_SUPL_TRIGGER_TIME_MINUTES, tempString ); 
         return;
 		}
@@ -625,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 )
@@ -638,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 )
@@ -648,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 ); 
     		}
 		}
 	}
--- a/locationsystemui/locationsysui/locutils/src/locphonenumberformat.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locutils/src/locphonenumberformat.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -19,7 +19,7 @@
 
 // INCLUDE FILES
 #include <AknUtils.h>
-#include <AknLayoutDef.h>
+#include <aknlayoutdef.h>
 #include <AknLayout.lag>
 #include <eikfrlbd.h>
 #include <AknPhoneNumberGrouping.h>
--- a/locationsystemui/locationsysui/locutils/src/loctextutils.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locutils/src/loctextutils.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -18,7 +18,7 @@
 
 // INCLUDE FILES
 #include "loctextutils.h"
-#include <AknLayoutDef.h>
+#include <aknlayoutdef.h>
 #include <AknLayout.lag>
 #include <eikfrlbd.h>
 
--- a/locationsystemui/locationsysui/locverifier/inc/lpdperiodicprocessor.h	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locverifier/inc/lpdperiodicprocessor.h	Wed Mar 31 22:18:21 2010 +0300
@@ -20,8 +20,7 @@
 #define CLPDPERIODICPROCESSOR_H
 
 //  INCLUDES
-#include <lbs/epos_cposprivacynotifier.h>
-#include <lbs/epos_cposprivacynotifier.h>
+#include <EPos_CPosPrivacyNotifier.h>
 #include <lbs/epos_cposrequestor.h>
 #include "lpdsuplsettingsadapterobserver.h"
 
--- a/locationsystemui/locationsysui/locverifier/inc/lpdperiodicreqinfo.h	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locverifier/inc/lpdperiodicreqinfo.h	Wed Mar 31 22:18:21 2010 +0300
@@ -20,7 +20,7 @@
 #define CLPDPERIODICREQINFO_H
 
 #include <e32base.h>
-#include <lbs/epos_cposprivacynotifier.h>
+#include <EPos_CPosPrivacyNotifier.h>
 
 /**
 *  Periodic info structure to Que.
--- a/locationsystemui/locationsysui/locverifier/inc/lpdquerylauncherbase.h	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locverifier/inc/lpdquerylauncherbase.h	Wed Mar 31 22:18:21 2010 +0300
@@ -25,7 +25,7 @@
 #include <coemain.h>
 #include <AknsItemID.h>
 #include <AknQueryDialog.h>
-#include <lbs/epos_cposprivacynotifier.h>
+#include <EPos_CPosPrivacyNotifier.h>
 
 
 // SYSTEM INCLUDE
--- a/locationsystemui/locationsysui/locverifier/inc/lpdverifierplugin.h	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locverifier/inc/lpdverifierplugin.h	Wed Mar 31 22:18:21 2010 +0300
@@ -18,7 +18,7 @@
 
 // INCLUDES
 
-#include <lbs/epos_cposprivacynotifier.h>
+#include <EPos_CPosPrivacyNotifier.h>
 #include <lbs/epos_privacy.h>
 #include <lbs/epos_cposrequestor.h>
 
--- a/locationsystemui/locationsysui/locverifier/src/lpdrequestorprocessor.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/locationsystemui/locationsysui/locverifier/src/lpdrequestorprocessor.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -25,7 +25,7 @@
 #include <lbs/epos_cposrequestor.h>
 #include <lbs/epos_cposcontactrequestor.h>
 #include <lbs/epos_cposservicerequestor.h>
-#include <lbs/epos_cposprivacynotifier.h>
+#include <EPos_CPosPrivacyNotifier.h>
 
 // CONSTANTS
 _LIT( KUnknownRequestor, "Unknown" );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/BWINS/EPOSPRVQNIFU.DEF	Wed Mar 31 22:18:21 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<long> &) 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)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/EABI/eposprvqnifU.DEF	Wed Mar 31 22:18:21 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 ; #<TI>#
+	_ZTV19CPosPrivacyNotifier @ 22 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/group/EPos_PrivacyQNInterface.mmp	Wed Mar 31 22:18:21 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/group/bld.inf	Wed Mar 31 22:18:21 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 <platform_paths.hrh>
+									 
+PRJ_MMPFILES
+EPos_PrivacyQNInterface.mmp
+
+PRJ_EXPORTS
+./lbsqueryandnotification.iby           CORE_MW_LAYER_IBY_EXPORT_PATH(lbsqueryandnotification.iby)
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/group/lbsqueryandnotification.iby	Wed Mar 31 22:18:21 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosPrivacyNotifierExtension.h	Wed Mar 31 22:18:21 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 <eiknotapi.h>
+#include <lbs/epos_rposrequestorstack.h>
+#include <lbs/EPos_TPosQNInputData.h>
+#include <EPos_CPosPrivacyNotifier.h>
+// 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<TPosQNInputData> iRequestArray;
+        TPosQNRequestId         iCurrentRequestId;
+        RPosRequestorStack      iRequestorStack;
+        RMessagePtr2            iMessage;
+
+    private: // Data
+        CPosPrivacyNotifier*    iPrivacyNotifier;
+        CPosRequestHandler*     iRequestHandler;
+
+    };
+
+#endif      // CPOSPRIVACYNOTIFIEREXTENSION_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosRequestHandler.h	Wed Mar 31 22:18:21 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 <e32base.h>
+#include <lbs/EPos_TPosQNInputData.h>
+#include <EPos_CPosPrivacyNotifier.h>
+
+// 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
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifier.cpp	Wed Mar 31 22:18:21 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 <lbs/epos_cposcontactrequestor.h>
+#include <lbs/epos_cposservicerequestor.h>
+#include <lbs/epos_privacynotifier.hrh>
+#include <EPos_CPosPrivacyNotifier.h>
+#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<TPosQNRequestId>& 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;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/src/EPos_CPosPrivacyNotifierExtension.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -0,0 +1,283 @@
+/*
+* 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.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <s32mem.h>
+#include <lbs/epos_privacy.h>
+#include <lbs/epos_cposrequestor.h>
+#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)
+    {
+    if (RemoveRequestFromArray(aRequestId) != KErrNotFound)
+        {
+        iMessage.Complete(aCompletionCode);
+        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*/)
+    {
+    User::Leave(KErrNotSupported);
+    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<TPosQNInputData> 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/queryandnotification/src/EPos_CPosRequestHandler.cpp	Wed Mar 31 22:18:21 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 <EPos_CPosPrivacyNotifier.h>
+#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
--- a/locsrv_plat/group/bld.inf	Mon Mar 15 12:42:19 2010 +0200
+++ b/locsrv_plat/group/bld.inf	Wed Mar 31 22:18:21 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"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locsrv_plat/query_and_notification_api/group/bld.inf	Wed Mar 31 22:18:21 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 <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/EPos_CPosPrivacyNotifier.h     MW_LAYER_PLATFORM_EXPORT_PATH(EPos_CPosPrivacyNotifier.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h	Wed Mar 31 22:18:21 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 <e32base.h>
+#include <lbs/epos_privacy.h>
+#include <lbs/EPos_TPosQNInputData.h>
+
+// 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<TPosQNRequestId>& 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
--- a/locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt	Mon Mar 15 12:42:19 2010 +0200
+++ b/locsrv_pub/blid_application_satellite_info_api/tsrc/UT_CSatelliteUITest/group/CSatelliteUITest_DoxyFile.txt	Wed Mar 31 22:18:21 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 the License "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
 
--- a/package_definition.xml	Mon Mar 15 12:42:19 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<SystemDefinition schema="3.0.0">
-  <package id="locationsrv" name="Location Services" levels="plugin fw server if">
-    <collection id="landmarks" name="Landmarks" level="server">
-      <component id="locationlandmarks" filter="s60" name="Location Landmarks">
-        <unit bldFile="landmarks/locationlandmarks/group"/>
-      </component>
-    </collection>
-    <collection id="locationmapnavfw" name="Location Map and Navigation Framework" level="fw">
-      <component id="library" filter="s60" name="Map and Navigation Library">
-      	<!-- should change ID to something more meaningful (mplibrary?) -->
-        <unit bldFile="locationmapnavfw/library/group"/>
-      </component>
-      <component id="aiwprovider" filter="s60" name="Map and Navigation AIW Provider">
-      	<!-- should change ID to something more meaningful (mpaiwprovider?) -->
-        <unit bldFile="locationmapnavfw/aiwprovider/group"/>
-      </component>
-      <component id="locationmapnavfw_build" filter="s60" name="Location Map and Navigation Framework Build">
-        <unit bldFile="locationmapnavfw/group"/>
-      </component>
-    </collection>
-    <collection id="locationsystemui" name="Location System UI" level="if">
-      <component id="locationsysui" filter="s60" name="Location System UI">
-        <unit bldFile="locationsystemui/locationsysui/group"/>
-      </component>
-    </collection>
-    <collection id="supl" name="SUPL" level="fw">
-      <component id="locationsuplfw" filter="s60" name="Location SUPL Framework">
-        <unit bldFile="supl/locationsuplfw/group"/>
-      </component>
-      <component id="locationomasuplprotocolhandler" filter="s60" name="OMA SUPL Protocol Handler">
-        <unit bldFile="supl/locationomasuplprotocolhandler/group"/>
-      </component>
-      <component id="locationomasuplpostester" filter="s60" name="OMA SUPL POS Tester">
-        <unit bldFile="supl/locationomasuplpostester/group"/>
-      </component>
-    </collection>
-    <collection id="locationtriggering" name="Location Triggering" level="server">
-      <component id="ltlogger" filter="s60" name="LT Logger">
-        <unit bldFile="locationtriggering/ltlogger/group"/>
-      </component>
-      <component id="ltclientlib" filter="s60" name="LT Client Library">
-        <unit bldFile="locationtriggering/ltclientlib/group"/>
-      </component>
-      <component id="ltmanagementlib" filter="s60" name="LT Management Library">
-        <unit bldFile="locationtriggering/ltmanagementlib/group"/>
-      </component>
-      <component id="ltcontainer" filter="s60" name="LT Container">
-        <unit bldFile="locationtriggering/ltcontainer/group"/>
-      </component>
-      <component id="ltserver" filter="s60" name="LT Server">
-        <unit bldFile="locationtriggering/ltserver/group"/>
-      </component>
-      <component id="ltstrategypluginapi" filter="s60" name="LT Strategy Plugin API">
-        <unit bldFile="locationtriggering/ltstrategypluginapi/group"/>
-      </component>
-      <component id="ltstrategyengine" filter="s60" name="LT Strategy Engine">
-        <unit bldFile="locationtriggering/ltstrategyengine/group"/>
-      </component>
-      <component id="ltmovementdetectionpluginapi" filter="s60" name="Movement Detection Plugin API">
-        <unit bldFile="locationtriggering/ltmovementdetectionpluginapi/group"/>
-      </component>
-      <component id="ltcellidmovementdetector" filter="s60" name="Cell ID Movement Detector">
-        <unit bldFile="locationtriggering/ltcellidmovementdetector/group"/>
-      </component>
-      <component id="lbtmgmtui" filter="s60" name="LBT Management UI" class="plugin">
-        <unit bldFile="locationtriggering/lbtmgmtui/group"/>
-      </component>
-      <component id="locationtriggering_test" filter="s60" name="Location Triggering Test" purpose="development">
-      	<!--  should have only one unit  -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtcancellationtest/cancelcreatetest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/additionaltests/createtest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/additionaltests/handlingprocesstest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtplatsectest/testlbtplatsecurity2_exe/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtcancellationtest/cancellisttriggerstest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtcancellationtest/cancelcreateiteratortest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtplatsectest/testlbtplatsecurity3_exe/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/firingofstartuptriggerandlisttrigger/createtest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/t_mgmtsettings/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtplatsectest/testlbtplatsecurity4_exe/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtcancellationtest/cancelgettriggerstest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/additionaltests/modifytest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/t_mgmtsettings/createtest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtplatsectest/testlbtplatsecurity5_exe/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/additionaltests/notificationtest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtcancellationtest/cancelsettriggerstest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtcancellationtest/canceldeletetest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/additionaltests/deletetest/group"/> -->
-        <!-- <unit bldFile="locationtriggering/tsrc/lbtengine_test/lbtplatsectest/testlbtplatsecurity1_exe/group"/> -->
-      </component>
-      <component id="locationtriggering_build" filter="s60" name="Location Triggering Build">
-      	<!--  should remove #include from this and maybe put exports in the above components -->
-        <unit bldFile="locationtriggering/group"/>
-      </component>
-    </collection>
-    <collection id="genericpositioningplugins" name="Generic Positioning Plugins" level="plugin">
-      <component id="genericpositioningplugins_build" filter="s60" name="Generic Positioning Plugins Build">
-        <unit bldFile="genericpositioningplugins/group"/>
-      </component>    
-      <component id="locationnpppsy" filter="s60" name="Location Positioning Proxy PSY" class="plugin"> 
-        <unit bldFile="genericpositioningplugins/locationnpppsy/group"/>
-      </component>
-    </collection>
-    <collection id="locationsrv_info" name="Location Services Info" level="if">
-      <component id="locsrv_plat" filter="s60" class="api"  name="Location Services Platform Interfaces">
-        <unit bldFile="locsrv_plat/group"/>
-        <!--  can only have one unit, should below be #included in the above? -->
-        <!-- <unit bldFile="locsrv_plat/geocoding_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/geocoding_api/tsrc/mapnavproviderrefapp/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/location_centre_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/location_settings_launch_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_and_navigation_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_and_navigation_api/tsrc/mapnavproviderrefapp/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_and_navigation_provider_discovery_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_and_navigation_provider_discovery_api/tsrc/mapnavproviderrefapp/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_image_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_image_api/tsrc/testprovider/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_image_conversion_plugin_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/map_image_conversion_plugin_api/tsrc/mapnavproviderrefapp/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/oma_supl_asn_codec_plugin_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/supl_network_initiation_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/supl_pos_message_plugin_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/supl_pos_message_plugin_api/tsrc/posmsgpluginreferenceimpl/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/supl_settings_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_plat/supl_terminal_initiation_api/tsrc/group"/> -->
-      </component>
-      <component id="locationsrv_test" filter="s60" name="Location Services Test" purpose="development">
-        <!-- <unit bldFile="tsrc/group"/> -->
-      </component>
-      <component id="locsrv_pub" filter="s60" class="api" name="Location Services Public Interfaces">
-        <unit bldFile="locsrv_pub/group"/>
-        <!--  can only have one unit, should below be #included in the above? -->
-        <!-- <unit bldFile="locsrv_pub/blid_application_satellite_info_api/tsrc/bc_blid_application_satellite_info_api/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/blid_application_satellite_info_api/tsrc/ut_csatelliteuitest/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/landmarks_api/tsrc/bc_landmarks_api/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/landmarks_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/landmarks_database_management_api/tsrc/bc_landmarks_database_management_api/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/landmarks_database_management_api/tsrc/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/landmarks_search_api/tsrc/bc_landmarks_search_api/group"/> -->
-        <!-- <unit bldFile="locsrv_pub/landmarks_search_api/tsrc/group"/> -->
-      </component>
-    </collection>
-  </package>
-</SystemDefinition>
--- a/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -383,6 +383,11 @@
             {
             iOMASuplProtocolHandler2->HandlePacket(aPacket,aPortNum);
             }	
+    else
+    	if (iOMASuplProtocolHandler1)
+    		{
+    		iOMASuplProtocolHandler1->HandlePacket(aPacket,aPortNum);
+    		}
 		}			
 	}
 
@@ -515,6 +520,11 @@
 		    {
 		    iOMASuplProtocolHandler2->HandleSuplMessageL(aSuplSession,aStatus,aMessage);
 		    }
+		else
+    	if (iOMASuplProtocolHandler1)
+    		{
+    		iOMASuplProtocolHandler1->HandleSuplMessageL(aSuplSession,aStatus,aMessage);
+    		}
 		}			
 	}
 
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -83,6 +83,7 @@
 #include "epos_omasuplconfigurationkeys.h"
 #include "epos_csuplsettingparams.h"
 #include "epos_comasuplasnbase.h"
+#include "epos_csuplsettingsconstants.h"
 
 
 _LIT(KTraceFileName,"SUPL_OMA_SESSION::EPos_COMASuplSession.cpp");
@@ -1512,7 +1513,8 @@
 			TOMASuplUtcTime UtcTime;
 			TOMASuplPositionEstimate PosEstimate;
 			TDateTime TimeStamp;
-			TInt ZoneCode,Zone,altitude,AltitudeUncertainty, HorizontalAccuracy;
+			TInt ZoneCode,Zone,altitude, HorizontalAccuracy;
+			TInt AltitudeUncertainty = 0;
 			TOMASuplAltitudeInfo AltitudeInfo;
 			TInt latitude,longitude;
 			TOMASuplPositionEstimate::TOMASuplLatitudeSign LatSign;
@@ -1696,7 +1698,8 @@
 			TOMASuplUtcTime UtcTime;
 			TOMASuplPositionEstimate PosEstimate;
 			TDateTime TimeStamp;
-			TInt ZoneCode,Zone,altitude,AltitudeUncertainty, HorizontalAccuracy;
+			TInt ZoneCode,Zone,altitude, HorizontalAccuracy;
+			TInt AltitudeUncertainty = 0;
 			TOMASuplAltitudeInfo AltitudeInfo;
 			TInt latitude,longitude;
 			TOMASuplPositionEstimate::TOMASuplLatitudeSign LatSign;
@@ -1947,101 +1950,128 @@
 //
 void COMASuplSession::HandleOMASuplMessageL(COMASuplAsnMessageBase* aDecodedAsnMessage,TRequestStatus& aStatus,TInt aSessionIdSeed,TInt aErrorCode)
 	{
-		delete iSuplState;
-		iSuplState = NULL;
+	delete iSuplState;
+	iSuplState = NULL;
 		
-		iSETSessionUniqueId = aSessionIdSeed;
-		iRunRequestStatus = & aStatus;
-	    *iRunRequestStatus = KRequestPending;
+	iSETSessionUniqueId = aSessionIdSeed;
+	iRunRequestStatus = & aStatus;
+	*iRunRequestStatus = KRequestPending;
 	    
-		TInt networkMode = 1;
-		networkMode = GetNetworkModeL();
+	TInt networkMode = 1;
+	networkMode = GetNetworkModeL();
 		
-		TBuf<64> msg;
-		if ( networkMode == ECoreAppUIsNetworkConnectionNotAllowed )
-			{
-				msg.Copy(_L("The device is in OFFLINE mode."));
-				iTrace->Trace(msg,KTraceFileName, __LINE__); 
-				iSessionObserver.TerminateSession(this, KErrGeneral);
-				return;
-			}
-		else
-			{
-				msg.Copy(_L("The device is in ON LINE mode."));
-				iTrace->Trace(msg,KTraceFileName, __LINE__); 
-			}
-
-        CSuplSettings::TSuplSettingsUsage usage = iSuplSettings->SUPLUsage();
-
-        if (usage == CSuplSettings::ESuplUsageDisabled)
-            {                
-			msg.Copy(_L("SUPL Usage is disabled"));
-			iTrace->Trace(msg,KTraceFileName, __LINE__); 
-	        iSessionObserver.TerminateSession(this, KErrGeneral);	
-			return;
-            }
+	TBuf<64> msg;
+	if ( networkMode == ECoreAppUIsNetworkConnectionNotAllowed )
+		{
+		msg.Copy(_L("The device is in OFFLINE mode."));
+		iTrace->Trace(msg,KTraceFileName, __LINE__); 
+		iSessionObserver.TerminateSession(this, KErrGeneral);
+		return;
+		}
+	else
+		{
+		msg.Copy(_L("The device is in ON LINE mode."));
+		iTrace->Trace(msg,KTraceFileName, __LINE__); 
+		}
+
+    CSuplSettings::TSuplSettingsUsage usage = iSuplSettings->SUPLUsage();
+
+    if (usage == CSuplSettings::ESuplUsageDisabled)
+        {                
+		msg.Copy(_L("SUPL Usage is disabled"));
+		iTrace->Trace(msg,KTraceFileName, __LINE__); 
+	    iSessionObserver.TerminateSession(this, KErrGeneral);	
+		return;
+        }
 	    
-	    COMASuplAsnMessageBase::TSuplMessageType messageType = aDecodedAsnMessage->MessageType();
+	COMASuplAsnMessageBase::TSuplMessageType messageType = aDecodedAsnMessage->MessageType();
 	    
-	    if(messageType == COMASuplAsnMessageBase::ESUPL_INIT && aErrorCode == KErrNone)
+	if(messageType == COMASuplAsnMessageBase::ESUPL_INIT && aErrorCode == KErrNone)
+		{
+	    HandleOMASuplMessageL(aDecodedAsnMessage);
+	    }
+	else //Other messages than SUPL_INIT.... Send End
+	    {
+	    CreateCloneMessageL(aDecodedAsnMessage);		
+	    UpdateSuplSessionIDL();
+
+	    if (iRequestType == ESUPL_NETWORK && messageType == COMASuplAsnMessageBase::ESUPL_INIT)
 	    	{
-	    		HandleOMASuplMessageL(aDecodedAsnMessage);
+			ServerAddressCheckForSuplInitL();
 	    	}
-	    else //Other messages than SUPL_INIT.... Send End
-	    	{
-	    		CreateCloneMessageL(aDecodedAsnMessage);		
-	    		UpdateSuplSessionIDL();
  
-				iSuplSessionState = ESUPL_INITIALIZED;
-				iSuplMsgType = ESUPL_END;
-
-	    		if((aErrorCode == KErrCompletion && messageType == COMASuplAsnMessageBase::ESUPL_INIT) ||
-	    			(aErrorCode == KErrOMASuplOutOfRangeParameter && messageType == COMASuplAsnMessageBase::ESUPL_INIT) ||
-	    			(aErrorCode == KErrOMASuplMessageLengthMismatch && messageType == COMASuplAsnMessageBase::ESUPL_INIT) ||
-						(aErrorCode == KErrOMASuplShortFrame && messageType == COMASuplAsnMessageBase::ESUPL_INIT))	    			
-	    			{
-	    				iErrorStatusCode = COMASuplEnd::EUnexpectedDataValue;
-	    				if(aErrorCode == KErrOMASuplMessageLengthMismatch)
-	    					{
-	    						iErrorStatusCode = COMASuplEnd::EProtocolError;
-	    					}
-      				if(aErrorCode == KErrOMASuplShortFrame)
-	    					{
-	    						iErrorStatusCode = COMASuplEnd::EDataMissing;
-	    					}
-						TInt len = iHSLPAddress.Length();
-						HBufC8 *hslpAdress = NULL;
-						if(len > 0)
-						{
-							hslpAdress = HBufC8::NewL(iHSLPAddress.Length());
-							hslpAdress->Des().Copy(iHSLPAddress);
-						}
+		iSuplSessionState = ESUPL_INITIALIZED;
+		iSuplMsgType = ESUPL_END;
+
+	    if((aErrorCode == KErrCompletion && messageType == COMASuplAsnMessageBase::ESUPL_INIT) ||
+	    	(aErrorCode == KErrOMASuplOutOfRangeParameter && messageType == COMASuplAsnMessageBase::ESUPL_INIT) ||
+	    	(aErrorCode == KErrOMASuplMessageLengthMismatch && messageType == COMASuplAsnMessageBase::ESUPL_INIT) ||
+			(aErrorCode == KErrOMASuplShortFrame && messageType == COMASuplAsnMessageBase::ESUPL_INIT))	    			
+	   		{
+	    	iErrorStatusCode = COMASuplEnd::EUnexpectedDataValue;
+	    	if(aErrorCode == KErrOMASuplMessageLengthMismatch)
+	    		{
+	    		iErrorStatusCode = COMASuplEnd::EProtocolError;
+	    		}
+      		if(aErrorCode == KErrOMASuplShortFrame)
+	    		{
+	    		iErrorStatusCode = COMASuplEnd::EDataMissing;
+	    		}
+			TInt len = iHSLPAddress.Length();
+			HBufC8 *hslpAdress = NULL;
+			if(len > 0)
+				{
+				hslpAdress = HBufC8::NewL(iHSLPAddress.Length());
+				hslpAdress->Des().Copy(iHSLPAddress);
+				}						
+			else if(len ==0)
+				{
+				CServerParams* serverParams = CServerParams::NewL();
+				CleanupStack::PushL(serverParams);
+					
+				if (iSuplStorageSettings->GetDefaultServer(serverParams) == KErrNotFound )
+					{
+					iTrace->Trace(_L("HSLP generated frm IMSI"), KTraceFileName, __LINE__);
+					hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
+					hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());
+					}		
+				else
+					{
+					iTrace->Trace(_L("Sending End with ver for Default HSLP"), KTraceFileName, __LINE__);
+					TInt64 slpId;
+            		TBool aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable;
+					HBufC* serverAddr = HBufC::NewL(KMaxHSLPAddrLen);
+					HBufC* iapName = HBufC::NewL(KMaxIAPLen);
+					CleanupStack::PushL(serverAddr);
+					CleanupStack::PushL(iapName);
+					serverParams->Get(slpId,serverAddr->Des(),iapName->Des(),aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable);
+					hslpAdress = HBufC8::NewL(serverAddr->Length());
+					hslpAdress->Des().Copy(*serverAddr);
 						
-						else if(len ==0)
-						{
-						iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
-						hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
-						CleanupStack::PushL(hslpAdress);
-						hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
-						CleanupStack::Pop(hslpAdress);						
-						}
-						CleanupStack::PushL(hslpAdress);
-						iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
-						CleanupStack::PopAndDestroy(hslpAdress);
-	    			}
-	    		else
-	    			{
-	    				iErrorStatusCode = COMASuplEnd::EUnexpectedMessage;
-	    				iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl);
-	    			}	
+					CleanupStack::PopAndDestroy(iapName);
+					CleanupStack::PopAndDestroy(serverAddr);
+							
+					}
+				CleanupStack::PopAndDestroy(serverParams);
+				}
+			delete iSuplState;
+			iSuplState = NULL;
+			CleanupStack::PushL(hslpAdress);
+			iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);
+			CleanupStack::PopAndDestroy(hslpAdress);
+	    	}
+	    else
+	    	{
+	    		iErrorStatusCode = COMASuplEnd::EUnexpectedMessage;
+	    		iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl);
+	    	}	
 	    			
-	    		SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating);	
-				iSuplState->SetMsgStateObserver(this);
-				//SMP Changes
-				iSuplSessionState = ESUPL_GENERATE;
-				iSuplState->GenerateMessageL();
-				 
-	    	}	
+	    SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating);	
+		iSuplState->SetMsgStateObserver(this);
+		//SMP Changes
+		iSuplState->GenerateMessageL(); //Has to be here because initialisation has to be done for NI case in decode failed scenario.
+		iSuplSessionState = ESUPL_GENERATE;				 
+		}	
 	}
 
 // -----------------------------------------------------------------------------
@@ -2052,10 +2082,11 @@
 //
 void COMASuplSession::HandleOMASuplMessageL(COMASuplAsnMessageBase* aDecodedAsnMessage)
 	{
+    CreateCloneMessageL(aDecodedAsnMessage);
 		if(CheckProtocolVersionL(aDecodedAsnMessage)) //Checks version with supported version
 		{
 			COMASuplAsnMessageBase::TSuplMessageType messageType = aDecodedAsnMessage->MessageType();
-			CreateCloneMessageL(aDecodedAsnMessage);		
+
 			if(messageType != COMASuplAsnMessageBase::ESUPL_POS)
 				{
 					iCompleteSelfRequestor->CompleteSelf(); //This will result in call of RequestCompleted()
@@ -3255,26 +3286,48 @@
 		
 			else if(len ==0)
 				{
-					iTrace->Trace(_L("HSLP generated frm IMSI"), KTraceFileName, __LINE__);
-					hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
-					CleanupStack::PushL(hslpAdress);
-					hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());
-					CleanupStack::Pop(hslpAdress);	
+					CServerParams* serverParams = CServerParams::NewL();
+					CleanupStack::PushL(serverParams);
+					
+						if (iSuplStorageSettings->GetDefaultServer(serverParams) == KErrNotFound )
+						{
+						iTrace->Trace(_L("HSLP generated frm IMSI"), KTraceFileName, __LINE__);
+						hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
+						CleanupStack::PushL(hslpAdress);
+						hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());
+						CleanupStack::Pop(hslpAdress);	
+						}
+						else
+						{
+							iTrace->Trace(_L("Default HSLP"), KTraceFileName, __LINE__);
+							TInt64 slpId;
+							TBool aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable;
+							HBufC* serverAddr = HBufC::NewL(KMaxHSLPAddrLen);
+							HBufC* iapName = HBufC::NewL(KMaxIAPLen);
+							CleanupStack::PushL(serverAddr);
+							CleanupStack::PushL(iapName);
+							serverParams->Get(slpId,serverAddr->Des(),iapName->Des(),aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable);
+							hslpAdress = HBufC8::NewL(serverAddr->Length());
+							hslpAdress->Des().Copy(*serverAddr);
+						
+							CleanupStack::PopAndDestroy(iapName);
+							CleanupStack::PopAndDestroy(serverAddr);
+							
+						}
+					CleanupStack::PopAndDestroy(serverParams);	
 					
 				}
-		CleanupStack::PushL(hslpAdress);
-		
-		delete iSuplState;
-		iSuplState = NULL;
-		
- 		if(setStatusCode)
- 			{
-	 			iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
- 			}
- 		else
- 			{
- 				iSuplState = COMASuplEndState::NewL(iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress );
- 			} 		
+            delete iSuplState;
+            iSuplState = NULL;
+            CleanupStack::PushL(hslpAdress);
+            if(setStatusCode)
+                {
+                iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
+                }
+            else
+                {
+                iSuplState = COMASuplEndState::NewL(iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress );
+                } 		
  			
  		CleanupStack::PopAndDestroy(hslpAdress);
  		
@@ -3728,81 +3781,114 @@
 // -----------------------------------------------------------------------------
 TBool COMASuplSession::CheckProtocolVersionL(COMASuplAsnMessageBase* aDecodedAsn)
 	{
-		TOMASuplVersion version;
-		COMASuplSessionID* SessionID = NULL;
-		aDecodedAsn->MessageBase(version,SessionID);
-		
-		TInt recMajor,recMinor,recServInd;
-		version.SuplVersion(recMajor,recMinor,recServInd);		
-		
-		if(recMajor == KSuplMajorVersion )
-			{
-				return  ETrue;
-			} 
-		else
-			{
-			COMASuplAsnMessageBase::TSuplMessageType messageType = aDecodedAsn->MessageType();
-			if(messageType == COMASuplAsnMessageBase::ESUPL_END) 
-				{
-					iTrace->Trace(_L("Received message is SUPL_END...with wrong Version.Terminating session"), KTraceFileName, __LINE__); 
-					iSessionObserver.TerminateSession(this, KErrCompletion);	
-				}
-			else
-				{
-					iTrace->Trace(_L("Received message with wrong version."), KTraceFileName, __LINE__); 
-
-					delete iSuplState;
-					iSuplMsgType = ESUPL_END;
-					iErrorStatusCode = COMASuplEnd::EVersionNotSupported;	
-					SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating);	
-
-					if(iRequestType == ESUPL_NETWORK )
-					{
-						
-						iSuplSessionState = ESUPL_INITIALIZED;
-					    TInt len = iHSLPAddress.Length();
-					    HBufC8 *hslpAdress = NULL;
-					    if(len > 0)
-					    {
-					        hslpAdress = HBufC8::NewL(iHSLPAddress.Length());
-					        hslpAdress->Des().Copy(iHSLPAddress);
-					    }
-				   	else if(len ==0)
-					{
-					iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
-					hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
-					CleanupStack::PushL(hslpAdress);
-					hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
-					CleanupStack::Pop(hslpAdress);
-					    }
-						
-					    CleanupStack::PushL(hslpAdress);
-					    iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
-					    CleanupStack::PopAndDestroy(hslpAdress);
-
-			            // Set the SessionId.
-				        iTrace->Trace(_L("COMASuplSession::CheckProtocolVersionL Update SLP Session ID"), KTraceFileName, __LINE__);
-			            UpdateSLPSessionIDL(SessionID);
-
-				        iTrace->Trace(_L("COMASuplSession::CheckProtocolVersionL Update SET Session ID"), KTraceFileName, __LINE__);
-			            UpdateSETSessionIDL(SessionID);
-						iSuplState->SetMsgStateObserver(this);
-						iSuplState->GenerateMessageL();
-						iSuplSessionState = ESUPL_GENERATE;
-
-					} 
-					else 							
-					{
-					    iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl);
-						iSuplSessionState = ESUPL_ENCODE;
-						iSuplState->SetMsgStateObserver(this);
-						iSuplState->GenerateMessageL();
-					}
-				}	
-				
-			return EFalse;
-			}	
-
+    TOMASuplVersion version;
+    COMASuplSessionID* SessionID = NULL;
+    aDecodedAsn->MessageBase(version,SessionID);
+    
+    TInt recMajor,recMinor,recServInd;
+    version.SuplVersion(recMajor,recMinor,recServInd);		
+    
+    if(recMajor == KSuplMajorVersion )
+        {
+        return  ETrue;
+        } 
+    else
+        {
+        COMASuplAsnMessageBase::TSuplMessageType messageType = aDecodedAsn->MessageType();
+        if(messageType == COMASuplAsnMessageBase::ESUPL_END) 
+            {
+            iTrace->Trace(_L("Received message is SUPL_END...with wrong Version.Terminating session"), KTraceFileName, __LINE__); 
+            iSessionObserver.TerminateSession(this, KErrCompletion);	
+            }
+        else
+            {
+            iTrace->Trace(_L("Received message with wrong version."), KTraceFileName, __LINE__); 
+
+            delete iSuplState;
+            iSuplMsgType = ESUPL_END;
+            iErrorStatusCode = COMASuplEnd::EVersionNotSupported;	
+            SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating);	
+
+            if(iRequestType == ESUPL_NETWORK )
+                {
+                if (messageType == COMASuplAsnMessageBase::ESUPL_INIT)    
+                    {                                
+                    iSuplSessionState = ESUPL_INITIALIZED;
+                    TInt len = iHSLPAddress.Length();
+                    HBufC8 *hslpAdress = NULL;
+                    if(len > 0)
+                        {
+                        hslpAdress = HBufC8::NewL(iHSLPAddress.Length());
+                        hslpAdress->Des().Copy(iHSLPAddress);
+                        }
+                    else if(len ==0)
+                        {
+                        CServerParams* serverParams = CServerParams::NewL();
+                        CleanupStack::PushL(serverParams);
+        
+                        if (iSuplStorageSettings->GetDefaultServer(serverParams) == KErrNotFound )
+                            {
+                            iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
+                            hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
+                            hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
+                            }		
+                        else
+                            {
+                            iTrace->Trace(_L("Sending End with ver for Default HSLP"), KTraceFileName, __LINE__);
+                            TInt64 slpId;
+                            TBool aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable;
+                            HBufC* serverAddr = HBufC::NewL(KMaxHSLPAddrLen);
+                            HBufC* iapName = HBufC::NewL(KMaxIAPLen);
+                            CleanupStack::PushL(serverAddr);
+                            CleanupStack::PushL(iapName);
+                            serverParams->Get(slpId,serverAddr->Des(),iapName->Des(),aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable);
+                            hslpAdress = HBufC8::NewL(serverAddr->Length());
+                            hslpAdress->Des().Copy(*serverAddr);
+            
+                            CleanupStack::PopAndDestroy(iapName);
+                            CleanupStack::PopAndDestroy(serverAddr);
+                            }
+                        CleanupStack::PopAndDestroy(serverParams);
+                        }
+                    
+                    delete iSuplState;
+                    iSuplState = NULL;
+                    CleanupStack::PushL(hslpAdress);
+                    ServerAddressCheckForSuplInitL();
+                    iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
+                    CleanupStack::PopAndDestroy(hslpAdress);
+
+                    // Set the SessionId.
+                    iTrace->Trace(_L("COMASuplSession::CheckProtocolVersionL Update SLP Session ID"), KTraceFileName, __LINE__);
+                    UpdateSLPSessionIDL(SessionID);
+
+                    iTrace->Trace(_L("COMASuplSession::CheckProtocolVersionL Update SET Session ID"), KTraceFileName, __LINE__);
+                    UpdateSETSessionIDL(SessionID);
+                    iSuplState->SetMsgStateObserver(this);
+                    iSuplState->GenerateMessageL();
+                    iSuplSessionState = ESUPL_GENERATE;
+                    }
+                else
+                    {                                
+                    iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl);		
+                    UpdateSLPSessionIDL(SessionID);
+                    UpdateSETSessionIDL(SessionID);
+                    iSuplState->SetMsgStateObserver(this);
+                    iRequestType = ESUPL_INVALID_SESSION;
+                    iSuplSessionState = ESUPL_GENERATE;
+                    iSuplState->GenerateMessageL();
+                    }
+                } 
+            else 							
+                {
+                iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl);
+                iSuplSessionState = ESUPL_ENCODE;
+                iSuplState->SetMsgStateObserver(this);
+                iSuplState->GenerateMessageL();
+                }
+            }	
+        return EFalse;
+        }	
 	}
 
 // -----------------------------------------------------------------------------
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -90,6 +90,7 @@
 #include "epos_omasuplconfigurationkeys.h"
 #include "epos_csuplsettingparams.h"
 #include "epos_comasuplasnbase.h"
+#include "epos_csuplsettingsconstants.h"
 
 
 _LIT(KTraceFileName,"SUPL_OMA_SESSION::EPos_COMASuplSession2.cpp");
@@ -1718,7 +1719,8 @@
     TOMASuplUtcTime UtcTime;
     TOMASuplPositionEstimate PosEstimate;
     TDateTime TimeStamp;
-    TInt ZoneCode,Zone,altitude,AltitudeUncertainty, HorizontalAccuracy;
+    TInt ZoneCode,Zone,altitude, HorizontalAccuracy;
+	TInt AltitudeUncertainty = 0;
     TOMASuplAltitudeInfo AltitudeInfo;
     TInt latitude,longitude;
     TOMASuplPositionEstimate::TOMASuplLatitudeSign LatSign;
@@ -1902,7 +1904,8 @@
     TOMASuplUtcTime UtcTime;
     TOMASuplPositionEstimate PosEstimate;
     TDateTime TimeStamp;
-    TInt ZoneCode,Zone,altitude,AltitudeUncertainty, HorizontalAccuracy;
+    TInt ZoneCode,Zone,altitude, HorizontalAccuracy;
+	TInt AltitudeUncertainty = 0;
     TOMASuplAltitudeInfo AltitudeInfo;
     TInt latitude,longitude;
     TOMASuplPositionEstimate::TOMASuplLatitudeSign LatSign;
@@ -2222,12 +2225,35 @@
 
             else if(len ==0)
                 {
-                iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
-                hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
-                CleanupStack::PushL(hslpAdress);
-                hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
-                CleanupStack::Pop(hslpAdress);						
+                CServerParams* serverParams = CServerParams::NewL();
+                CleanupStack::PushL(serverParams);
+    
+                if (iSuplStorageSettings->GetDefaultServer(serverParams) == KErrNotFound )
+                    {
+                    iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
+                    hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
+                    hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
+                    }
+                else
+                    {
+                    iTrace->Trace(_L("Sending End with ver for Default HSLP"), KTraceFileName, __LINE__);
+                    TInt64 slpId;
+                    TBool aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable;
+                    HBufC* serverAddr = HBufC::NewL(KMaxHSLPAddrLen);
+                    HBufC* iapName = HBufC::NewL(KMaxIAPLen);
+                    CleanupStack::PushL(serverAddr);
+                    CleanupStack::PushL(iapName);
+                    serverParams->Get(slpId,serverAddr->Des(),iapName->Des(),aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable);
+                    hslpAdress = HBufC8::NewL(serverAddr->Length());
+                    hslpAdress->Des().Copy(*serverAddr);
+    
+                    CleanupStack::PopAndDestroy(iapName);
+                    CleanupStack::PopAndDestroy(serverAddr);
+                    }
+                CleanupStack::PopAndDestroy(serverParams);
                 }
+            delete iSuplState;
+            iSuplState=NULL;
             CleanupStack::PushL(hslpAdress);
             iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
             CleanupStack::PopAndDestroy(hslpAdress);
@@ -3857,11 +3883,34 @@
 
     else if(len ==0)
         {
-        iTrace->Trace(_L("HSLP generated frm IMSI"), KTraceFileName, __LINE__);
-        hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
-        CleanupStack::PushL(hslpAdress);
-        hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());
-        CleanupStack::Pop(hslpAdress);	
+		CServerParams* serverParams = CServerParams::NewL();
+		CleanupStack::PushL(serverParams);
+		
+		if (iSuplStorageSettings->GetDefaultServer(serverParams) == KErrNotFound )
+			{
+	        iTrace->Trace(_L("HSLP generated frm IMSI"), KTraceFileName, __LINE__);
+	        hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
+	        CleanupStack::PushL(hslpAdress);
+	        hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());
+	        CleanupStack::Pop(hslpAdress);	
+			}
+		else
+			{
+			iTrace->Trace(_L("Default HSLP"), KTraceFileName, __LINE__);
+			TInt64 slpId;
+			TBool aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable;
+			HBufC* serverAddr = HBufC::NewL(KMaxHSLPAddrLen);
+			HBufC* iapName = HBufC::NewL(KMaxIAPLen);
+			CleanupStack::PushL(serverAddr);
+			CleanupStack::PushL(iapName);
+			serverParams->Get(slpId,serverAddr->Des(),iapName->Des(),aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable);
+			hslpAdress = HBufC8::NewL(serverAddr->Length());
+			hslpAdress->Des().Copy(*serverAddr);
+		
+			CleanupStack::PopAndDestroy(iapName);
+			CleanupStack::PopAndDestroy(serverAddr);
+			}
+		CleanupStack::PopAndDestroy(serverParams);
 
         }
     CleanupStack::PushL(hslpAdress);
@@ -4390,13 +4439,36 @@
                     	}
                 	else if(len ==0)
                     	{
-                    	iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
-                    	hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
-                    	CleanupStack::PushL(hslpAdress);
-                    	hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
-                    	CleanupStack::Pop(hslpAdress);
+						CServerParams* serverParams = CServerParams::NewL();
+						CleanupStack::PushL(serverParams);
+					
+						if (iSuplStorageSettings->GetDefaultServer(serverParams) == KErrNotFound )
+							{
+	                    	iTrace->Trace(_L("Length of HSLP Address is = 0, passing the HSLP generated frm IMSI"), KTraceFileName, __LINE__);
+	                    	hslpAdress = HBufC8::NewL(iSuplSettings->SLPAddressfromImsi().Length());
+	                    	hslpAdress->Des().Copy(iSuplSettings->SLPAddressfromImsi());	
+							}
+							else
+							{
+							iTrace->Trace(_L("Sending End with ver for Default HSLP"), KTraceFileName, __LINE__);
+							TInt64 slpId;
+            				TBool aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable;
+							HBufC* serverAddr = HBufC::NewL(KMaxHSLPAddrLen);
+							HBufC* iapName = HBufC::NewL(KMaxIAPLen);
+							CleanupStack::PushL(serverAddr);
+							CleanupStack::PushL(iapName);
+							serverParams->Get(slpId,serverAddr->Des(),iapName->Des(),aServerEnabled, aSimChangeRemove, aUsageInHomeNw, aEditable);
+							hslpAdress = HBufC8::NewL(serverAddr->Length());
+							hslpAdress->Des().Copy(*serverAddr);
+			
+							CleanupStack::PopAndDestroy(iapName);
+							CleanupStack::PopAndDestroy(serverAddr);
+							}
+						CleanupStack::PopAndDestroy(serverParams);
                     	}
 
+			    delete iSuplState;
+			    iSuplState = NULL;
                 CleanupStack::PushL(hslpAdress);
                 ServerAddressCheckForSuplInitL();
                 iSuplState = COMASuplEndState::NewL(iErrorStatusCode,iOMASuplAsnHandlerBaseImpl,iEncodedSuplInit,hslpAdress);		
--- a/supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler.iby	Mon Mar 15 12:42:19 2010 +0200
+++ b/supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler.iby	Wed Mar 31 22:18:21 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2005 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-2010 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"
@@ -45,9 +45,10 @@
 //OMA Protocol Handler Plugin & resource file
 ECOM_PLUGIN(eposomasuplprotocolhandler1.dll,eposomasuplprotocolhandler1.rsc)
 
+#ifndef FF_DISABLE_OMA_SUPL_V2
 //OMA Protocol Handler Plugin & resource file
 ECOM_PLUGIN(eposomasuplprotocolhandler2.dll,eposomasuplprotocolhandler2.rsc)
-
+#endif // FF_DISABLE_OMA_SUPL_V2
 
 //OMA Provisioning
 ECOM_PLUGIN(epos_omasuplprovhandler.dll,1027509B.rsc)
--- a/supl/locationsuplfw/gateway/src/epos_csuplnetinitiatedsession.cpp	Mon Mar 15 12:42:19 2010 +0200
+++ b/supl/locationsuplfw/gateway/src/epos_csuplnetinitiatedsession.cpp	Wed Mar 31 22:18:21 2010 +0300
@@ -67,13 +67,22 @@
     	suplService = RSuplTerminalSubSession::ESUPL_1_0;
     
     iSuplSession = aSessnMgr.CreateNewSessionL(aReqType, 0, suplService );
-    
     if (iSuplSession)
-    {
+    {	
     iSuplSession->SetSUPLVersion(majorVersion);
     iSuplSessnReq = CSuplSessionRequest::NewL(aSessnMgr, iSuplSession, aServer);
-    }
-  
+    }  
+    else
+    	if (!iSuplSession && suplService == RSuplTerminalSubSession::ESUPL_2_0)
+    		{
+    			 suplService = RSuplTerminalSubSession::ESUPL_1_0;
+    			 iSuplSession = aSessnMgr.CreateNewSessionL(aReqType, 0, suplService );
+    					if (iSuplSession)
+   						 {	
+   						 iSuplSession->SetSUPLVersion(majorVersion);
+    					 iSuplSessnReq = CSuplSessionRequest::NewL(aSessnMgr, iSuplSession, aServer);
+    					 }
+    		}
 
     }