Revision: 201019
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 13:18:17 +0300
changeset 25 73f6c2762ffe
parent 22 4c4ed41530db
child 32 b12ea03c50a3
Revision: 201019 Kit: 2010121
layers.sysdef.xml
locationsystemui/locationsysui/group/bld.inf
locationsystemui/locationsysui/locsysui.pro
locationsystemui/locationsysui/possettings/bwins/possettingsengineu.def
locationsystemui/locationsysui/possettings/conf/positioningsettings.confml
locationsystemui/locationsysui/possettings/conf/positioningsettings_2002E685.crml
locationsystemui/locationsysui/possettings/eabi/possettingsengineu.def
locationsystemui/locationsysui/possettings/inc/possettingsadvinterface.h
locationsystemui/locationsysui/possettings/inc/possettingsadvop.h
locationsystemui/locationsysui/possettings/inc/possettingscrkey.h
locationsystemui/locationsysui/possettings/inc/possettingsglobal.h
locationsystemui/locationsysui/possettings/inc/possettingsview.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/locationservicescustomviewitem.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/locationserviceswidget.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservices.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicescommon.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicesengine.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicesengineprivate.h
locationsystemui/locationsysui/possettings/poslocationservices/inc/possettingssignalmapper.h
locationsystemui/locationsysui/possettings/poslocationservices/poslocationservices.pro
locationsystemui/locationsysui/possettings/poslocationservices/poslocationservices.qrc
locationsystemui/locationsysui/possettings/poslocationservices/resources/locationservicesviewitemwidget.css
locationsystemui/locationsysui/possettings/poslocationservices/resources/locationserviceswidget.css
locationsystemui/locationsysui/possettings/poslocationservices/resources/locationserviceswidget.widgetml
locationsystemui/locationsysui/possettings/poslocationservices/resources/qgn_note_warning.svg
locationsystemui/locationsysui/possettings/poslocationservices/src/locationservicescustomviewitem.cpp
locationsystemui/locationsysui/possettings/poslocationservices/src/locationserviceswidget.cpp
locationsystemui/locationsysui/possettings/poslocationservices/src/poslocationservices.cpp
locationsystemui/locationsysui/possettings/poslocationservices/src/poslocationservicesengine.cpp
locationsystemui/locationsysui/possettings/poslocationservices/src/poslocationservicesengineprivate.cpp
locationsystemui/locationsysui/possettings/poslocationservices/src/possettingssignalmapper.cpp
locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingscommon.h
locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingsengine.h
locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingsengineprivate.h
locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingsplugin.h
locationsystemui/locationsysui/possettings/posmethodsplugin/inc/possettingssignalmapper.h
locationsystemui/locationsysui/possettings/posmethodsplugin/pospsysettings.pro
locationsystemui/locationsysui/possettings/posmethodsplugin/src/pospsysettingsengine.cpp
locationsystemui/locationsysui/possettings/posmethodsplugin/src/pospsysettingsengineprivate.cpp
locationsystemui/locationsysui/possettings/posmethodsplugin/src/pospsysettingsplugin.cpp
locationsystemui/locationsysui/possettings/posmethodsplugin/src/possettingssignalmapper.cpp
locationsystemui/locationsysui/possettings/possettings.pro
locationsystemui/locationsysui/possettings/possettings_stub.sis
locationsystemui/locationsysui/possettings/possettingsengine/inc/checkcustomviewitem.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsadvview.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingscommon.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsengine.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsengineprivate.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsform.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsgroupboxitem.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingspluginsloader.h
locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingspushbuttonitem.h
locationsystemui/locationsysui/possettings/possettingsengine/possettings.qrc
locationsystemui/locationsysui/possettings/possettingsengine/possettingsengine.pro
locationsystemui/locationsysui/possettings/possettingsengine/resources/checkcustomviewitem.css
locationsystemui/locationsysui/possettings/possettingsengine/resources/groupboxcustomviewitem.css
locationsystemui/locationsysui/possettings/possettingsengine/resources/pushbuttoncustomviewitem.css
locationsystemui/locationsysui/possettings/possettingsengine/src/checkcustomviewitem.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsadvop.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsadvview.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsengine.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsengineprivate.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsform.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsgroupboxitem.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingspluginsloader.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingspushbuttonitem.cpp
locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsview.cpp
locationsystemui/locationsysui/possettings/possettingsplugin/inc/apilogger.h
locationsystemui/locationsysui/possettings/possettingsplugin/inc/possettingsplugin.h
locationsystemui/locationsysui/possettings/possettingsplugin/inc/possettingspluginhelper.h
locationsystemui/locationsysui/possettings/possettingsplugin/inc/possettingspluginhelper_p.h
locationsystemui/locationsysui/possettings/possettingsplugin/possettingsplugin.pro
locationsystemui/locationsysui/possettings/possettingsplugin/possettingsplugin.qrc
locationsystemui/locationsysui/possettings/possettingsplugin/src/apilogger.cpp
locationsystemui/locationsysui/possettings/possettingsplugin/src/possettingsplugin.cpp
locationsystemui/locationsysui/possettings/possettingsplugin/src/possettingspluginhelper.cpp
locationsystemui/locationsysui/possettings/possettingsplugin/src/possettingspluginhelper_p.cpp
locationsystemui/locationsysui/possettings/possettingsplugin/translations/possettings.qm
locationsystemui/locationsysui/possettings/possettingsplugin/translations/possettings.ts
locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possettingssignalmapper.h
locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettings.h
locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettingscommon.h
locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettingsengine.h
locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettingsengineprivate.h
locationsystemui/locationsysui/possettings/possuplsettingsplugin/possuplsettings.pro
locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possettingssignalmapper.cpp
locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possuplsettings.cpp
locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possuplsettingsengine.cpp
locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possuplsettingsengineprivate.cpp
locationsystemui/locationsysui/possettings/rom/possettings.iby
locationsystemui/locationsysui/possettings/rom/possettings_resources.iby
supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplconnrequestor.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplfallbackhandler.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver2/inc/epos_comasuplconnrequestor.h
supl/locationomasuplprotocolhandler/protocolhandlerver2/inc/epos_comasuplfallbackhandler.h
supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplconnrequestor.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplfallbackhandler.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplprotocolmanager2.cpp
supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp
supl/locationomasuplprotocolhandler/provisioninghandler/group/epos_omasuplprovhandler.mmp
supl/locationomasuplprotocolhandler/provisioninghandler/src/epos_comasuplsettings.cpp
supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler.iby
supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler_resource.iby
--- a/layers.sysdef.xml	Fri May 14 16:17:02 2010 +0300
+++ b/layers.sysdef.xml	Thu May 27 13:18:17 2010 +0300
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
   <!ENTITY layer_real_source_path "sf/mw/locationsrv" >
 ]>
 
-<SystemDefinition name="locationsrv" schema="1.4.0">
+<SystemDefinition name="locationsrv" schema="1.5.1">
   <systemModel>
     <layer name="mw_layer">
       <module name="locationsrv">
@@ -12,13 +12,16 @@
       <module name="asnpluginimplementation"> 
      	<unit unitID="lodo.locationsrv.supl.asnpluginimplementation"
        mrp="" bldFile="&layer_real_source_path;/supl/locationomasuplprotocolhandler/asnpluginimplementation/group"
-       filter="dfs_build"  name="lodo_locationsrv_supl_asnpluginimplementation>"  />
+       filter="dfs_build"  name="lodo_locationsrv_supl_asnpluginimplementation"  />
      </module>
      <module name="asnpluginimplementationver2"> 
      	<unit unitID="lodo.locationsrv.supl.asnpluginimplementationver2"
        mrp="" bldFile="&layer_real_source_path;/supl/locationomasuplprotocolhandler/asnpluginimplementationver2/group"
-       filter="dfs_build"  name="lodo_locationsrv_supl_asnpluginimplementationver2>"  />
+       filter="dfs_build"  name="lodo_locationsrv_supl_asnpluginimplementationver2"  />
      </module>
+     <module name="locationsysui_pro">
+     	<unit unitID="locationsysui.pro" mrp="" bldFile="&layer_real_source_path;/locationsystemui/locationsysui" name="locationsysui_pro" proFile="locsysui.pro" />
+     	</module>
      </layer>
   </systemModel>
 </SystemDefinition>
--- a/locationsystemui/locationsysui/group/bld.inf	Fri May 14 16:17:02 2010 +0300
+++ b/locationsystemui/locationsysui/group/bld.inf	Thu May 27 13:18:17 2010 +0300
@@ -23,13 +23,14 @@
 PRJ_PLATFORMS
 DEFAULT
 
+PRJ_EXPORTS
 
 // Export Configuration Markup language and Central Repository Mark up language files
 
 ../conf/loclocalvariation.confml       	MW_LAYER_CONFML(loclocalvariation.confml)
 ../conf/loclocalvariation_20022D83.crml MW_LAYER_CRML(loclocalvariation_20022D83.crml)
 
-PRJ_EXPORTS
+
 // Query and Notification
 #include "../queryandnotification/group/bld.inf" 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/locsysui.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,23 @@
+#
+# 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:  project file for Locsysui                                                    
+#                                                                    
+
+
+TEMPLATE = subdirs
+
+SYMBIAN_PLATFORMS = WINSCW ARMV5
+
+SUBDIRS += possettings/possettings.pro
+
+   
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/bwins/possettingsengineu.def	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,26 @@
+EXPORTS	?trUtf8@PosSettingsAdvOp@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString PosSettingsAdvOp::trUtf8(char const *, char const *)
+	?staticMetaObject@PosSettingsAdvOp@@2UQMetaObject@@B @ 2 NONAME ; struct QMetaObject const PosSettingsAdvOp::staticMetaObject
+	?setExpanded@PosSettingsAdvOp@@QAEXABVQModelIndex@@_N@Z @ 3 NONAME ; void PosSettingsAdvOp::setExpanded(class QModelIndex const &, bool)
+	?addAction@PosSettingsAdvOp@@QAEXPAVHbAction@@W4ActionContainer@HbView@@@Z @ 4 NONAME ; void PosSettingsAdvOp::addAction(class HbAction *, enum HbView::ActionContainer)
+	?qt_metacast@PosSettingsAdvOp@@UAEPAXPBD@Z @ 5 NONAME ; void * PosSettingsAdvOp::qt_metacast(char const *)
+	??_EPosSettingsView@@UAE@I@Z @ 6 NONAME ; PosSettingsView::~PosSettingsView(unsigned int)
+	?isExpanded@PosSettingsAdvOp@@QBE_NABVQModelIndex@@@Z @ 7 NONAME ; bool PosSettingsAdvOp::isExpanded(class QModelIndex const &) const
+	?addConnection@PosSettingsAdvOp@@QAEXPAVHbDataFormModelItem@@PBDPAVQObject@@1@Z @ 8 NONAME ; void PosSettingsAdvOp::addConnection(class HbDataFormModelItem *, char const *, class QObject *, char const *)
+	?tr@PosSettingsAdvOp@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString PosSettingsAdvOp::tr(char const *, char const *, int)
+	?appendDataFormItem@PosSettingsAdvOp@@QAEXPAVHbDataFormModelItem@@0@Z @ 10 NONAME ; void PosSettingsAdvOp::appendDataFormItem(class HbDataFormModelItem *, class HbDataFormModelItem *)
+	??1PosSettingsAdvOp@@UAE@XZ @ 11 NONAME ; PosSettingsAdvOp::~PosSettingsAdvOp(void)
+	?qt_metacall@PosSettingsAdvOp@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 12 NONAME ; int PosSettingsAdvOp::qt_metacall(enum QMetaObject::Call, int, void * *)
+	??0PosSettingsAdvOp@@QAE@PAVHbView@@@Z @ 13 NONAME ; PosSettingsAdvOp::PosSettingsAdvOp(class HbView *)
+	??_EPosSettingsAdvOp@@UAE@I@Z @ 14 NONAME ; PosSettingsAdvOp::~PosSettingsAdvOp(unsigned int)
+	??1PosSettingsView@@UAE@XZ @ 15 NONAME ; PosSettingsView::~PosSettingsView(void)
+	?itemPrototypes@PosSettingsAdvOp@@QAEXAAV?$QList@PAVHbAbstractViewItem@@@@@Z @ 16 NONAME ; void PosSettingsAdvOp::itemPrototypes(class QList<class HbAbstractViewItem *> &)
+	?removeConnection@PosSettingsAdvOp@@QAEXPAVHbDataFormModelItem@@PBDPAVQObject@@1@Z @ 17 NONAME ; void PosSettingsAdvOp::removeConnection(class HbDataFormModelItem *, char const *, class QObject *, char const *)
+	?indexFromItem@PosSettingsAdvOp@@QAE?AVQModelIndex@@PBVHbDataFormModelItem@@@Z @ 18 NONAME ; class QModelIndex PosSettingsAdvOp::indexFromItem(class HbDataFormModelItem const *)
+	?setItemPrototypes@PosSettingsAdvOp@@QAEXAAV?$QList@PAVHbAbstractViewItem@@@@@Z @ 19 NONAME ; void PosSettingsAdvOp::setItemPrototypes(class QList<class HbAbstractViewItem *> &)
+	??0PosSettingsView@@QAE@PAVQGraphicsItem@@@Z @ 20 NONAME ; PosSettingsView::PosSettingsView(class QGraphicsItem *)
+	?removeItem@PosSettingsAdvOp@@QAE_NPAVHbDataFormModelItem@@@Z @ 21 NONAME ; bool PosSettingsAdvOp::removeItem(class HbDataFormModelItem *)
+	?trUtf8@PosSettingsAdvOp@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString PosSettingsAdvOp::trUtf8(char const *, char const *, int)
+	?tr@PosSettingsAdvOp@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString PosSettingsAdvOp::tr(char const *, char const *)
+	?getStaticMetaObject@PosSettingsAdvOp@@SAABUQMetaObject@@XZ @ 24 NONAME ; struct QMetaObject const & PosSettingsAdvOp::getStaticMetaObject(void)
+	?metaObject@PosSettingsAdvOp@@UBEPBUQMetaObject@@XZ @ 25 NONAME ; struct QMetaObject const * PosSettingsAdvOp::metaObject(void) const
+
Binary file locationsystemui/locationsysui/possettings/conf/positioningsettings.confml has changed
Binary file locationsystemui/locationsysui/possettings/conf/positioningsettings_2002E685.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/eabi/possettingsengineu.def	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,35 @@
+EXPORTS
+	_ZN15PosSettingsViewC1EP13QGraphicsItem @ 1 NONAME
+	_ZN15PosSettingsViewC2EP13QGraphicsItem @ 2 NONAME
+	_ZN15PosSettingsViewD0Ev @ 3 NONAME
+	_ZN15PosSettingsViewD1Ev @ 4 NONAME
+	_ZN15PosSettingsViewD2Ev @ 5 NONAME
+	_ZN16PosSettingsAdvOp10removeItemEP19HbDataFormModelItem @ 6 NONAME
+	_ZN16PosSettingsAdvOp11qt_metacallEN11QMetaObject4CallEiPPv @ 7 NONAME
+	_ZN16PosSettingsAdvOp11qt_metacastEPKc @ 8 NONAME
+	_ZN16PosSettingsAdvOp11setExpandedERK11QModelIndexb @ 9 NONAME
+	_ZN16PosSettingsAdvOp13addConnectionEP19HbDataFormModelItemPKcP7QObjectS3_ @ 10 NONAME
+	_ZN16PosSettingsAdvOp13indexFromItemEPK19HbDataFormModelItem @ 11 NONAME
+	_ZN16PosSettingsAdvOp14itemPrototypesER5QListIP18HbAbstractViewItemE @ 12 NONAME
+	_ZN16PosSettingsAdvOp16removeConnectionEP19HbDataFormModelItemPKcP7QObjectS3_ @ 13 NONAME
+	_ZN16PosSettingsAdvOp16staticMetaObjectE @ 14 NONAME DATA 16
+	_ZN16PosSettingsAdvOp17setItemPrototypesER5QListIP18HbAbstractViewItemE @ 15 NONAME
+	_ZN16PosSettingsAdvOp18appendDataFormItemEP19HbDataFormModelItemS1_ @ 16 NONAME
+	_ZN16PosSettingsAdvOp19getStaticMetaObjectEv @ 17 NONAME
+	_ZN16PosSettingsAdvOp9addActionEP8HbActionN6HbView15ActionContainerE @ 18 NONAME
+	_ZN16PosSettingsAdvOpC1EP6HbView @ 19 NONAME
+	_ZN16PosSettingsAdvOpC2EP6HbView @ 20 NONAME
+	_ZN16PosSettingsAdvOpD0Ev @ 21 NONAME
+	_ZN16PosSettingsAdvOpD1Ev @ 22 NONAME
+	_ZN16PosSettingsAdvOpD2Ev @ 23 NONAME
+	_ZNK16PosSettingsAdvOp10isExpandedERK11QModelIndex @ 24 NONAME
+	_ZNK16PosSettingsAdvOp10metaObjectEv @ 25 NONAME
+	_ZTI15PosSettingsView @ 26 NONAME
+	_ZTI16PosSettingsAdvOp @ 27 NONAME
+	_ZTV15PosSettingsView @ 28 NONAME
+	_ZTV16PosSettingsAdvOp @ 29 NONAME
+	_ZThn16_N15PosSettingsViewD0Ev @ 30 NONAME
+	_ZThn16_N15PosSettingsViewD1Ev @ 31 NONAME
+	_ZThn8_N15PosSettingsViewD0Ev @ 32 NONAME
+	_ZThn8_N15PosSettingsViewD1Ev @ 33 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/inc/possettingsadvinterface.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 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"
+* 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: Positioning settings advanced interface class.
+*
+*/
+
+#ifndef POSSETTINGSENGADVANCEDINTERFACE_H
+#define POSSETTINGSENGADVANCEDINTERFACE_H
+
+#include "possettingsadvop.h"
+#include <qtplugin>
+
+
+
+//Provider id and version
+static const char* KAdvancedInterfaceId = 
+           "com.nokia.PosSettingsAdvInterface/1.0";
+
+ 
+/**
+ * Settings UI ECom plug-in interface
+ *
+ * PosSettingsAdvInterface class tdefines interface for Advanced 
+ * positioning settings UI. Any Settings UI component should derive from this 
+ * class and implement the abstract functions.
+ *
+ */
+class PosSettingsAdvInterface 
+    {
+    
+public:
+    /**
+     * Destructor
+     */
+    virtual ~PosSettingsAdvInterface(){}
+	
+  
+    /**
+     *	This method performs operations required to display advanced settings UI 
+     *	The operations would involve the following :
+     *	- add data model items
+     *	- add connections for the data model items
+     *	- add actions for menu items ( if any )
+     *	- add connection to the view using the slot updateAdvancedView
+     *	  to update the view when the form is updated.
+     */
+    virtual int initialise( PosSettingsAdvOp* operation ) = 0;
+    
+    };
+
+
+// MACROS
+Q_DECLARE_INTERFACE( PosSettingsAdvInterface,KAdvancedInterfaceId );
+
+#endif /* POSSETTINGSENGADVANCEDINTERFACE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/inc/possettingsadvop.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* 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: Positioning settings advanced operation class.
+*
+*/
+
+#ifndef POSSETTINGSENGADVANCEDOPERATION_H
+#define POSSETTINGSENGADVANCEDOPERATION_H
+
+
+#include "possettingsglobal.h"
+#include <QObject.h>
+#include <hbview.h>
+#include <hbdataform.h>
+#include <hbdataformmodel.h>
+#include <hbdataformmodelitem.h>
+
+class POSSETTINGS_EXPORT PosSettingsAdvOp : public QObject
+    {
+    Q_OBJECT
+    
+public:
+    /**
+     * Constructor
+     */
+    PosSettingsAdvOp(HbView* view);
+    
+    /**
+     * Destructor
+     */
+    ~PosSettingsAdvOp();
+    
+    /**
+     * Appends dataform model item to the dataform model.
+     */
+    void appendDataFormItem( HbDataFormModelItem *data,
+                             HbDataFormModelItem *parent = 0 );
+    
+    /***
+     * Makes connections for the data form model items
+     */
+    void addConnection( HbDataFormModelItem *item, const char* signal, 
+                        QObject *receiver, const char* slot );
+    
+    /**
+     * Used to add menue items & actions
+     */
+    void addAction( HbAction *action, HbView::ActionContainer 
+                    preferedActionContainer );
+    /**
+     * Gets the index of a particular data form model item
+     * @param[in] item - data form model item whose index is required
+     * @return - index of the data form model item within the data form model
+     */
+    QModelIndex indexFromItem(const HbDataFormModelItem *  item  );
+    /**
+     * Removes connection that were already made
+     */
+    void removeConnection(HbDataFormModelItem *item, const char *signal, QObject *receiver, const char *slot);
+    /**
+     * Sets the model item to be expanded/collapsed
+     */
+    void setExpanded(const QModelIndex &index, bool expanded);
+    /**
+     * Checks if a particualr data model item is expanded
+     */
+    bool isExpanded (const QModelIndex &index) const;
+    /**
+     * Removes a particualr data form model item from the model
+     */
+    bool removeItem(HbDataFormModelItem* item);
+    /**
+     * set prototype for data form
+     */
+    void setItemPrototypes(QList<HbAbstractViewItem *> &protoTypeList);
+
+    /**
+     * gets prototype list for the data form
+     */
+    void itemPrototypes(QList<HbAbstractViewItem *> &protoTypeList);
+private:
+
+    /**
+     * Pointer to view.
+     * Not own.
+     */
+    HbView* mView;
+    
+    /**
+     * Pointer to data form
+     * Not own.
+     */
+    HbDataForm* mDataForm;
+    
+    /**
+     * Pointer to data form model.
+     * Not own.
+     */
+    HbDataFormModel* mDataFormModel;
+    };
+
+
+#endif /* POSSETTINGSENGADVANCEDOPERATION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/inc/possettingscrkey.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* 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:  Central Repository Key definition for ordering of the
+*								positioning settings plugins displayed in the advaced
+*								settings view
+*
+*/
+
+#ifndef POSSETTINGSCRKEY_H
+#define POSSETTINGSCRKEY_H
+
+#include <e32base.h>
+
+/*
+ * UID of the Positioning Settings Central Repository Key. 
+ * This key defines the position of the positioning settings plugins that are shown 
+ * in the advanced settings view of Positioning.
+ */
+const TUid KCRUidPositioningSettings = {0x2002E685};
+
+/*
+ * Key for listing the positioning settings plugins in the advacned view of Positioning. 
+ * This key is a Read only key and the default values for the Keys is configured by the device 
+ * manufacturer while flashing the device. They cannot be dynamically configured. 
+ * The keys contains a string which contains a list of Unique Identifers for the Positioning settings 
+ * plugins in the order in which the device manufacturer wants these plugins to be displayed.
+ * The maximum length of this string is 1024 characters
+ * The format of this Key is defined as
+ * | Count | Length(1) | Dllname(1) | Length(2) | Dllname(2) | ... | Length( Count ) | Dllname( Count ) |
+ * where,
+ * Count ( 4 digits ) - The number of positioning Settings plugins which are predefined to be displayed in 
+ * the Advanced Settings view, in the Decimal format.
+ * Length(n) ( 4 digits ) - Length of the plugin's dll name in the string format. This field contains the length
+ * in the in the Decimal format. 
+ * String(n) - Dll name of the positioning settings plugins encoded as a string.
+ */
+const TUint32 KPositioningSettingsPlugins = 0x00000001;
+
+/*
+ * Key for storing old state of background positioning in main view.
+ * This key is a Read/Write key and the default value for the key is one [i.e. enabled]
+ * The key contains integer which can be either 0 [disabled] or 1 [enabled]
+ * The key value is modified only when user marks/unmarks background positioning checkbox in the main view
+ * The key value is NOT modified when background positioning checkbox is removed/inserted 
+ */
+const TUint32 KPositioningSettingsBackgroundServicesStatus = 0x00000002;
+
+#endif //POSSETTINGSCRKEY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/inc/possettingsglobal.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 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""
+* 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:  
+*
+*/
+
+#ifndef POSSETTINGS_GLOBAL_H
+#define POSSETTINGS_GLOBAL_H
+
+#ifdef BUILD_POSSETTINGS
+    #define POSSETTINGS_EXPORT Q_DECL_EXPORT
+#else
+    #define POSSETTINGS_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/inc/possettingsview.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 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"
+* 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: This is the first view for Positioning Settings plugin  
+*
+*/
+
+#ifndef POSSETTINGSVIEW_H
+#define POSSETTINGSVIEW_H
+
+#include "possettingsglobal.h"
+
+#include<qobject>
+#include <cpbasesettingview.h>
+
+// Forward declaration
+class PosSettingsEngine;
+class PosSettingsForm;
+class HbGroupBox;
+class QGraphicsLinearLayout;
+
+class POSSETTINGS_EXPORT PosSettingsView: public CpBaseSettingView
+    {    
+public:
+    /**
+     * Constructor 
+     */
+     explicit PosSettingsView( QGraphicsItem *parent = 0 );
+    
+    /**
+     * Destructor
+     */ 
+    ~PosSettingsView();
+     
+private: // Data members
+    /**
+     * Pointer to settings engine object
+     * Own
+     */ 
+    PosSettingsEngine* mSettingsEngine;
+    
+    /**
+     * Pointer to settings form object.
+     */
+    PosSettingsForm* mSettingsForm;    
+    };
+
+#endif // POSSETTINGSVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/locationservicescustomviewitem.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 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""
+ * 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:  This class to be used to create group items for location services
+ *
+ */
+#ifndef LOCATIONSERVICES_CUSTOMVIEWITEM_H
+#define LOCATIONSERVICES_CUSTOMVIEWITEM_H
+
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+#include <hbwidget>
+
+
+//dataItemType for Location services custom widget 
+const int LocationServicesCustomItem = HbDataFormModelItem::CustomItemBase
+        + 15;
+
+class LocationServicesCustomViewItem : public HbDataFormViewItem
+    {
+Q_OBJECT
+public:
+    /**
+     * Constructor
+     */
+    explicit LocationServicesCustomViewItem(QGraphicsItem *parent = 0);
+    
+    /**
+     * Destructor
+     */
+    ~LocationServicesCustomViewItem();
+
+protected:
+    
+    /**
+     * This method is used to create the Custom widget for location services
+     * @returns - HbAbstractButton, instance of the custom widget
+     */
+    virtual HbWidget* createCustomWidget();
+    
+    /**
+     * 
+     */
+    virtual HbAbstractViewItem* createItem();
+    
+    /**
+     * 
+     */
+    virtual bool canSetModelIndex(const QModelIndex &index) const;
+public slots:
+    virtual void restore();
+    //virtual void save();
+private:
+    /**
+     * instance of HbAbstractButton
+     */
+    HbWidget *mPushWidget;
+    };
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/locationserviceswidget.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 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""
+ * 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: This header file is for creating the custom widget for location services 
+ *              for Advanced view of Positioning settings 
+ *
+ */
+
+#ifndef LOCATIONSERVICESWIDGET_H
+#define LOCATIONSERVICESWIDGET_H
+
+#include <QObject>
+#include <hbabstractbutton.h>
+
+class HbTextItem;
+
+class LocationServicesWidget : public HbAbstractButton
+    {
+Q_OBJECT
+
+// It is possible to set initial value to properties from the application designer.
+Q_PROPERTY(QString primarytext READ primaryText WRITE setPrimaryText)
+Q_PROPERTY(QString sectext READ secText WRITE setSecText)
+Q_PROPERTY(QString sec2text READ sec2Text WRITE setSec2Text)
+
+public:
+    /**
+     * Constructor
+     */
+    LocationServicesWidget(QGraphicsItem *parent = 0);
+    
+    /**
+     * Destructor
+     */
+    ~LocationServicesWidget();
+
+public:
+    
+    /**
+     * Sets the primary text for the widget
+     * @param [in] - primaryText, primary text for the widget
+     */
+    void setPrimaryText(const QString &primaryText);
+    
+    /**
+     * Gets the primary text for the widget
+     * @returns - QString containing the primary text
+     */
+    QString primaryText() const;
+    
+    /**
+     * Sets the primary text for the widget
+     * @param [in] - secText, secondry(second line) text for the widget
+     */
+    void setSecText(const QString &secText);
+    
+    /**
+     * Gets the primary text for the widget
+     * @returns - QString containing the secondry text
+     */
+    QString secText() const;
+    
+    /**
+     * Sets the primary text for the widget
+     * @param [in] - secText, secondry(third line) text for the widget
+     */
+    void setSec2Text(const QString &secText);
+    
+    /**
+     * Gets the primary text for the widget
+     * @returns - QString containing the secondry2 text
+     */
+    QString sec2Text() const;
+
+private:
+    
+    /**
+     * Primary Text item
+     * Does not own
+     */
+    HbTextItem* mPrimaryTextItem;
+    
+    /**
+     * Secondry Text item
+     * Does not own
+     */
+    HbTextItem* mSecondryTextItem;
+    
+    /**
+     * Secondry (third item) Text item
+     * Does not own
+     */
+    HbTextItem* mSecondry2TextItem;
+    };
+
+#endif // LOCATIONSERVICESWIDGET_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservices.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is for Location Based Servies Settings plugin 
+ *							for Advanced View
+ *
+ */
+
+#ifndef POSLOCATIONSERVICES_PLUGIN_H
+#define POSLOCATIONSERVICES_PLUGIN_H
+
+#include "poslocationservicesengine.h"
+
+#include <QObject>
+#include <hbdataformmodelitem.h>
+#include <possettingsadvinterface.h>
+#include <hbdataformviewitem.h>
+#include <qsignalmapper.h>
+
+
+//Forward Declaration
+class PosSettingsAdvOp;
+class PosSettingsSignalMapper;
+class HbMessageBox;
+class HbAction;
+
+class PosLocationServices : public QObject, public PosSettingsAdvInterface
+    {
+Q_OBJECT
+    Q_INTERFACES( PosSettingsAdvInterface)
+public:
+    /**
+     * Constructor
+     */
+    PosLocationServices();
+
+    /**
+     * Destructor
+     */
+    ~PosLocationServices();
+public:
+    /*
+     * Derived from PosSettingsAdvInterface   
+     */
+    virtual int initialise(PosSettingsAdvOp* operation);
+
+private:
+    /**
+     * This method is used to list all the location services that are running
+     */
+    void listServices();
+    
+    /**
+     * This method constructs the string for update interval to be displayed in
+     * the second line of the widget.
+     * @param [in]- updateInterval, update interval is seconds, gets from the engine
+     * @param [out]- updateIntervalString, string to be displayed, depending on the update
+     * interval is in day, hour, minute or second
+     */
+    void getUpdateIntervalString(int updateInterval, QString& updateIntervalString);
+
+private slots:
+    /**
+     * This is slot, which is called when the user selects the   
+     * service to be deleted
+     */
+    void stopService(int serviceId);
+
+    /**
+     * This is slot, which is called whenever there is a new location service added or 
+     * a server in the list is stopped. This refreshes the view.
+     */
+    void updateList();
+    
+ 	/**
+     * This slot is used to stop sessions.
+     * @param[in] action - Button which is pressed on messagebox dialog
+     */
+    void stopSession(HbAction* action);
+
+private:
+
+    /**
+     * an object if the location services setting engine class
+     */
+    PosLocationServicesEngine* mLocationServiceEngine;
+
+    /**
+     * an object of data form model item class
+     */
+    HbDataFormModelItem * mGroup;
+
+    /**
+     * Holds the params of the list of location services
+     */
+    QList<PosLocationServiceInfo> mServiceList;
+
+    /**
+     * Handle to PosSettingsAdvOp object
+     */
+    PosSettingsAdvOp * mOperation;
+    
+    /**
+     * an object of QSignalMapper 
+     */
+    QSignalMapper * mSignalMapper;
+    
+    /**
+     * hold the signal mapper objects of PosPsySettingsSignalMapper
+     */
+    QList<PosSettingsSignalMapper*> mSignalMapperList;
+    
+
+    
+    /**
+     * holds the stop service query dialog
+	 * Owns
+     */
+    HbMessageBox * mStopQuery;
+    
+    /**
+     * holds service id to be stop
+     */
+    int mServiceId;
+    };
+#endif // POSLOCATIONSERVICES_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicescommon.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 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"
+* 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: This header defines set of data structures used in
+*              locaion services plugin.  
+*
+*/
+
+#ifndef POSLOCATIONSERVICESCOMMON_H
+#define POSLOCATIONSERVICESCOMMON_H
+
+#include <QString>
+#include <QDateTime>
+
+struct PosLocationServiceInfo
+    {
+    /**
+     * Location service Id.
+     */
+    int mServiceId;
+    /**
+     * Location service name.
+     */
+    QString mServiceName;
+    
+    /**
+     * Update interval.
+     */
+    int mUpdateInterval;
+    
+    /**
+     * Date and time on which service ends.
+     */
+    QDateTime mEndDateTime;
+    };
+
+#endif //POSLOCATIONSERVICESCOMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicesengine.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 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"
+* 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 declaration of PosLocationServicesEngine.
+*
+*/
+#ifndef POSLOCATIONSERVICESENGINE_H
+#define POSLOCATIONSERVICESENGINE_H
+
+#include "poslocationservicesengineprivate.h"
+#include <QObject.h>
+
+
+
+/**
+ * PosLocationServicesEngine class provides interface to location services.
+ * Using this interface. This interface provides services like list, delete
+ * etc..
+ */
+class PosLocationServicesEngine : public QObject,
+                                  public PosLocationServiceUpdateObserver
+    {
+    Q_OBJECT
+public:
+    /**
+     * Constructor
+     */
+    PosLocationServicesEngine();
+
+    /**
+     * Destructor
+     */
+    virtual ~PosLocationServicesEngine();
+
+    /**
+     * Retrieves all location services info.
+     *
+     * @param[out] locationServiceList List of location
+     *            services info.
+     * @return  - KErrNone if location services information retrieved successfully.
+     *          - KErrNotFound if there are no location services.
+     *            otherwise system wide error codes.
+     */
+    int getLocationServices( QList<PosLocationServiceInfo>&
+                             locationServiceList );
+
+    /**
+     * Removes location service based on the service Id.
+     *
+     * @param [in] serviceId Location service Id.
+     *
+     * @return following error codes
+     *      - KErrNone if successful
+     *      - KErrNotFound if service is not found
+     *      otherwise system wide error codes.
+     */
+    int removeLocationService( int serviceId );
+
+public:// From PosLocationServiceUpdateObserver
+    void handleLocationServiceUpdate();
+
+signals:
+    /**
+     * This signal is emitted when there is update in the
+     * location services.
+     */
+    void locationServiceUpdate();
+
+private:// Data members
+    /**
+     * Pointer to PosLocationServicesEnginePrivate object.
+     * Own
+     */
+    PosLocationServicesEnginePrivate* d_ptr;
+    };
+
+#endif /* POSLOCATIONSERVICESENGINE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/poslocationservicesengineprivate.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 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"
+* 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 declaration of PosLocationServicesEnginePrivate.  
+*
+*/
+#ifndef POSLOCATIONSERVICESENGINEPRIVATE_H
+#define POSLOCATIONSERVICESENGINEPRIVATE_H
+
+#include "poslocationservicescommon.h"
+#include <epos_msuplsessionobserver.h>
+
+// Forward declaration
+class CSuplSettings;
+
+/**
+ * The class defines the interface to get notification on location 
+ * service update.The class interested in location service update
+ * should inherit from this class.
+ */
+class PosLocationServiceUpdateObserver
+    {
+public:
+    virtual void handleLocationServiceUpdate() = 0;
+    };
+
+
+/**
+ * PosLocationServicesEnginePrivate class implements the engine logic.This 
+ * provides wrapper over SUPL settings API
+ */
+class PosLocationServicesEnginePrivate : public MSuplSessionObserver
+    {
+public:
+    /**
+     * Constructor
+     */
+    PosLocationServicesEnginePrivate( PosLocationServiceUpdateObserver&
+                                      aObserver );
+    
+    /**
+     * Destructor
+     */
+    virtual ~PosLocationServicesEnginePrivate();
+    
+    /**
+     * Retrieves all location services info.
+     * 
+     * @param[out] locationServiceList List of location 
+     *            services info.
+     * @return  - KErrNone if location services information retrieved successfully.  
+     *          - KErrNotFound if there are no location services. 
+     *            otherwise system wide error codes.             
+     */
+    int GetLocationServices( QList<PosLocationServiceInfo>& 
+                             aLocationServiceList );
+    
+    /**
+     * Retrieves all location services info.
+     * 
+     * @param[out] locationServiceList List of location 
+     *            services info.
+     * @leaves  - KErrNone if location services information retrieved successfully.  
+     *          - KErrNotFound if there are no location services. 
+     *            otherwise system wide error codes. 
+     */
+    void GetLocationServicesL( QList<PosLocationServiceInfo>& 
+                             aLocationServiceList );
+    /**
+     * Removes location service based on the service Id.
+     * 
+     * @param [in] serviceId Location service Id. 
+     *
+     * @return following error codes
+     *      - KErrNone if successful
+     *      - KErrNotFound if service is not found
+     *      otherwise system wide error codes. 
+     */
+    int RemoveLocationService( int aServiceId );
+    
+public: // From MSuplSessionObserver
+    virtual void HandleSuplSessionChangeL(
+            TSuplSessionEventType aEvent,TInt64 aSessionId );
+    
+private:// Data members
+    
+    /**
+     * Reference to location service update observer.
+     */
+    PosLocationServiceUpdateObserver& mObserver;
+    
+    /**
+     * Pointer to SUPL settings object.
+     * Own
+     */
+    CSuplSettings* mSuplSettings;
+    };
+
+#endif /* POSLOCATIONSERVICESENGINEPRIVATE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/inc/possettingssignalmapper.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 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"
+ * 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: Declaration of the Positioning Settings signal mapper 
+ *              used to map the signals of each check box item to the index
+ *
+ */
+
+#ifndef POSSETTINGSSIGNALMAPPER_H
+#define POSSETTINGSSIGNALMAPPER_H
+
+#include <QObject>
+
+class PosSettingsSignalMapper : public QObject
+    {
+    Q_OBJECT
+public:
+    /*
+     * constructor
+     */
+    PosSettingsSignalMapper();
+    /**
+     * destructor
+     */
+    ~PosSettingsSignalMapper();
+public:
+signals:
+    /**
+     * signal emitted by the slot of this class
+     */
+    void signalmapped();
+public slots:
+    /**
+     * slot to be called on a change in state of checkbox.
+     * this in turn calls the signal signalmapped()
+     */
+    void signalmap();
+    };
+
+#endif //POSSETTINGSSIGNALMAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/poslocationservices.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,71 @@
+#
+# Copyright (c) 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"
+# 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:  Location Based Services Plugin pro file
+#
+
+TEMPLATE = lib
+TARGET = poslocationservices
+DEPENDPATH += .
+INCLUDEPATH += ../inc
+INCLUDEPATH += ../possettingsengine/inc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+CONFIG += hb \
+    plugin
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+RESOURCES = poslocationservices.qrc 
+
+# Platforms
+SYMBIAN_PLATFORMS = WINSCW \
+    ARMV5
+LIBS += -lcpframework \
+    -lpossettingsengine \
+    -lepos_suplsettings \
+    -lflogger
+
+# Input
+SOURCES += src/poslocationservices.cpp
+SOURCES += src/poslocationservicesengine.cpp
+SOURCES += src/poslocationservicesengineprivate.cpp
+SOURCES += src/locationservicescustomviewitem.cpp
+SOURCES += src/locationserviceswidget.cpp
+SOURCES += src/possettingssignalmapper.cpp
+
+HEADERS += inc/poslocationservices.h
+HEADERS += inc/poslocationservicescommon.h 
+HEADERS += inc/poslocationservicesengine.h
+HEADERS += inc/poslocationservicesengineprivate.h
+HEADERS += inc/locationservicescustomviewitem.h
+HEADERS += inc/locationserviceswidget.h
+HEADERS += inc/possettingssignalmapper.h
+
+symbian: { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    DEFINES += PLUGINUID3=0x2002DCEB
+    TARGET.UID3 = 0x2002DCEB
+}
+symbian { 
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/positioningsettings
+    qtplugins.sources += qmakepluginstubs/poslocationservices.qtplugin
+    
+    # This is for new exporting system coming in garden
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+}
+TARGET.CAPABILITY = All \
+    -TCB
+plugin.sources = poslocationservices.dll
+plugin.path = \resource\qt\plugins\positioningsettings
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/poslocationservices.qrc	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,10 @@
+<RCC>    
+    <qresource prefix="/data" >
+        <file alias="locationserviceswidget.widgetml">resources/locationserviceswidget.widgetml</file>
+        <file alias="locationserviceswidget.css">resources/locationserviceswidget.css</file>
+        <file alias="locationservicesviewitemwidget.css">resources/locationservicesviewitemwidget.css</file>
+    </qresource>  
+    <qresource prefix="/" >
+       <file>resources/qgn_note_warning.svg</file>
+    </qresource>    
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/resources/locationservicesviewitemwidget.css	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,5 @@
+LocationServicesCustomViewItem::dataItem_ContentWidget
+{
+    left: -var(hb-param-margin-gene-left);
+    right: var(hb-param-margin-gene-right);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/resources/locationserviceswidget.css	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,36 @@
+LocationServicesWidget {
+	layout: default
+}
+
+LocationServicesWidget::text_box1 {
+	left:  -var(hb-param-margin-gene-left);
+  right: var(hb-param-margin-gene-right);
+	top: -var(hb-param-margin-gene-top);
+	bottom: var(hb-param-margin-gene-bottom);
+	pref-width: 36un;
+	pref-height: var(hb-param-text-height-secondary);
+	font-variant: primary;
+	text-height: var(hb-param-text-height-secondary);	
+}
+
+LocationServicesWidget::text_box2 {
+	left:  -var(hb-param-margin-gene-left);
+  right: var(hb-param-margin-gene-right);
+	top: -var(hb-param-margin-gene-top);
+	bottom: var(hb-param-margin-gene-bottom);
+	pref-width: 36un;
+	pref-height: var(hb-param-text-height-secondary);
+	font-variant: secondary;
+	text-height: var(hb-param-text-height-secondary);	
+}
+
+LocationServicesWidget::text_box3 {
+	left:  -var(hb-param-margin-gene-left);
+  right: var(hb-param-margin-gene-right);
+	top: -var(hb-param-margin-gene-top);
+	bottom: var(hb-param-margin-gene-bottom);
+	pref-width: 36un;
+	pref-height: var(hb-param-text-height-secondary);
+	font-variant: secondary;
+	text-height: var(hb-param-text-height-secondary);	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/resources/locationserviceswidget.widgetml	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbwidget type="LocationServicesWidget" version="0.1">
+    <layout name="default" type="mesh">
+        <meshitem dst="" dstEdge="LEFT" src="text_box1" srcEdge="LEFT"  />
+        <meshitem dst="" dstEdge="TOP" src="text_box1" srcEdge="TOP"  />
+        <meshitem dst="" dstEdge="RIGHT" src="text_box1" srcEdge="RIGHT" />
+        
+        <meshitem dst="" dstEdge="LEFT" src="text_box2" srcEdge="LEFT"  />
+        <meshitem dst="" dstEdge="RIGHT" src="text_box2" srcEdge="RIGHT" />
+	<meshitem dst="text_box1" dstEdge="BOTTOM" src="text_box2" srcEdge="TOP" />
+        
+        <meshitem dst="" dstEdge="LEFT" src="text_box3" srcEdge="LEFT"  />
+        <meshitem dst="" dstEdge="RIGHT" src="text_box3" srcEdge="RIGHT" />
+	<meshitem dst="text_box2" dstEdge="BOTTOM" src="text_box3" srcEdge="TOP" />
+        <meshitem dst="" dstEdge="BOTTOM" src="text_box3" srcEdge="BOTTOM" />
+	
+    </layout>
+</hbwidget>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/resources/qgn_note_warning.svg	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="80" viewBox="0 0 60 80">
+<linearGradient id="XMLID_68_" gradientUnits="userSpaceOnUse" x1="26.0703" y1="-2273.4072" x2="31.9835" y2="-2285.0527" gradientTransform="matrix(1 0 0 -1 0.2632 -2209.7959)">
+<stop offset="0" style="stop-color:#A2C2DD"/>
+<stop offset="0.1" style="stop-color:#A2C2DD"/>
+<stop offset="0.7135" style="stop-color:#6C83BB"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+</linearGradient>
+<circle fill="url(#XMLID_68_)" cx="29.29" cy="69.434" r="6.529"/>
+<g>
+<rect fill="none" width="60" height="80"/>
+</g>
+<linearGradient id="XMLID_69_" gradientUnits="userSpaceOnUse" x1="30.415" y1="1559.0273" x2="40.6636" y2="1579.2108" gradientTransform="matrix(1 0 0 1 0.1504 -1525.8203)">
+<stop offset="0" style="stop-color:#A2C2DD"/>
+<stop offset="0.1" style="stop-color:#A2C2DD"/>
+<stop offset="0.7135" style="stop-color:#6C83BB"/>
+<stop offset="0.9888" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_69_)" d="M19.666,13.492c-0.396,0.462-0.428,0.882-0.385,1.153l4.14,39.044 c0.198,1.199,0.643,2.05,1.402,2.69c1.008,1.083,2.547,1.694,4.421,1.739c1.117,0,2.189-0.212,3.107-0.613 c1.604-0.646,2.549-1.824,2.775-3.511l3.584-39.309c0.061-0.329,0.016-0.752-0.396-1.216c-1.232-1.409-5.063-2.393-9.311-2.393 C24.722,11.083,20.878,12.073,19.666,13.492z"/>
+<g>
+<g>
+<linearGradient id="XMLID_70_" gradientUnits="userSpaceOnUse" x1="14.7363" y1="776.8535" x2="33.5391" y2="801.0286" gradientTransform="matrix(1 0 0 1 0.0752 -762.9102)">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.05" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#A2C2DD"/>
+</linearGradient>
+<path fill="url(#XMLID_70_)" d="M37.949,14.62l-3.178,39.271c-0.277,2.805-3.086,3.885-5.521,3.885 c-2.58-0.063-4.746-1.237-5.355-3.849l-4.029-38.819C23.36,17.514,33.879,18.064,37.949,14.62z"/>
+<linearGradient id="XMLID_71_" gradientUnits="userSpaceOnUse" x1="37.4512" y1="796.1699" x2="-11.1774" y2="805.2171" gradientTransform="matrix(1 0 0 1 0.0752 -762.9102)">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_71_)" d="M25.46,17.253l1.585,40.042c-1.518-0.785-2.883-1.27-3.276-3.645L19.64,14.501 C20.06,14.847,24.262,16.785,25.46,17.253z"/>
+<linearGradient id="XMLID_72_" gradientUnits="userSpaceOnUse" x1="25.5776" y1="799.0352" x2="53.4279" y2="798.3287" gradientTransform="matrix(1 0 0 1 0.0752 -762.9102)">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.35" style="stop-color:#A2C2DD"/>
+<stop offset="0.7" style="stop-color:#6C83BB"/>
+<stop offset="1" style="stop-color:#003D6D"/>
+</linearGradient>
+<path fill="url(#XMLID_72_)" d="M32.047,57.261c1.309-0.479,2.479-1.429,2.738-3.308l3.597-39.45c0,0-3.825,1.754-4.456,2.15 L32.047,57.261z"/>
+<linearGradient id="XMLID_73_" gradientUnits="userSpaceOnUse" x1="19.8716" y1="772.9834" x2="42.9158" y2="784.152" gradientTransform="matrix(1 0 0 1 0.0752 -762.9102)">
+<stop offset="0" style="stop-color:#FFFFFF"/>
+<stop offset="0.05" style="stop-color:#FFFFFF"/>
+<stop offset="1" style="stop-color:#A2C2DD"/>
+</linearGradient>
+<path fill="url(#XMLID_73_)" d="M38.389,14.591c-0.209,1.578-4.394,2.859-9.345,2.859c-4.952,0-9.167-1.281-9.417-2.859 c-0.248-1.579,3.976-3.158,9.385-3.158C34.42,11.433,38.596,13.012,38.389,14.591z"/>
+</g>
+</g>
+<g>
+<g>
+<radialGradient id="XMLID_74_" cx="26.4556" cy="-2274.9688" r="6.3101" gradientTransform="matrix(1 0 0 -1 0.2632 -2209.7959)" gradientUnits="userSpaceOnUse">
+<stop offset="0" style="stop-color:#E3DFE4"/>
+<stop offset="1" style="stop-color:#C03A3A"/>
+</radialGradient>
+<circle fill="url(#XMLID_74_)" cx="29.271" cy="69.457" r="6.171"/>
+</g>
+</g>
+<rect fill="none" width="60" height="80"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/src/locationservicescustomviewitem.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 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""
+ * 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: This is extended as HbDataFormViewItem to be used to create 
+ *              group items for location services
+ *
+ */
+
+
+#include "locationservicescustomviewitem.h"
+#include "locationserviceswidget.h"
+#include <hbdataformmodel.h>
+#include <hbabstractitemview.h>
+#include <qmetaobject.h>
+
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::LocationServicesCustomViewItem
+// ---------------------------------------------------------------------------
+//
+LocationServicesCustomViewItem::LocationServicesCustomViewItem(
+        QGraphicsItem *parent) :
+    HbDataFormViewItem(parent)
+    {    	
+    }
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::~LocationServicesCustomViewItem
+// ---------------------------------------------------------------------------
+//
+LocationServicesCustomViewItem::~LocationServicesCustomViewItem()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::createItem
+// ---------------------------------------------------------------------------
+//
+HbAbstractViewItem* LocationServicesCustomViewItem::createItem()
+{
+    return new LocationServicesCustomViewItem(*this);
+}
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::canSetModelIndex
+// ---------------------------------------------------------------------------
+//
+bool LocationServicesCustomViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+    int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+    if (type == LocationServicesCustomItem) {
+        return true;
+    }
+    else {
+        return false;
+    }
+}
+
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::createCustomWidget
+// ---------------------------------------------------------------------------
+//
+HbWidget * LocationServicesCustomViewItem::createCustomWidget()
+    {
+    //get the type of the model
+    int type = modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt();
+    if (type == LocationServicesCustomItem)
+        {
+        //create the instance of location widget
+        LocationServicesWidget* locationservicesWidget =
+                new LocationServicesWidget();
+        mPushWidget = locationservicesWidget;
+        return mPushWidget;
+        }
+    else
+        {
+        //else return 0
+        return 0;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::restore
+// ---------------------------------------------------------------------------
+//
+void LocationServicesCustomViewItem::restore()
+{
+    HbDataFormViewItem::restore();
+    if (mPushWidget) {
+        HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+            modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+        if(itemType == LocationServicesCustomItem) {
+
+            QModelIndex itemIndex = modelIndex();
+            HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+            HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+                model->itemFromIndex(itemIndex));
+
+            const QMetaObject *metaObj = mPushWidget->metaObject();
+            int count = metaObj->propertyCount();
+            for (int i = 0; i < count; ++i) {
+                QMetaProperty metaProperty = metaObj->property(i);
+                if (metaProperty.isValid() && metaProperty.isWritable()) {
+                    metaProperty.write(mPushWidget,modelItem->contentWidgetData(metaProperty.name()));
+                }
+
+            }
+        }
+    }
+}
+
+// ---------------------------------------------------------------------------
+// LocationServicesCustomViewItem::save
+// ---------------------------------------------------------------------------
+//
+/*void LocationServicesCustomViewItem::save()
+{
+    HbDataFormViewItem::save();
+    if (mPushWidget) {
+        HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+            modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+        if(itemType == LocationServicesCustomItem) {
+
+            QModelIndex itemIndex = modelIndex();
+            HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+            HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+            model->itemFromIndex(itemIndex));
+            if (LocationServicesWidget *locationservicesWidget = qobject_cast<LocationServicesWidget *>(mPushWidget)) {
+                modelItem->setContentWidgetData("primarytext",locationservicesWidget->primaryText());     
+                modelItem->setContentWidgetData("sectext",locationservicesWidget->secText());
+                modelItem->setContentWidgetData("sec2text",locationservicesWidget->sec2Text());
+            }
+        }
+    }
+}*/
+
+//-------------End of File--------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/src/locationserviceswidget.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 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""
+ * 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: This file is for creating the custom widget for location services 
+ *              for Advanced view of Positioning settings 
+ *
+ */
+
+#include "locationserviceswidget.h"
+
+#include <QtGui>
+#include <hbfontspec.h>
+#include <hbstyleloader.h>
+#include <hbstyle.h>
+#include <hbtextitem.h>
+
+
+static const QString FILE_PATH_WIDGETML =
+        ":/data/locationserviceswidget.widgetml";
+static const QString FILE_PATH_CSS = ":/data/locationserviceswidget.css";
+
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::LocationServicesWidget
+// ---------------------------------------------------------------------------
+//
+LocationServicesWidget::LocationServicesWidget(QGraphicsItem *parent) :
+    HbAbstractButton(parent)
+    {
+    // Path for widgetml and css files.
+    HbStyleLoader::registerFilePath(FILE_PATH_WIDGETML);
+    HbStyleLoader::registerFilePath(FILE_PATH_CSS);
+
+    //Create the primary and secondry text items
+    mPrimaryTextItem = new HbTextItem(QString("New"), this);
+    HbStyle::setItemName(mPrimaryTextItem, "text_box1");
+    mPrimaryTextItem->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+
+    mSecondryTextItem = new HbTextItem(QString("New"), this);
+    HbStyle::setItemName(mSecondryTextItem, "text_box2");
+    mSecondryTextItem->setFontSpec(HbFontSpec(HbFontSpec::Secondary));
+
+    mSecondry2TextItem = new HbTextItem(QString("New"), this);
+    HbStyle::setItemName(mSecondry2TextItem, "text_box3");
+    mSecondry2TextItem->setFontSpec(HbFontSpec(HbFontSpec::Secondary));
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::LocationServicesWidget
+// ---------------------------------------------------------------------------
+//
+LocationServicesWidget::~LocationServicesWidget()
+    {
+    HbStyleLoader::unregisterFilePath(FILE_PATH_WIDGETML);
+    HbStyleLoader::unregisterFilePath(FILE_PATH_CSS);
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::setPrimaryText
+// ---------------------------------------------------------------------------
+//
+void LocationServicesWidget::setPrimaryText(const QString &primaryText)
+    {
+    mPrimaryTextItem->setText(primaryText);
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::primaryText
+// ---------------------------------------------------------------------------
+//
+QString LocationServicesWidget::primaryText() const
+    {
+    return mPrimaryTextItem->text();
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::setSecText
+// ---------------------------------------------------------------------------
+//
+void LocationServicesWidget::setSecText(const QString& secText)
+    {
+    mSecondryTextItem->setText(secText);
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::secText
+// ---------------------------------------------------------------------------
+//
+QString LocationServicesWidget::secText() const
+    {
+    return mSecondryTextItem->text();
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::setSec2Text
+// ---------------------------------------------------------------------------
+//
+void LocationServicesWidget::setSec2Text(const QString& secText)
+    {
+    mSecondry2TextItem->setText(secText);
+    }
+// ---------------------------------------------------------------------------
+// LocationServicesWidget::sec2Text
+// ---------------------------------------------------------------------------
+//
+QString LocationServicesWidget::sec2Text() const
+    {
+    return mSecondry2TextItem->text();
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/src/poslocationservices.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,478 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is for Location Services Settings plugin 
+ *							for Positioning Settings's Advanced view
+ *
+ */
+
+#include "poslocationservices.h"
+#include "possettingsadvop.h"
+#include "locationservicescustomviewitem.h"
+#include "possettingssignalmapper.h"
+
+#include <QtCore>
+#include <QTranslator>
+#include <QDebug>
+
+#include <hbaction.h>
+#include <hbpushbutton.h>
+#include <hbmessagebox.h>
+#include <hbicon.h>
+#include <hbextendedlocale.h>
+
+// constants
+const int KMinToSecs = 60;
+const int KHourToSecs = 3600;
+const int KOneDay = 24;
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::PosLocationServices
+// ---------------------------------------------------------------------------
+//
+PosLocationServices::PosLocationServices() :
+    mLocationServiceEngine(0), mGroup(0), mOperation(0), mSignalMapper(0),
+            mStopQuery(0), mServiceId(0)
+    {
+    mLocationServiceEngine = new PosLocationServicesEngine();
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::~PosLocationServices
+// ---------------------------------------------------------------------------
+//
+PosLocationServices::~PosLocationServices()
+    {
+    qDebug() << "+PosLocationServices::~PosLocationServices()";
+
+    if (mLocationServiceEngine)
+        {
+        delete mLocationServiceEngine;
+        mLocationServiceEngine = 0;
+        }
+
+    if (mGroup)
+        {
+        if (mOperation)
+            {
+            mOperation->removeItem(mGroup);
+            }
+        }
+
+    if (mSignalMapper)
+        {
+        delete mSignalMapper;
+        mSignalMapper = 0;
+        }
+
+    if (mStopQuery)
+        {
+        delete mStopQuery;
+        mStopQuery = 0;
+        }
+
+    //Clear the list
+    mServiceList.clear();
+
+    //clear the signal mapper list
+    int count = mSignalMapperList.count();
+    qDebug() << "mSignalMapperList.count() = " << count;
+
+    for (int i = 0; i < count; ++i)
+        {
+        delete mSignalMapperList[i];
+        mSignalMapperList[i] = 0;
+        }
+    mSignalMapperList.clear();
+
+    qDebug() << "-PosLocationServices::~PosLocationServices()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::initialise
+// ---------------------------------------------------------------------------
+//
+int PosLocationServices::initialise(PosSettingsAdvOp* operation)
+    {
+    qDebug() << "+PosLocationServices::initialise()";
+
+    int result = 0;
+
+    // Assign to the member variable
+    mOperation = operation;
+
+    //get the prototype list from the data form and append the custom control to the list
+    QList<HbAbstractViewItem *> protoTypeList;
+    mOperation->itemPrototypes(protoTypeList);
+
+    LocationServicesCustomViewItem* item =
+            new LocationServicesCustomViewItem();
+
+    protoTypeList.append(item);
+
+    mOperation->setItemPrototypes(protoTypeList);
+
+    // create the signal mapper
+    mSignalMapper = new QSignalMapper();
+
+    //get the list of location services
+    mServiceList.clear();
+    if (mLocationServiceEngine)
+        {
+        result = mLocationServiceEngine->getLocationServices(mServiceList);
+        }
+
+    qDebug() << "PosLocationServices::initialise(): result" << result;
+
+    // if no error while getting the services list then add the group
+    // for Location based services
+    if (result == 0)
+        {
+        mGroup = new HbDataFormModelItem(HbDataFormModelItem::GroupItem,
+                hbTrId("txt_loe_subtitle_background_positioning"), 0);
+
+        //Add the group to the data form
+        mOperation->appendDataFormItem(mGroup);
+
+        //list all the location services inside the group
+        listServices();
+        }
+    QObject::connect(mLocationServiceEngine, SIGNAL(locationServiceUpdate()),
+            this, SLOT(updateList()));
+
+    qDebug() << "-PosLocationServices::initialise()";
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::listServices
+// ---------------------------------------------------------------------------
+//
+void PosLocationServices::listServices()
+    {
+    qDebug() << "+PosLocationServices::listServices()";
+    qDebug() << "No of Location Services = " << mServiceList.count();
+
+    QList<PosLocationServiceInfo>::const_iterator serviceIterator;
+
+    qDebug() << "Appending the services in group ";
+
+    // Get the location services names and display
+    for (serviceIterator = mServiceList.begin(); serviceIterator
+            != mServiceList.end(); ++serviceIterator)
+        {
+        qDebug() << "serviceIterator->mServiceId = "
+                << serviceIterator->mServiceId;
+
+        qDebug() << "serviceIterator->mServiceName = "
+                << serviceIterator->mServiceName;
+
+        qDebug() << "serviceIterator->mEndDateTime = "
+                << serviceIterator->mEndDateTime.date().toString();
+
+        qDebug() << "serviceIterator->mEndDateTime.isValid() = "
+                << serviceIterator->mEndDateTime.date().isValid();
+
+        qDebug() << "serviceIterator->mUpdateInterval = "
+                << serviceIterator->mUpdateInterval;
+
+        // if any of the fields are invalid then skip listing
+          if (serviceIterator->mUpdateInterval > 0)
+            {
+            qDebug() << "creating services";
+
+            //for each services create new custom item 
+            HbDataFormModelItem
+                    * service =
+                            new HbDataFormModelItem(
+                                    static_cast<HbDataFormModelItem::DataItemType> (LocationServicesCustomItem));
+                                    	
+            if(!serviceIterator->mServiceName.isEmpty())
+            //set the widget data to the server name
+            service->setContentWidgetData("primarytext",
+                    serviceIterator->mServiceName);
+            else
+            service->setContentWidgetData("primarytext",
+                    QString(hbTrId("txt_loe_info_unknown_requestor")));	        
+
+            QString updateIntervalString;
+            //get the update interval String
+            getUpdateIntervalString(serviceIterator->mUpdateInterval,
+                    updateIntervalString);
+            service->setContentWidgetData("sectext", updateIntervalString);
+
+            //get the validity end date from the engine and convert to string
+            QString validity(serviceIterator->mEndDateTime.date().toString(
+                    Qt::ISODate));
+
+            service->setContentWidgetData("sec2text", QString(hbTrId(
+                    "txt_loe_list_valid_until_2")).arg(validity));
+
+            qDebug() << "Adding service into the group";
+            mOperation->appendDataFormItem(service, mGroup);
+
+            //create an object of dummy signal mapper class
+            //this is done to send the index info to the slots
+            //since checkbox is not of QObject type and dummy class is 
+            // created.
+            PosSettingsSignalMapper* signalMapper =
+                    new PosSettingsSignalMapper();
+
+            qDebug() << "Adding the signalMapper into mSignalMapperList";
+            mSignalMapperList.append(signalMapper);
+
+            //add connection for clicked for the custom item, depending on which the
+            //add connections to launch the dialog for the stopping the service  
+            mOperation->addConnection(
+                    service,
+                    SIGNAL(clicked(bool)),
+                    mSignalMapperList[serviceIterator - mServiceList.begin()],
+                    SLOT(signalmap()));
+
+            QObject::connect(mSignalMapperList[serviceIterator
+                    - mServiceList.begin()], SIGNAL(signalmapped()),
+                    mSignalMapper, SLOT(map()));
+
+            // set mapping of each check box item to its index
+            if (mSignalMapper)
+                {
+                qDebug() << "mSignalMapper->setMapping ";
+                mSignalMapper->setMapping(mSignalMapperList[serviceIterator
+                        - mServiceList.begin()], (serviceIterator
+                        - mServiceList.begin()));
+                }
+            }
+        }
+
+    qDebug() << "mGroup->childCount() = " << mGroup->childCount();
+
+    if (mGroup->childCount() == 0)
+        {
+        qDebug() << "mOperation->removeItem mGroup";
+        mOperation->removeItem(mGroup);
+        mGroup = NULL;
+        }
+    else
+        {
+        //use signal mapper to connect
+        qDebug() << "use signal mapper to use stop service";
+        QObject::connect(mSignalMapper, SIGNAL(mapped(int)), this,
+                SLOT(stopService(int)));
+        }
+    qDebug() << "-PosLocationServices::listServices()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::updateList
+// ---------------------------------------------------------------------------
+//
+void PosLocationServices::updateList()
+    {
+    qDebug() << "+PosLocationServices::updateList()";
+    int result = 0;
+    int oldChildCount = 0;
+
+    //store the current state (expanded) of the group
+    if (mGroup)
+        {
+        qDebug() << "Store the group info";
+
+        oldChildCount = mGroup->childCount();
+
+        // remove all connections
+        int count = mSignalMapperList.count();
+        qDebug() << "mSignalMapperList.count() = " << count;
+
+        if (count > 0)
+            {
+            for (TInt i = 0; i < count; ++i)
+                {
+                QObject::disconnect(mSignalMapperList[i],
+                        SIGNAL(signalmapped()), mSignalMapper, SLOT(map()));
+                }
+            QObject::disconnect(mSignalMapper, SIGNAL(mapped(int)), this,
+                    SLOT(stopService(int)));
+            }
+        mSignalMapperList.clear();
+
+        qDebug() << " oldChildCount" << oldChildCount;
+        if (oldChildCount > 0)
+            {
+            qDebug() << "Removing the old children";
+            //mGroup->removeChildren(0, oldChildCount);
+            //ToDo: Hack from HbDataForm team         
+            for (int i = 0; i < oldChildCount; ++i)
+                {
+                qDebug() << "remove chile index " << i;
+                mGroup->removeChild(0);
+                }
+            }
+
+        }
+    else
+        {
+        // this part of code is called when the services are added and 
+        // Advanced view is in the background. Since there is no group
+        // a new group has to be created to add the services.
+        qDebug() << "Creating new group";
+        mGroup = new HbDataFormModelItem(HbDataFormModelItem::GroupItem,
+                hbTrId("txt_loe_subtitle_background_positioning"), 0);
+        mOperation->appendDataFormItem(mGroup);
+        }
+
+    qDebug() << "oldChildCount = " << oldChildCount;
+    qDebug() << "mServiceList.count() before update = "
+            << mServiceList.count();
+
+    //clear the list and get the list of server present for positioning
+    mServiceList.clear();
+    if (mLocationServiceEngine)
+        {
+        result = mLocationServiceEngine->getLocationServices(mServiceList);
+        }
+
+    qDebug() << "PosLocationServices::listServices(): result" << result;
+
+    //update the new list to the group
+    if (result == 0)
+        {
+        listServices();
+        }
+    if (result == -1)
+        {
+        //remove the group
+        mOperation->removeItem(mGroup);
+        mGroup = NULL;
+        }
+
+    qDebug() << "-PosLocationServices::updateList()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::stopService
+// ---------------------------------------------------------------------------
+//
+void PosLocationServices::stopService(int serviceId)
+    {
+    qDebug() << "+PosLocationServices::stopService() service Id" << serviceId;
+
+    mServiceId = serviceId;
+
+    //Construct the display string
+    QString displayString;
+    displayString.append(QString(hbTrId("txt_loe_info_stop_service_1")).arg(
+            mServiceList[serviceId].mServiceName));
+
+    //create the message mStopQuery dialog
+    //HbMessageBox * mStopQuery = new HbMessageBox();
+
+    if (mStopQuery == 0)
+        {
+        mStopQuery = new HbMessageBox();
+        mStopQuery->setTimeout(HbDialog::NoTimeout);
+   
+        //the secondry action that will come in the SK2 of the Dialog box
+        mStopQuery->addAction(new HbAction(QString(hbTrId(
+                "txt_common_button_cancel"))));
+
+        //To-Do: set the actual stop service icon after released in sdk 
+        QIcon stopServiceIcon(":/resources/qgn_note_warning.svg");
+        mStopQuery->setIcon(HbIcon(stopServiceIcon));
+        }
+
+    //set the mStopQuery text
+    mStopQuery->setText(displayString);
+    mStopQuery->open(this,SLOT(stopSession(HbAction*)));
+
+    qDebug() << "-PosLocationServices::stopService()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::stopSession
+// ---------------------------------------------------------------------------
+//
+void PosLocationServices::stopSession(HbAction* action)
+    {
+    qDebug() << " + PosLocationServices::stopSession()";
+    
+    //if LSK is pressed
+    if ((action == mStopQuery->actions().at(0)) && mLocationServiceEngine)
+        {
+        //stop the session
+        mLocationServiceEngine->removeLocationService(
+                mServiceList[mServiceId].mServiceId);
+        }
+    qDebug() << " - PosLocationServices::stopSession()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosLocationServices::getUpdateIntervalString
+// ---------------------------------------------------------------------------
+//
+void PosLocationServices::getUpdateIntervalString(int updateInterval,
+        QString& updateIntervalString)
+    {
+    qDebug()
+            << "+PosLocationServices::getUpdateIntervalString(): updateInterval"
+            << updateInterval;
+
+    //To-Do: clarification needed from chelli
+    if (updateInterval / KMinToSecs < 1)
+        {
+        //seconds
+        QVariant var(updateInterval);
+        updateIntervalString = QString(hbTrId(
+                "txt_loe_list_updates_every_l1_seconds")).arg(var.toString());
+        }
+    else if (updateInterval / KHourToSecs < 1)
+        {
+        //minutes
+        int minutes = (updateInterval / KMinToSecs);
+        int seconds = (updateInterval % KMinToSecs);
+        QVariant varMinutes(minutes);
+        QVariant varSeconds(seconds);
+        updateIntervalString = QString(hbTrId(
+                "txt_loe_list_updates_every_l1_minutes_and_l2_sec")).arg(
+                varMinutes.toString()).arg(varSeconds.toString());
+        }
+    else if (updateInterval / (KHourToSecs * KOneDay) < 1)
+        {
+        //hour
+        int hours = (updateInterval / KHourToSecs);
+        int minutes = (updateInterval % KHourToSecs) / KMinToSecs;
+        QVariant varhour(hours);
+        QVariant varMinutes(minutes);
+
+        updateIntervalString = QString(hbTrId(
+                "txt_loe_list_updates_every_l1_hours_and_l2_minut")).arg(
+                varhour.toString()).arg(varMinutes.toString());
+        }
+    else
+        {
+        //days
+        int days = (updateInterval / (KHourToSecs * KOneDay));
+        int hours = (updateInterval % (KHourToSecs * KOneDay)) / KMinToSecs;
+        QVariant varDays(days);
+        QVariant varHours(hours);
+        updateIntervalString = QString(hbTrId(
+                "txt_loe_list_updates_every_l1_days_and_l2_hours")).arg(
+                varDays.toString()).arg(varHours.toString());
+        }
+
+    qDebug() << "-PosLocationServices::updateInterval()";
+
+    }
+
+Q_EXPORT_PLUGIN2(poslocationservices, PosLocationServices)
+;
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/src/poslocationservicesengine.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 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"
+* 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: Implementation of PosLocationServicesEngine class.  
+*
+*/
+#include "poslocationservicesengine.h"
+
+
+//----------------------------------------------------------------------
+// PosLocationServicesEngine::PosLocationServicesEngine
+//----------------------------------------------------------------------
+PosLocationServicesEngine::PosLocationServicesEngine()
+    {
+    d_ptr = new PosLocationServicesEnginePrivate( *this );
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEngine::~PosLocationServicesEngine
+//----------------------------------------------------------------------
+PosLocationServicesEngine::~PosLocationServicesEngine()
+    {
+    delete d_ptr;
+    d_ptr = NULL;
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEngine::getLocationServices
+//----------------------------------------------------------------------
+int PosLocationServicesEngine::getLocationServices( 
+                                            QList<PosLocationServiceInfo>& 
+                                            locationServiceList )
+    {
+    return d_ptr->GetLocationServices( locationServiceList );
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEngine::removeLocationService
+//----------------------------------------------------------------------
+int PosLocationServicesEngine::removeLocationService( int serviceId )
+    {
+    return d_ptr->RemoveLocationService( serviceId );
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEngine::handleLocationServiceUpdate
+//----------------------------------------------------------------------
+void PosLocationServicesEngine::handleLocationServiceUpdate()
+    {
+    emit locationServiceUpdate();
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/src/poslocationservicesengineprivate.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 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"
+ * 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: Implementation of PosLocationServicesEnginePrivate class.  
+ *
+ */
+#include "poslocationservicesengineprivate.h"
+
+#include <epos_csuplsettings.h>
+#include <epos_csuplsettingparams.h>
+#include <epos_csuplsettingsconstants.h>
+
+//----------------------------------------------------------------------
+// PosLocationServicesEnginePrivate::PosLocationServicesEnginePrivate
+//----------------------------------------------------------------------
+PosLocationServicesEnginePrivate::PosLocationServicesEnginePrivate(
+        PosLocationServiceUpdateObserver& aObserver) :
+    mObserver(aObserver)
+    {
+    QT_TRAP_THROWING( mSuplSettings = CSuplSettings::NewL();
+            mSuplSettings->SetSessionObserverL( *this ) );
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEnginePrivate::~PosLocationServicesEnginePrivate
+//----------------------------------------------------------------------
+PosLocationServicesEnginePrivate::~PosLocationServicesEnginePrivate()
+    {
+    mSuplSettings->RemoveSessionObserver();
+    delete mSuplSettings;
+    mSuplSettings = NULL;
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEnginePrivate::GetLocationServices
+//----------------------------------------------------------------------
+int PosLocationServicesEnginePrivate::GetLocationServices(QList<
+        PosLocationServiceInfo>& aLocationServiceList)
+    {
+    int err = 0;
+    TRAP(err, GetLocationServicesL(aLocationServiceList));
+    return err;
+    }
+//----------------------------------------------------------------------
+// PosLocationServicesEnginePrivate::GetLocationServicesL
+//----------------------------------------------------------------------
+void PosLocationServicesEnginePrivate::GetLocationServicesL(QList<
+        PosLocationServiceInfo>& aLocationServiceList)
+    {
+    RPointerArray<CTriggerParams> triggerParams;
+    CleanupClosePushL(triggerParams);
+    int error = mSuplSettings->GetTriggerParams(triggerParams);
+
+    int count = triggerParams.Count();
+
+    //if there are no trigger params then leave with KErrNotFound
+    if (count <= 0)
+        {
+        User::Leave(KErrNotFound);
+        }
+    
+    //for each entry in the paramlist populate the locationservice list
+    for (int i = 0; i < count; ++i)
+        {
+
+        TInt64 sessionId;
+        TUint64 outstandingTrigger;
+        TUint64 interval;
+        TTime endTime;
+        TBool notificationPresent;
+        TBool triggerNotificationStatus;
+        CTriggerParams::TTriggerType triggerType;
+        CTriggerParams::TRequestType requestType;
+        HBufC* sessionName = HBufC::NewLC(
+                KMaxTriggerSessionNameLen);
+
+        error = triggerParams[i]->Get(sessionId, sessionName->Des(),
+                notificationPresent, triggerNotificationStatus, triggerType,
+                requestType, outstandingTrigger, interval);
+        triggerParams[i]->GetTriggerEndTime(endTime);
+
+        if (error == KErrNone)
+            {
+            PosLocationServiceInfo serviceInfo;
+            serviceInfo.mServiceId = sessionId;
+            QString sName((QChar*) (sessionName->Ptr()),
+                    sessionName->Length());
+
+            serviceInfo.mServiceName.append(sName);
+            serviceInfo.mUpdateInterval = interval;
+            serviceInfo.mEndDateTime.setDate(QDate(endTime.DateTime().Year(),
+                    endTime.DateTime().Month() + 1, endTime.DateTime().Day()
+                            + 1));
+            serviceInfo.mEndDateTime.setTime(QTime(endTime.DateTime().Hour(),
+                    endTime.DateTime().Minute(), endTime.DateTime().Second(),
+                    endTime.DateTime().MicroSecond()));
+
+            aLocationServiceList.append(serviceInfo);
+            }
+        CleanupStack::PopAndDestroy(sessionName);
+        }
+    CleanupStack::Pop(&triggerParams);
+    triggerParams.ResetAndDestroy();
+    
+    //leave if there is an error
+    User::LeaveIfError(error);
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEnginePrivate::RemoveLocationService
+//----------------------------------------------------------------------
+int PosLocationServicesEnginePrivate::RemoveLocationService(int aServiceId)
+    {
+    return mSuplSettings->CancelTriggerSession(aServiceId);
+    }
+
+//----------------------------------------------------------------------
+// PosLocationServicesEnginePrivate::HandleSuplSessionChangeL
+//----------------------------------------------------------------------
+void PosLocationServicesEnginePrivate::HandleSuplSessionChangeL(
+        TSuplSessionEventType /*aEvent*/, TInt64 /*aSessionId*/)
+    {
+    mObserver.handleLocationServiceUpdate();
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/poslocationservices/src/possettingssignalmapper.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of Positioning settings signal mapper class
+ *
+ */
+
+
+#include "possettingssignalmapper.h"
+
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// Constructor
+//---------------------------------------------------------------------
+PosSettingsSignalMapper::PosSettingsSignalMapper()
+    {
+    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// destructor
+//---------------------------------------------------------------------
+PosSettingsSignalMapper::~PosSettingsSignalMapper()
+    {
+    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// 
+//---------------------------------------------------------------------
+void PosSettingsSignalMapper::signalmap()
+    {
+    emit signalmapped();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingscommon.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 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"
+ * 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: Contains the common data structures & Enum
+ *
+ */
+
+#ifndef POSPSYSETTINGSCOMMON_H
+#define POSPSYSETTINGSCOMMON_H
+
+#include <e32cmn.h>
+#include <qstring.h>
+
+/**
+ * Enumeration to indicate the state of the Psy
+ */
+enum PosPsyState
+    {
+    PsyEnable,
+
+    PsyDisable
+    };
+/**
+ * Struct that contains all the info related to each Psy
+ * - uid of Psy
+ * - name
+ * - state of the Psy whether enabled/disabled
+ */
+struct PosPsyInfo
+    {
+    TUid mPsyModuelId;
+
+    QString mPsyName;
+
+    PosPsyState mPsyState;
+    };
+
+#endif /* POSPSYSETTINGSCOMMON_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingsengine.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 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"
+ * 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: Declaration of the Positioning Methods engine class
+ *							used to get the list of available Psy & to manipulate 
+ *							the state of the Psy.
+ *							
+ *
+ */
+
+#ifndef POSPSYSETTINGSENGINE_H
+#define POSPSYSETTINGSENGINE_H
+
+#include "pospsysettingsengineprivate.h"
+
+#include <QObject>
+#include <qglobal.h>
+
+class PosPsySettingsEngine : public QObject,
+        public PositionTechnologyChangeObserver
+    {
+Q_OBJECT
+
+public:
+    /**
+     * Constructor
+     */
+    PosPsySettingsEngine();
+
+    /**
+     * Destructor
+     */
+
+    ~PosPsySettingsEngine();
+
+    /**
+     * This method lists all the PSY that are available
+     * @param[out] psyList - Contains the list of psys that are available
+     * @return - KErrNone - if successfully finds any Psy
+     *           KErrNotFound - if no Psy available.
+     */
+    int listPsys(QList<PosPsyInfo>& psyList);
+
+    /**
+     * This method is used to change the state of the Psy based on the user's
+     * action of either enabling/disabling the Psy.
+     * @param[in] psyModuleId - the uid of the Psy whose state is to be changed.
+     * @param[in] psyState - The value of state to which the Psy has to be changed.
+     */
+
+    int changePsyState(TUid psyModuleId, PosPsyState psyState);
+    
+public: // from PositionTechnologyChangeObserver
+    void handlePositionTechnologyChange();
+
+private:
+signals:
+    /**
+     * This signal is emitted when there is change in PSY wrt to 
+     * its availabilty, state etc.. 
+     */
+    void PSYChange();
+private:
+    Q_DECLARE_PRIVATE_D(d_ptr, PosPsySettingsEngine)
+private:
+    /**
+     * POinter to the PosPsySettingsEnginePrivate
+     * Owns
+     */
+    PosPsySettingsEnginePrivate* d_ptr;
+    };
+
+#endif /* POSPSYSETTINGSENGINE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingsengineprivate.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 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"
+ * 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: Declaration of the Positioning Methods private engine class
+ *							used to get the list of available Psy & to manipulate 
+ *							the state of the Psy by using the location framework apis.
+ *							
+ *
+ */
+
+#ifndef POSPSYSETTINGSENGINEPRIVATE_H
+#define POSPSYSETTINGSENGINEPRIVATE_H
+
+#include "pospsysettingscommon.h"
+
+#include <qlist.h>
+#include <qstring.h>
+#include <epos_mposmodulesobserver.h>
+
+/**
+ * The class defines the interface for receiving position
+ * technology change event.The class interested in position
+ * technology change should inherit from this class.
+ */
+class PositionTechnologyChangeObserver
+    {
+public:
+    virtual void handlePositionTechnologyChange() = 0;
+    };
+
+
+// Forward declarations
+class CPosModules;
+class PosPsySettingsEngine;
+
+class PosPsySettingsEnginePrivate : public MPosModulesObserver
+    {
+public:
+    /**
+     * Constructor
+     */
+    PosPsySettingsEnginePrivate( PositionTechnologyChangeObserver& 
+            posTechChangeObserver);
+
+    /**
+     * Destructor
+     */
+
+    ~PosPsySettingsEnginePrivate();
+
+    /**
+     * This method lists all the PSY that are available
+     * @param[out] psyList - Contains the list of psys that are available
+     * @return - KErrNone - if successfully finds any Psy
+     *           KErrNotFound - if no Psy available.
+     */
+    int listPsys( QList<PosPsyInfo>& psyList );
+
+    /**
+     * This method is used to change the state of the Psy based on the user's
+     * action of either enabling/disabling the Psy.
+     * @param[in] psyModuleId - the uid of the Psy whose state is to be changed.
+     * @param[in] psyState - The value of state to which the Psy has to be changed.
+     */
+
+    int changePsyState( TUid psyModuleId, PosPsyState psyState );
+    
+public: // from MPosModulesObserver
+    virtual void HandleSettingsChangeL( TPosModulesEvent aEvent );
+
+private:
+    /**
+     * This method uses the location framework apis to get the list of available psy
+     */
+    void listPsysL();
+    /**
+     * This method uses the location framework apis to manipulate the state of the Psy
+     */
+    void changePsyStateL( TUid psyModuleId, PosPsyState psyState );
+private :
+    /**
+     * Pointer to CPosModules
+     * Owns
+     */
+    CPosModules* mPosModules;
+    
+    /**
+     * Contains list of PSY info
+     * Own
+     */
+    RArray<PosPsyInfo> mPsyInfoList;
+    /**
+     * Reference to position technology change observer.
+     */
+    PositionTechnologyChangeObserver& mPosTechChangeObserver;
+    /*
+     * POinter to the name of the psy
+     * ToDo: Should be removed
+     */
+    QList<QString*> mNameList;
+    
+    friend class PosPsySettingsEngine;
+    };
+
+#endif /* POSPSYSETTINGSENGINEPRIVATE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/inc/pospsysettingsplugin.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 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"
+ * 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: Declaration of the Positioning Methods plugin to the 
+ *							Avanced settings view
+ *
+ */
+
+#ifndef POSPSYSETTINGSPLUGIN_H
+#define POSPSYSETTINGSPLUGIN_H
+
+
+#include "possettingsadvinterface.h"
+#include "pospsysettingscommon.h"
+#include "possettingssignalmapper.h"
+
+#include <QObject>
+#include <QSignalMapper>
+#include <hbdataformmodelitem.h>
+
+// Forward Declaration
+class PosPsySettingsEngine;
+class PosSettingsAdvOp;
+class PosSettingsSignalMapper;
+
+class PosPsySettingsPlugin : public QObject, public PosSettingsAdvInterface
+{
+Q_OBJECT
+    Q_INTERFACES( PosSettingsAdvInterface )
+public: 
+   /**
+   * Constructor
+   */
+    PosPsySettingsPlugin();
+  /**
+   * Destructor
+   */
+   ~PosPsySettingsPlugin();
+public:
+    /**
+     * Derived from PosSettingsAdvInterface   
+     */ 
+    int initialise( PosSettingsAdvOp* operation );
+    
+private slots:
+		/**
+		* This will be called when any of the positioning methods checkbox is clicked.
+		* @param[in] state - indicates the state of the checkbox,whether enabled/disabled
+		* @param[in] psyUid - indicates the Uid of the Psy that has been clciked.
+		*/
+		void onPsyPressed(int index);
+		/**
+		 * This method will be called on a change in any of the psy info.
+		 * It willbe used to update the positioning methods group to reflect
+		 * the latest available info of psys.
+		 */
+		void updateGroup();
+		
+private:
+		/**
+		 * adds items to the group & make connections
+		 */
+		void addItems();
+		
+		
+private:
+		/**
+		* Pointer to the PosPsySettingsEngine
+		* Owns
+		*/
+		PosPsySettingsEngine* mEngine;
+		/**
+		* List of available Positioning methods
+		*/
+		QList<PosPsyInfo> mPsyList;
+		/**
+		 * pointer to the HbDataFormModelItem
+		 * Does not own
+		 */
+		HbDataFormModelItem* mGroup;
+		/**
+		 * Signal mapper used to map the signal emitted from
+		 * each of the psy check box to the slot
+		 * Owns
+		 */
+		QSignalMapper *mSignalMapper;
+		/**
+		 * List of psy signal mapper class
+		 */
+		QList<PosSettingsSignalMapper*> mPsySignalMapperList;
+		/**
+		 * reference to PosSettingsAdvOp
+		 */
+		PosSettingsAdvOp* mOperation;
+   
+};
+#endif // POSPSYSETTINGSPLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/inc/possettingssignalmapper.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 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"
+ * 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: Declaration of the Positioning Methods plugin signal mapper 
+ *              used to map the signals of each check box item to the index
+ *
+ */
+
+#ifndef PosSettingsSignalMapper_H
+#define PosSettingsSignalMapper_H
+
+#include <QObject>
+
+class PosSettingsSignalMapper : public QObject
+    {
+    Q_OBJECT
+public:
+    /*
+     * constructor
+     */
+    PosSettingsSignalMapper();
+    /**
+     * destructor
+     */
+    ~PosSettingsSignalMapper();
+private:
+signals:
+    /**
+     * signal emitted by the slot of this class
+     */
+    void signalmapped();
+public slots:
+    /**
+     * slot to be called on a change in state of checkbox.
+     * this in turn calls the signal signalmapped()
+     */
+    void signalmap();
+    };
+
+#endif //PosSettingsSignalMapper_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/pospsysettings.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 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"
+# 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:  PosPsySetting pro file
+#
+
+TEMPLATE = lib
+TARGET = pospsysettings
+DEPENDPATH += .
+INCLUDEPATH += ../inc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+CONFIG += hb \
+					plugin
+
+#Uncomment following line to disable logging
+#DEFINES += QT_NO_DEBUG_OUTPUT
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+
+# Platforms
+SYMBIAN_PLATFORMS = WINSCW \
+    ARMV5
+LIBS += -lcpframework \
+    -llbs \
+    -leposmodset \
+    -lpossettingsengine
+
+# Input
+SOURCES += src/possettingssignalmapper.cpp \
+    src/pospsysettingsplugin.cpp \
+    src/pospsysettingsengine.cpp \
+    src/pospsysettingsengineprivate.cpp
+HEADERS += inc/possettingssignalmapper.h \
+    inc/pospsysettingsplugin.h \
+    inc/pospsysettingsengine.h \
+    inc/pospsysettingsengineprivate.h \
+    inc/pospsysettingscommon.h
+symbian: { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    DEFINES += PLUGINUID3=0x2002C31A
+    TARGET.UID3 = 0x2002C31A
+}
+symbian { 
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/positioningsettings
+    qtplugins.sources += qmakepluginstubs/pospsysettings.qtplugin
+    
+    # This is for new exporting system coming in garden
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+}
+TARGET.CAPABILITY = All -TCB
+plugin.sources = pospsysettings.dll
+plugin.path = \resource\qt\plugins\positioningsettings
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/src/pospsysettingsengine.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of psy settings engine class. 
+ *
+ */
+
+#include "pospsysettingsengine.h"
+#include <QDebug>
+
+//---------------------------------------------------------------------
+// PosPsySettingsEngine::PosPsySettingsEngine()
+// Constructor
+//---------------------------------------------------------------------
+PosPsySettingsEngine::PosPsySettingsEngine()
+    {
+    qDebug() << "+ PosSettingsEngine::PosPsySettingsEngine()";		
+    d_ptr = new PosPsySettingsEnginePrivate(*this);
+    qDebug() << "- PosSettingsEngine::PosPsySettingsEngine()";	
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEngine::~PosPsySettingsEngine()
+// Destructor
+//---------------------------------------------------------------------
+PosPsySettingsEngine::~PosPsySettingsEngine()
+    {
+    qDebug() << "+ PosSettingsEngine::~PosPsySettingsEngine()";	
+    delete d_ptr;
+    d_ptr = NULL;      
+    qDebug() << "- PosSettingsEngine::~PosPsySettingsEngine()";	  
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEngine::listPsys( QList<PosPsyInfo>& psyList )
+// 
+//---------------------------------------------------------------------
+int PosPsySettingsEngine::listPsys(QList<PosPsyInfo>& psyList)
+    {
+    qDebug() << "+ PosSettingsEngine::listPsys()";	
+    int ret = d_ptr->listPsys(psyList);
+    qDebug() << "- PosSettingsEngine::listPsys()" << ret;	
+    return ret;
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEngine::changePsyState( TUid psyModuleId, PosPsyState psyState )
+// 
+//---------------------------------------------------------------------
+int PosPsySettingsEngine::changePsyState(TUid psyModuleId,
+        PosPsyState psyState)
+    {
+    qDebug() << "+ PosSettingsEngine::changePsyState()";	
+    qDebug() << "psystate = " << psyState;
+    int ret = d_ptr->changePsyState(psyModuleId, psyState);
+    qDebug() << "- PosSettingsEngine::changePsyState()" << ret;	
+    return ret;
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEngine::handlePositionTechnologyChange
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsEngine::handlePositionTechnologyChange()
+    {
+    qDebug() << "+ PosSettingsEngine::handlePositionTechnologyChange()";   
+    // emit the signal when there is a change in the list of available psys
+    emit PSYChange();
+    qDebug() << "- PosSettingsEngine::handlePositionTechnologyChange()";   
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/src/pospsysettingsengineprivate.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of psy settings engine private class. 
+ *
+ */
+
+
+#include "pospsysettingsengineprivate.h"
+#include "pospsysettingsengine.h"
+
+#include <qglobal.h>
+#include <epos_cposmodules.h>
+#include <epos_cposmoduleidlist.h>
+#include <epos_cposmoduleupdate.h>
+
+// constants
+const TInt KNameLength = 50;
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::PosPsySettingsEnginePrivate()
+// Constructor
+//---------------------------------------------------------------------
+PosPsySettingsEnginePrivate::PosPsySettingsEnginePrivate(
+        PositionTechnologyChangeObserver& posTechChangeObserver) :
+    mPosTechChangeObserver(posTechChangeObserver)
+    {
+    
+    // initialize the CPosModules pointer
+    QT_TRAP_THROWING ( mPosModules = CPosModules::OpenL();
+            // Register for settings change.
+            mPosModules->SetObserverL( *this ));
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::~PosPsySettingsEnginePrivate()
+// Destructor
+//---------------------------------------------------------------------
+PosPsySettingsEnginePrivate::~PosPsySettingsEnginePrivate()
+    {
+    // delete mPosModules
+    if (mPosModules)
+        {
+        // remove the observer
+    		mPosModules->RemoveObserver();
+        delete mPosModules;
+        mPosModules = NULL;
+        }
+    // delete the psyname 
+    TInt cnt = mNameList.count();
+    for(TInt i=0;i<cnt;++i)
+        {
+        delete mNameList[i];
+        mNameList[i] = NULL;
+        }
+    mNameList.clear();
+    
+    // delete the list of psy info
+    mPsyInfoList.Reset();
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::listPsys( QList<PosPsyInfo>& psyList )
+// 
+//---------------------------------------------------------------------
+int PosPsySettingsEnginePrivate::listPsys(QList<PosPsyInfo>& psyList)
+    {
+    // Get the list of available psy
+    TRAPD( error, listPsysL() );
+
+    if (error == KErrNone)
+        {        
+        // copy the psy from RArray to the Qlist
+        TInt cnt = mPsyInfoList.Count();
+        for (TInt i = 0; i < cnt; ++i)
+            {
+            psyList.append(mPsyInfoList[i]);
+            }
+        return KErrNone;        
+        }
+    else
+        {
+        return error;
+        }
+
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::changePsyState( TUid psyModuleId, PosPsyState psyState )
+// 
+//---------------------------------------------------------------------
+int PosPsySettingsEnginePrivate::changePsyState(TUid psyModuleId,
+        PosPsyState psyState)
+    {
+    // update the psy state
+    TRAPD( error, changePsyStateL( psyModuleId, psyState ) );
+    return error;
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::listPsysL( )
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsEnginePrivate::listPsysL()
+    {
+    // reset the list of psyinfo
+    mPsyInfoList.Reset();
+
+    // get the list of psy module ids
+    CPosModuleIdList* idList = mPosModules->ModuleIdListLC();
+    // for each psy in the list,do the following :
+    // - get module info
+    // - check visibility of psy,if true then do the following :
+    //     -> store the uid,name, state of psy in the PosPsyInfo structure
+    //     -> append to the list of psys.
+    TInt cnt = idList->Count();
+    for (TInt i = 0; i < cnt; ++i)
+        {
+        TPositionModuleInfo moduleInfo;
+        mPosModules->GetModuleInfoL((*idList)[i], moduleInfo);
+
+        // check visibility
+        if (mPosModules->IsModuleVisibleL((*idList)[i]))
+            {
+
+            PosPsyInfo psyInfo;
+            // Set the module Id.
+            psyInfo.mPsyModuelId = moduleInfo.ModuleId();
+
+            // Set module name
+            TBuf<KNameLength> moduleName;
+            moduleInfo.GetModuleName(moduleName);
+            // converting Tbuf to qstring
+            QString* name = new QString((QChar*) moduleName.Ptr(),
+                    moduleName.Length());
+            mNameList.append( name );
+            psyInfo.mPsyName = *name;
+
+            // Set the state of the psy
+            if (moduleInfo.IsAvailable())
+                {
+                psyInfo.mPsyState = PsyEnable;
+                }
+            else
+                {
+                psyInfo.mPsyState = PsyDisable;
+                }
+
+            // append the psyinfo to the list
+            mPsyInfoList.AppendL(psyInfo);
+            }
+        }
+
+    CleanupStack::PopAndDestroy(idList);
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::changePsyStateL( TUid psyModuleId, PosPsyState psyState )
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsEnginePrivate::changePsyStateL(TUid psyModuleId,
+        PosPsyState psyState)
+    {
+    // create an instance of CPosModuleUpdate to help in updating the attributes
+    //  of Psy
+    CPosModuleUpdate* updateParams = CPosModuleUpdate::NewLC();
+    // Depending on the changed state update the availability of the psy
+    // i.e enable/disable
+    if (psyState == PsyEnable)
+        {
+        updateParams->SetUpdateAvailability(ETrue);
+        }
+    else
+        {
+        updateParams->SetUpdateAvailability(EFalse);
+        }
+    // update the state of the psy whose id is mentioned
+    mPosModules->UpdateModuleL(psyModuleId, *updateParams);
+
+    CleanupStack::PopAndDestroy(updateParams);
+
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsEnginePrivate::changePsyStateL( TUid psyModuleId, PosPsyState psyState )
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsEnginePrivate::HandleSettingsChangeL(
+        TPosModulesEvent aEvent)
+    {
+    // Check the event type,only for installation,removal,
+    // change in  visibility,
+    // get the newly available list of psy
+    if (aEvent.iType == EPosModulesEventModuleInstalled || 
+        aEvent.iType == EPosModulesEventModuleRemoved || 
+        aEvent.iType == EPosModulesEventVisibilityChanged)
+        {
+        listPsysL();
+        // call the engine's handlePositionTechnologyChange
+        mPosTechChangeObserver.handlePositionTechnologyChange();
+        }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/src/pospsysettingsplugin.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,276 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of psy settings plugin class. 
+ *
+ */
+#include "pospsysettingsplugin.h"
+#include "pospsysettingsengine.h"
+
+#include <QDebug>
+
+//---------------------------------------------------------------------
+// PosPsySettingsPlugin::PosPsySettingsPlugin()
+// Constructor
+//---------------------------------------------------------------------
+PosPsySettingsPlugin::PosPsySettingsPlugin():
+mGroup(NULL),
+mSignalMapper(NULL),
+mOperation(NULL)
+    {  
+   qDebug() << "================ PSY Plug-in loaded ==============================";	
+   qDebug() << "+ PosPsySettingsPlugin::PosPsySettingsPlugin()";	
+    mEngine = new PosPsySettingsEngine();
+   qDebug() << "- PosPsySettingsPlugin::PosPsySettingsPlugin()";	
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsPlugin::~PosPsySettingsPlugin()
+// Destructor
+//---------------------------------------------------------------------
+PosPsySettingsPlugin::~PosPsySettingsPlugin()
+    {
+    qDebug() << "- PosPsySettingsPlugin::~PosPsySettingsPlugin()";	
+    //Note: no need to call mOperation->removeConnection() as it is already handled in advview's destructor
+    if (mEngine)
+        {
+        delete mEngine;
+        mEngine = NULL;
+        }
+    
+    // delete the group
+    if(mGroup)
+        {
+        mOperation->removeItem( mGroup );
+        }
+
+    // clear the list of available psys
+    mPsyList.clear();
+    
+    QObject::disconnect(mSignalMapper, SIGNAL(mapped(int)), this,
+            SLOT(onPsyPressed(int))); 
+    // delete the QSignalMapper instance
+    if (mSignalMapper)
+        {
+        delete mSignalMapper;
+        mSignalMapper = NULL;
+        }
+
+    // delete the signal mapper instances 
+    int cnt = mPsySignalMapperList.count();
+    for (int i = 0; i < cnt ; ++i)
+        {
+        QObject::disconnect(mPsySignalMapperList[i], SIGNAL(signalmapped()),
+                mSignalMapper, SLOT(map()));
+        delete mPsySignalMapperList[i];
+        mPsySignalMapperList[i] = NULL;
+        }
+    // clear the list of signal mapper
+    mPsySignalMapperList.clear();
+    
+    qDebug() << "- PosPsySettingsPlugin::~PosPsySettingsPlugin()";	
+    qDebug() << "================ PSY Plug-in unloaded ==============================";	   
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsPlugin::initialise( PosSettingsAdvOp* operation )
+// 
+//---------------------------------------------------------------------
+int PosPsySettingsPlugin::initialise(PosSettingsAdvOp* operation)
+    {
+    qDebug() << "+ PosPsySettingsPlugin::initialise()";	
+    mOperation = operation;
+    mPsyList.clear();
+    // get the list of psys 
+    int error = mEngine->listPsys(mPsyList);
+    // if the list is not available return error
+    if (error == KErrNone)
+        {
+        // create group
+        mGroup = new HbDataFormModelItem(HbDataFormModelItem::GroupItem, tr(
+                "Positioning methods"), 0);
+        // append the group to data form using operation
+        operation->appendDataFormItem(mGroup);
+
+        // add group items
+        addItems();
+
+        // make connection to update the group inase of change in availbale list of psy
+        QObject::connect(mEngine, SIGNAL(PSYChange()), this,
+                SLOT(updateGroup()));
+        qDebug() << "- PosPsySettingsPlugin::initialise()";	
+        return KErrNone;
+        }
+    qDebug() << "- PosPsySettingsPlugin::initialise()";	    
+    return error;
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsPlugin::onPsyPressed( int state, int psyUid )
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsPlugin::onPsyPressed(int index)
+    {
+    qDebug() << "+ PosPsySettingsPlugin::onPsyPressed()";	
+    // get the check box item using the index
+    HbDataFormModelItem *checkBox = mGroup->childAt(index);
+    // get the psy name for the check box
+    QVariant name(checkBox->contentWidgetData("text"));
+    QString psyName = name.toString();
+    qDebug() << "Psy to be changed:" << psyName;
+   
+    // get the psyuid for the psy 
+    TUid psyUid = mPsyList.at(index).mPsyModuelId;
+
+    // get the state of the check box
+    QVariant state(checkBox->contentWidgetData(("checkState")));
+    int psyState = state.toInt();
+
+    // change the psy state based on check box state
+    if (psyState == Qt::Checked)
+        {
+        qDebug() << "Psy value:true";	
+        int error = mEngine->changePsyState(psyUid, PsyEnable);
+        }
+    else
+        {
+        qDebug() << "Psy value:false";		
+        int error = mEngine->changePsyState(psyUid, PsyDisable);
+        }
+	qDebug() << "- PosPsySettingsPlugin::onPsyPressed()";		
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsPlugin::updateGroup
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsPlugin::updateGroup()
+    {
+	qDebug() << "+ PosPsySettingsPlugin::updateGroup()";		
+    // remove all connections
+    int cnt= mGroup->childCount();
+    for (int i = 0; i < cnt; ++i)
+        {
+        mOperation->removeConnection(mGroup->childAt(i),
+                SIGNAL(stateChanged(int)), mPsySignalMapperList[i],
+                SLOT(signalmap()));
+        }
+		cnt = mPsySignalMapperList.count();
+    for (int i = 0; i < cnt; ++i)
+        {
+        QObject::disconnect(mPsySignalMapperList[i], SIGNAL(signalmapped()),
+                mSignalMapper, SLOT(map()));
+        delete mPsySignalMapperList[i];
+        mPsySignalMapperList[i] = NULL;        
+        }
+ 		mPsySignalMapperList.clear();
+ 		
+    QObject::disconnect(mSignalMapper, SIGNAL(mapped(int)), this,
+            SLOT(onPsyPressed(int)));
+
+    // delete the QSignalMapper instance
+    if (mSignalMapper)
+        {
+        delete mSignalMapper;
+        mSignalMapper = NULL;
+        }    
+
+    // clear list of psys
+    mPsyList.clear();
+    // get the list of psys 
+    int error = mEngine->listPsys(mPsyList);
+    // if the list is not available return error
+    if (error == KErrNone )
+        {
+      	// remove all group's children
+       //mGroup->removeChildren(0, oldChildCount);
+       //ToDo: Hack from HbDataForm team
+        int cnt = mGroup->childCount();
+        for(int i=0;i<cnt; ++i)	{
+        	mGroup->removeChild(0);	
+        	}
+        // add the group items
+        addItems();
+        if (mOperation->isExpanded(mOperation->indexFromItem(mGroup)))
+            {
+            // set as expanded since group was already expanded
+            mOperation->setExpanded(mOperation->indexFromItem(mGroup), true);
+            }
+        }
+	qDebug() << "- PosPsySettingsPlugin::updateGroup()";		
+    }
+
+//---------------------------------------------------------------------
+// PosPsySettingsPlugin::addItems
+// 
+//---------------------------------------------------------------------
+void PosPsySettingsPlugin::addItems()
+    {
+    qDebug() << "+ PosPsySettingsPlugin::addItems()";		
+    // create the signal mapper 
+    if(mSignalMapper)
+        {
+        delete mSignalMapper;
+        mSignalMapper = NULL;
+        }
+    mSignalMapper = new QSignalMapper();
+
+    // for each of the psys in the list
+    // - add a check box item with name
+    // - set the checkbox state according to the psy's current state
+    // - make connections
+    // foreach( PosPsyInfo psy, mPsyList )
+    int cnt = mPsyList.count();
+    qDebug() << "No of Psys: " << cnt;
+    for (int i = 0; i < cnt; ++i)
+        {
+        // create the check box item
+        HbDataFormModelItem* checkBox = new HbDataFormModelItem(
+                HbDataFormModelItem::CheckBoxItem, QString(), mGroup);
+        QString psyName = mPsyList.at(i).mPsyName;
+        qDebug() << "Psy Name: " << psyName;
+        checkBox->setContentWidgetData("text", psyName);
+
+        // set the state of checkbox
+        if (mPsyList.at(i).mPsyState == PsyEnable)
+            {
+            checkBox->setContentWidgetData("checkState", Qt::Checked);
+            }
+        else
+            {
+            checkBox->setContentWidgetData("checkState", Qt::Unchecked);
+            }
+        // append the check box item to the group
+        mGroup->appendChild(checkBox);
+
+        // create a new psySignalMapper for each checkbox created
+        PosSettingsSignalMapper* psySignalMapper =
+                new PosSettingsSignalMapper();
+        mPsySignalMapperList.append(psySignalMapper);
+
+        // add connections on change of check box state
+        mOperation->addConnection(checkBox, SIGNAL(stateChanged(int)),
+                mPsySignalMapperList[i], SLOT(signalmap()));
+        QObject::connect(mPsySignalMapperList[i], SIGNAL(signalmapped()),
+                mSignalMapper, SLOT(map()));
+        // set mapping of each check box item to its index
+        mSignalMapper->setMapping(mPsySignalMapperList[i], i);
+
+        }
+    QObject::connect(mSignalMapper, SIGNAL(mapped(int)), this,
+            SLOT(onPsyPressed(int)));
+	qDebug() << "- PosPsySettingsPlugin::addItems()";		
+    }
+
+Q_EXPORT_PLUGIN2(pospsysettings, PosPsySettingsPlugin)
+;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/posmethodsplugin/src/possettingssignalmapper.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of psy settings signal mapper class
+ *
+ */
+
+
+#include "PosSettingsSignalMapper.h"
+
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// Constructor
+//---------------------------------------------------------------------
+PosSettingsSignalMapper::PosSettingsSignalMapper()
+    {
+    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// destructor
+//---------------------------------------------------------------------
+PosSettingsSignalMapper::~PosSettingsSignalMapper()
+    {
+    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// 
+//---------------------------------------------------------------------
+void PosSettingsSignalMapper::signalmap()
+    {
+    emit signalmapped();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettings.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 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"
+# 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:  project file for positioing settings in control panel                                                      
+#                                                                    
+
+
+TEMPLATE = subdirs
+
+SYMBIAN_PLATFORMS = WINSCW ARMV5
+
+SUBDIRS += possettingsengine/possettingsengine.pro
+SUBDIRS += possettingsplugin/possettingsplugin.pro
+SUBDIRS += posmethodsplugin/pospsysettings.pro
+SUBDIRS += possuplsettingsplugin/possuplsettings.pro
+SUBDIRS += poslocationservices/poslocationservices.pro                                                                                                                                                                                                                                                       
+
+DEFINES += BUILD_POSSETTINGS
+
+# Build.inf rules
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
+    "possettings_stub.sis /epoc32/data/z/system/install/possettings_stub.sis" \
+    "rom/possettings.iby CORE_MW_LAYER_IBY_EXPORT_PATH(possettings.iby)" \
+    "rom/possettings_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(possettings_resources.iby)" \
+    "conf/positioningsettings.confml MW_LAYER_CONFML(positioningsettings.confml)" \
+    "conf/positioningsettings_2002E685.crml MW_LAYER_CRML(positioningsettings_2002E685.crml)"
+
+   
\ No newline at end of file
Binary file locationsystemui/locationsysui/possettings/possettings_stub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/checkcustomviewitem.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 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""
+ * 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:  
+ *
+ */
+#ifndef CHECK_CUSTOMVIEWITEM_H
+#define CHECK_CUSTOMVIEWITEM_H
+
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+
+class HbWidget;
+
+class CheckCustomViewItem: public HbDataFormViewItem
+{
+	Q_OBJECT
+	
+public:
+    explicit CheckCustomViewItem(QGraphicsItem *parent = 0);
+    ~CheckCustomViewItem();
+    virtual HbAbstractViewItem* createItem();
+        virtual bool canSetModelIndex(const QModelIndex &index) const;
+};
+#endif // CHECK_CUSTOMVIEWITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsadvview.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 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"
+ * 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:Declaration of the Positioning Settings Advanced View class 
+ *
+ */
+
+#ifndef POSSETTINGSENG_ADVANCEDVIEW_H
+#define POSSETTINGSENG_ADVANCEDVIEW_H
+
+#include "possettingsadvop.h"
+
+#include <QObject.h>
+#include <cpbasesettingview.h>
+
+//class PosSettingsAdvancedDataForm;
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class PosSettingsAdvOp;
+class PosSettingsAdvInterface;
+class PosSettingsPluginsLoader;
+class QFileSystemWatcher;
+
+class PosSettingsAdvView : public CpBaseSettingView
+    {
+Q_OBJECT
+
+public:
+    /*
+     * Constructor
+     */
+    PosSettingsAdvView(QGraphicsItem *parent = 0);
+    /*
+     * Destructor
+     */
+    ~PosSettingsAdvView();
+
+private slots:
+    /**
+     * Updates the advanced view in case of change in any of the plugins,
+     * this slot needs to be called
+     */
+    void updateAdvView();
+
+private:
+
+    /**
+      * Handle to Heading groupbox
+      * Not Own
+      */
+     HbDataFormModelItem *mHeading;
+     
+     
+    /*
+     * Pointer to the HbDataForm
+     * Owns
+     */
+    HbDataForm* mAdvancedDataForm;
+    /*
+     * Pointer to the PosSettingsAdvOp
+     * owns
+     */
+    PosSettingsAdvOp* mAdvancedOperation;
+    /**
+     * List containing the plugins
+     */
+    QList<PosSettingsAdvInterface*> mPluginsList;
+    /**
+     * Pointer to the PosSettingsPluginsLoader
+     */
+    PosSettingsPluginsLoader* mPluginsLoader;
+    /**
+     * Pointer to the QFileSystemWatcher
+     * Owns
+     */
+    QFileSystemWatcher* mWatcher;
+
+    };
+
+#endif //POSSETTINGSENG_ADVANCEDVIEW_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingscommon.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 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"
+* 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:  This header exposes common data structues and enums.
+*
+*/
+
+#ifndef POSSETTINGSCOMMON_H
+#define POSSETTINGSCOMMON_H
+
+#include <e32cmn.h>
+
+/**
+ * This enum defines type of position technology.
+ */
+enum PositionTechnology
+    {
+    /**
+     * Bit mask used to specify GPS technology. 
+     */
+    PositionTechnologyGps = 0x01,
+    
+    /**
+     * Bit mask used to specify network technology.
+     */
+    PositionTechnologyNetwork = 0x02,
+    
+    };
+
+/**
+ * This enum defines different state.
+ */
+enum State
+    {
+    StateEnable,
+    
+    StateDisable
+    };
+
+/**
+ * PSY module information
+ */
+struct PsyModuleInfo
+    {
+    /** 
+     * Module id of Psy
+     */
+    TUid mPsyModuleId;
+    
+    /**
+     * Position technology.
+     */
+    PositionTechnology mPosTech;
+    
+    /**
+     * State of Psy
+     */
+    State mState;
+    };
+
+
+#endif /* PosSettingsCOMMON_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsengine.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 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"
+* 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:  Implementation of positioning settings engine class. 
+*
+*/
+
+#ifndef POSITIONINGSETTINGS_ENGINE_H
+#define POSITIONINGSETTINGS_ENGINE_H
+
+
+#include "possettingscommon.h"
+#include "possettingsengineprivate.h"
+#include <QObject.h>
+#include <qglobal.h>
+
+/**
+ * PositioningSettingsEngine class provides an interface that abstracts client
+ * from different GPS and wireless positioning techniques. This exposes methods 
+ * to perform operations on the positioning techniques.
+ */
+
+class PosSettingsEngine : public QObject,
+                               public PositionTechnologyChangeObserver
+    {
+    Q_OBJECT
+public:
+    /**
+     * Default constructor
+     * This throws an error if construction fails.
+     */
+    PosSettingsEngine();
+    
+    /**
+     * Destructor 
+     */
+    ~PosSettingsEngine();
+    
+    /**
+     * Returns whether specified position technology is available.
+     * @param[in] posTechnology Position technology of interest.
+     * @return true if specified position technology is available,
+     *         false if it is not available.
+     */
+    bool isPositionTechnologyAvailable( PositionTechnology posTechnology );
+    
+    /**
+     * Sets the state of position technology.
+     * @param[in] posTechnologyState Resultant state of the position technology 
+     * after this operation.
+     * @param[in] posTechnology State of position technology to be changed.
+     * @return KErrNone if successful,
+     *         KErrNotFound if specified position technology is not available
+     *         Otherwise, standard error code is returned,
+     *         KErrServerBusy, etc.. 
+     */
+    int setPositionTechnologyState( State posTechnologyState,
+                                    PositionTechnology posTechnology );
+    
+    /**
+     * Returns whether specified position technology is enabled. It is recemonded 
+     * to use this method after checking the availability of the position technology
+     * using isPositionTechnologyAvailable method.
+     * @param[in] posTechnology Position technology of interest.
+     * @return true if specified position technology is enabled,
+     *         false if it is disabled.
+     */
+    bool isPositionTechnologyEnabled( PositionTechnology posTechnology );
+
+    /**
+     * Sets the state of back ground positioning.
+     * @param[in] backGroundPosState Resultant state of back ground positioning.
+     * @return KErrNone if successful,
+     *         KErrNotSupported if none of the position type are available,
+     *         KErrArgument if none of the position type are enabled
+     *         otherwise, standard error code is returned,
+     *         KErrServerBusy, etc.. 
+     */
+    int setBackGroundPositioningState( State backGroundPosState );
+     
+    /**
+     * Returns whether back ground positioning is enabled. It is recemonded 
+     * to use this method after checking the availability of the position type
+     * using isPositionTypeAvailable method.
+     * @return true if back ground positioning is enabled,
+     *         false if it is disabled.
+     */
+    bool isBackGroundPositioningEnabled();
+    
+    /**
+     * It will set status of background positioning in CR key
+     * It is required to retain old status when checkbox is inserted/removed
+     * 
+     * status [in] - The status of the background positioning in CR key
+     */
+    void setCRBackgroundPositioningStatus(State backGroundPosState);
+  
+   /**
+    * It will return status of background positioning in CR key
+    * It is required to retain old status when checkbox is inserted/removed.
+    * 
+    * returns true if enabled or false if disabled
+    */
+    bool cRBackgroundPositioningStatus();
+
+public: // from PositionTechnologyChangeObserver
+    void handlePositionTechnologyChange();
+
+private:
+	  signals:
+    /**
+     * This signal is emitted when there is change in any of position
+     * technology wrt to its availabilty, state etc.. 
+     */
+    void positionTechnologyChange();
+    
+private:      
+    Q_DECLARE_PRIVATE_D(d_ptr, PosSettingsEngine)
+private: // data member
+    /**
+     * Pointer to private implementation.
+     * Own
+     */
+    PosSettingsEnginePrivate* d_ptr; 
+    };
+
+#endif /* POSITIONINGSETTINGS_ENGINE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsengineprivate.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,190 @@
+/*
+* Copyright (c) 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"
+* 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:  Positioning settings engine private class. 
+*
+*/
+
+#ifndef POSITIONINGSETTINGSENGINE_PRIVATE_H
+#define POSITIONINGSETTINGSENGINE_PRIVATE_H
+
+#include "possettingscommon.h"
+
+#include <epos_mposmodulesobserver.h>
+#include <lbtserver.h>
+#include <lbtmanager.h>
+
+// Forward declarations
+
+class PosSettingsEngine;
+class CPosModules;
+class CSuplSettings;
+struct TPosModulesEvent;
+
+/**
+ * The class defines the interface for receiving position
+ * technology change event.The class interested in position
+ * technology change should inherit from this class.
+ */
+class PositionTechnologyChangeObserver
+    {
+public:
+    virtual void handlePositionTechnologyChange() = 0;
+    };
+
+/**
+ * PositioningSettingsEnginePrivate is a class that provides implementation
+ * for PositionSettingsEngine class.
+ */
+class PosSettingsEnginePrivate : public MPosModulesObserver
+    {
+public:
+    /**
+     * Default constructor
+     */
+    PosSettingsEnginePrivate( PositionTechnologyChangeObserver& 
+                                      posTechChangeObserver );
+    
+    /**
+     * Destructor 
+     */
+    ~PosSettingsEnginePrivate();
+    
+    /**
+     * Returns whether specified position technology is available.
+     * @param[in] posTechnology Position technology of interest.
+     * @return true if specified position technology is available,
+     *         false if it is not available.
+     */
+    bool isPositionTechnologyAvailable( PositionTechnology posTechnology );
+    
+    /**
+     * Sets the state of position technology.
+     * @param[in] posTechnologyState Resultant state of the position technology 
+     * after this operation.
+     * @param[in] posTechnology State of position technology to be changed.
+     * @return KErrNone if successful,
+     *         KErrNotFound if specified position technology is not available
+     *         Otherwise, standard error code is returned,
+     *         KErrServerBusy, etc.. 
+     */
+    int setPositionTechnologyState( State posTechnologyState,
+                                    PositionTechnology posTechnology );
+    
+    /**
+     * Returns whether specified position technology is enabled. It is recemonded 
+     * to use this method after checking the availability of the position technology
+     * using isPositionTechnologyAvailable method.
+     * @param[in] posTechnology Position technology of interest.
+     * @return true if specified position technology is enabled,
+     *         false if it is disabled.
+     */
+    bool isPositionTechnologyEnabled( PositionTechnology posTechnology );
+
+    
+    /**
+     * Sets the state of back ground positioning.
+     * @param[in] backGroundPosState Resultant state of back ground positioning.
+     * @return KErrNone if successful,
+     *         KErrNotSupported if none of the position type are available,
+     *         KErrArgument if none of the position type are enabled
+     *         otherwise, standard error code is returned,
+     *         KErrServerBusy, etc.. 
+     */
+    int setBackGroundPositioningState( State backGroundPosState );    
+    
+    /**
+     * Returns whether back ground positioning is enabled. It is recemonded 
+     * to use this method after checking the availability of the position type
+     * using isPositionTypeAvailable method.
+     * @return true if back ground positioning is enabled,
+     *         false if it is disabled.
+     */
+    bool isBackGroundPositioningEnabled();
+    
+public: // from MPosModulesObserver
+    virtual void HandleSettingsChangeL( TPosModulesEvent aEvent );
+    
+private:
+	  /**
+     * Sets the state of given positioning technology.
+     * @param[in] posTechnologyState Resultant State of Positioning Technology 
+     * StateEnable/StateDisable.
+     * @param[in] posTechnology Positioning Technology Name 
+     * PositionTechnologyGps/PositionTechnologyNetwork.
+     */
+    void setPositionTechnologyStateL( State posTechnologyState,
+                                PositionTechnology posTechnology );
+    /**
+     * Sets the state of back ground positioning.
+     * @param[in] backGroundPosState Resultant state of back ground positioning.
+     */
+    void setBackGroundPositioningStateL( State backGroundPosState );
+    
+    /**
+     * Populates the PSY module information list.
+     */
+    void populatePsyModuleInfoListL();
+    
+    /**
+     * Gets the state of back ground positioning.
+     */
+    void GetBackGroundPositioingStateL();
+
+private: //Data members
+    
+    /**
+     * Reference to position technology change observer.
+     */
+    PositionTechnologyChangeObserver& mPosTechChangeObserver;
+
+    /**
+     * Pointer to Supl settings object
+     * Own
+     */
+    CSuplSettings* mSuplSettings;
+    
+    /**
+     * Pointer to lbt server
+     * Own
+     */
+    RLbtServer mLbtServer;
+    
+    /**
+     * Pointer to lbt manager
+     * Own
+     */
+    RLbtManager mLbtManager;
+    
+    /**
+     * Pointer to Pos module;
+     * Own
+     */
+    CPosModules* mPosModules;
+    
+    /**
+     * List of PSY module info
+     * Own
+     */
+    RArray<PsyModuleInfo> mPsyModuleInfoList;
+    
+    /**
+     * State of back ground positioning
+     */
+    State mBackGroundPositioningState;
+    
+    friend class PosSettingsEngine;
+    };
+
+
+#endif /* POSITIONINGSETTINGSENGINE_PRIVATE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsform.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 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"
+* 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:  Positioning settings view class. 
+*
+*/
+
+#ifndef POSSETTINGSFORM_H
+#define POSSETTINGSFORM_H
+
+#include <hbdataform.h>
+
+class HbDataFormModelItem;
+class PosSettingsEngine;
+class PosSettingsAdvView;
+class HbAction; 
+
+class PosSettingsForm : public HbDataForm
+    {
+    Q_OBJECT
+private:
+    /*
+     *  Enumarator for the positioning category type
+     */
+    enum PosTypeIndex
+        {
+        /*
+         *  The position of GPS in HbDataForm
+         */
+        PosTypeIndexGps         = 1, 
+        
+        /*
+         *  The position of Wireless in HbDataForm
+         */
+        PosTypeIndexWireless    = 2 ,
+        
+        /*
+         *  The position of Background in HbDataForm
+         */
+        PosTypeIndexBackground  = 3
+        };
+public: 
+    /**
+     * Constructor.
+     */
+    explicit PosSettingsForm( PosSettingsEngine& settingsEngine,
+                                      QGraphicsItem *parent = 0 );
+    
+    /**
+     *  Destructor
+     */
+    ~PosSettingsForm();
+
+private:
+    /**
+     * It will initiate the basic setting view 
+     */
+    void initSettingModel();
+    
+    /**
+     * It will validate visibility of Positioning type 
+     * 
+     * posTypeModelItemIndex[in] - The position at which control should be placed   
+     */
+    void validatePosTypeVisibility(PosTypeIndex posTypeModelItemIndex);
+    
+    /**
+     * It will insert/remove Positioning type control in HbDataForm
+     * 
+     * insert[in] - if true insert control else remove it
+     * posTypeModelItem[in] - HbDataFormModelItem handle for  position type
+     * posTypeModelItemIndex[in] - The position at which control should be placed 
+     * posIndex[in] - The absolute poisition index at which control should be placed. 
+     *								It will different from posTypeModelItemIndex for Wireless and Background 
+     *								depending on GPS, Wireless are visible.
+     */
+    void insertOrRemovePosTypeModelItem(bool insert, HbDataFormModelItem*  posTypeModelItem, 
+                    PosTypeIndex posTypeModelItemIndex, int posIndex);
+    /*
+     * It will create HbDataFormModelItem based on the position specified
+     * 
+     * posTypeModelItemIndex [in] - The position at which control should be placed     
+     */
+    void createPosTypeModelItem(PosTypeIndex posTypeModelItemIndex);
+    
+  	/**
+     * It will mark/unmark positioning category checkbox
+     * 
+     * posTypeModelItemIndex [in] - The position at which control should be placed  
+     */
+    void setPosTypeState(PosTypeIndex posTypeModelItemIndex);
+    
+    /**
+     * It will add connection for the given model item
+     * 
+     * posTypeModelItem [in] - HbDataFormModelItem handle for  position type
+     */
+    void addPosTypeConnection(HbDataFormModelItem*  posTypeModelItem);
+    
+private slots:
+   /**
+    * It will be called when 'Advanced' push button is pressed   
+    */
+    void onPressedAdvanced();
+    
+    /**
+     * It will be called when 'GPS' checkbox is clicked   
+     */
+    void onPressedGps();
+    
+    /**
+     * It will be called when 'Wirelss' checkbox is clicked      
+     */
+    void onPressedWireless();
+    
+    /*
+     * It will be called when 'Background' checkbox is clicked   
+     */
+    void onPressedBackground();
+    /*
+     * It will be called when the Back Button is pressed to dismiss the 
+     * advanced view
+     */
+    void closeAdvancedView();
+
+ 		/**
+     * It will validate visibility of all positioning type controls
+     * It will also be called when new positioning technology is 
+     * added at runtime
+     */
+    void validateVisibility();
+    
+private: // Data memebers
+    /**
+     * Handle to engine
+     * Not Own
+     */
+    PosSettingsEngine& mSettingsEngine; 
+    
+    /**
+     * Handle to 'GPS' checkbox
+     * Not Own
+     */
+    HbDataFormModelItem *mGpsPosType;      
+
+    /**
+     * Handle to 'Wireless' checkbox
+     * Not Own
+     */
+    HbDataFormModelItem *mWirelessPosType; 
+   
+    /**
+     * Handle to 'Background' checkbox
+     * Not Own
+     */
+    HbDataFormModelItem *mBgPosType;
+  
+    /**
+     * Handle to 'Advanced' push button
+     * Not Own
+     */
+    HbDataFormModelItem *mAdvancedSettings;
+   
+    /**
+     * Handle to Heading groupbox
+     * Not Own
+     */
+    HbDataFormModelItem *mHeading;
+    
+    /**
+     * Pointer to Advanced view class
+     * Owns this pointer.
+     */
+    PosSettingsAdvView* mAdvancedView;  
+    
+    /**
+     * handle to the Back Action
+     */
+    HbAction* mBackAction;
+
+    };
+#endif // POSSETTINGSFORM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingsgroupboxitem.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 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"
+* 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:  This class provides custom list item 
+* for the groupbox on the DataForm
+*/
+
+#ifndef POSSETTINGS_GROUPBOXITEM_H
+#define POSSETTINGS_GROUPBOXITEM_H
+
+#include <QObject>
+
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+
+const int GroupboxItem = HbDataFormModelItem::CustomItemBase+12; 
+ 
+class PosSettingsGroupboxItem : public HbDataFormViewItem
+{
+Q_OBJECT
+
+public: //constructor and destructor
+    PosSettingsGroupboxItem(QGraphicsItem *parent);
+    ~PosSettingsGroupboxItem();
+public: //from HbDataFormViewItem
+    /*
+     * It will return custom control item
+     */
+    virtual HbAbstractViewItem* createItem();
+    virtual bool canSetModelIndex(const QModelIndex &index) const;
+    virtual void restore();
+protected:
+    /*
+     * It will define the custom control item
+     */
+    virtual HbWidget* createCustomWidget();
+    
+private:
+    /*
+     * Does not own
+     */
+    HbWidget* mWidget;
+};
+
+#endif // POSSETTINGS_GROUPBOXITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingspluginsloader.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 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"
+ * 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:Declaration of the Positioning Settings PLugins loader 
+ *
+ */
+
+#ifndef PosSettingsPluginsLoader_H
+#define PosSettingsPluginsLoader_H
+
+#include "PosSettingsadvinterface.h"
+
+#include <QObject.h>
+#include <e32cmn.h>
+
+class PosSettingsPluginsLoader 
+    {
+    
+public:
+    /**
+     * Constructor
+     */
+    PosSettingsPluginsLoader();
+    /**
+     * Destructor
+     */
+    ~PosSettingsPluginsLoader();
+    /*
+     * Detects & loads the plugins that implement the 
+     * PosSettingsAdvInterface class
+     */
+     QList<PosSettingsAdvInterface*> loadPlugins();
+private:
+     /**
+      * Reads the cenrep key value to obtain the default order in which 
+      * the positioning settings plugins need to be loaded.
+      */
+     void ParseCenRepKey();
+
+private:
+     /**
+      * Contains list of plugin's dll name in the order in which it
+      * is supposed to be displayed in the advanced view
+      */
+     QList<QString> mDllNameList;
+    
+
+    };
+
+#endif //PosSettingsPluginsLoader_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/inc/possettingspushbuttonitem.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 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"
+* 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:  This class provides custom list item 
+* for the push button on the DataForm
+*/
+
+#ifndef POSSETTINGS_PUSHBUTTONITEM_H
+#define POSSETTINGS_PUSHBUTTONITEM_H
+
+#include <QObject>
+
+#include <hbdataformviewitem.h>
+#include <hbdataformmodelitem.h>
+
+const int PushButtonItem = HbDataFormModelItem::CustomItemBase+11; 
+ 
+class PosSettingsPushButtonItem : public HbDataFormViewItem
+{
+Q_OBJECT
+
+public: //constructor and destructor
+    PosSettingsPushButtonItem(QGraphicsItem *parent);
+    ~PosSettingsPushButtonItem();
+public: //from HbDataFormViewItem
+    /*
+     * It will return custom control item
+     */
+    virtual HbAbstractViewItem* createItem();
+    virtual bool canSetModelIndex(const QModelIndex &index) const;
+    virtual void restore();
+protected:
+    /*
+     * It will define the custom control item
+     */
+    virtual HbWidget* createCustomWidget();
+    
+private:
+    /*
+     * Does not own
+     */
+    HbWidget* mWidget;
+};
+
+#endif // POSSETTINGS_PUSHBUTTONITEM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/possettings.qrc	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,7 @@
+<RCC>    
+    <qresource prefix="/data" >
+        <file alias="pushbuttoncustomviewitem.css">resources/pushbuttoncustomviewitem.css</file>
+        <file alias="groupboxcustomviewitem.css">resources/groupboxcustomviewitem.css</file>        
+        <file alias="checkcustomviewitem.css">resources/checkcustomviewitem.css</file>
+    </qresource>  
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/possettingsengine.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,74 @@
+#
+# Copyright (c) 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"
+# 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:  PosSettingsEngine pro file
+#
+
+TEMPLATE = lib
+TARGET = possettingsengine
+DEPENDPATH += .
+INCLUDEPATH += ../inc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+CONFIG += hb
+
+
+       
+MOC_DIR =     moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+RESOURCES = possettings.qrc 
+
+# Platforms
+SYMBIAN_PLATFORMS = WINSCW \
+    ARMV5
+LIBS += -lcpframework \
+    -llbt \
+    -llbs \
+    -llbtmanager \
+    -leposmodset \
+    -lepos_suplsettings \
+    -lxqsettingsmanager
+
+# Input
+SOURCES += src/possettingspluginsloader.cpp \
+    src/possettingspushbuttonitem.cpp \
+    src/possettingsgroupboxitem.cpp \
+    src/possettingsform.cpp \
+    src/possettingsview.cpp \
+    src/possettingsengineprivate.cpp \
+    src/possettingsengine.cpp \
+    src/possettingsadvview.cpp \
+    src/possettingsadvop.cpp \
+    src/checkcustomviewitem.cpp
+HEADERS += inc/possettingspluginsloader.h \
+    inc/possettingspushbuttonitem.h \
+    inc/possettingsgroupboxitem.h \
+    inc/possettingsform.h \
+    inc/possettingsengineprivate.h \
+    inc/possettingsengine.h \
+    inc/possettingscommon.h \
+    inc/possettingsadvview.h \    
+    ../inc/possettingsadvop.h \
+    inc/checkcustomviewitem.h 
+symbian: { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    DEFINES += BUILD_POSSETTINGS
+    DEFINES += PLUGINUID3=0x2002C319
+    TARGET.UID3 = 0x2002C319
+}
+
+# Build.inf rules
+BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" 
+     
+TARGET.CAPABILITY = All -TCB
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/resources/checkcustomviewitem.css	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,5 @@
+CheckCustomViewItem::dataItem_ContentWidget
+{
+    left: 0.0un;
+    right: var(hb-param-margin-gene-right);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/resources/groupboxcustomviewitem.css	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,6 @@
+PosSettingsGroupboxItem::dataItem_ContentWidget
+{
+    left: 0.0un;
+    right: var(hb-param-margin-gene-right);
+    top: 0.0un;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/resources/pushbuttoncustomviewitem.css	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,5 @@
+PosSettingsPushButtonItem::dataItem_ContentWidget
+{
+    left: -var(hb-param-margin-gene-left);
+    right: var(hb-param-margin-gene-right);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/checkcustomviewitem.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 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""
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  
+ *
+ */
+
+#include "checkcustomviewitem.h"
+#include <hbdataformmodelitem.h>
+#include <hbdataformmodel.h>
+#include <hbabstractitemview.h>
+#include <QMetaProperty>
+
+
+CheckCustomViewItem::CheckCustomViewItem(QGraphicsItem *parent )
+																: HbDataFormViewItem(parent)
+
+{
+}
+CheckCustomViewItem::~CheckCustomViewItem()
+{
+}
+HbAbstractViewItem* CheckCustomViewItem::createItem()
+{
+	return new CheckCustomViewItem(*this);
+}
+bool CheckCustomViewItem::canSetModelIndex(const QModelIndex &index) const
+{
+    int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+    if ( type == HbDataFormModelItem::CheckBoxItem ) {
+            return true;
+    }
+    else {
+            return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsadvop.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,164 @@
+/*
+ * Copyright (c) 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"
+ * 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: Implementation of Positioning settings advanced 
+ *              operation class.
+ *
+ */
+
+#include "possettingsadvop.h"
+#include "possettingsadvview.h"
+#include <QDebug>
+#include <hbdataformviewitem.h>
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::PosSettingsAdvOp()
+// Constructor
+//---------------------------------------------------------------------
+PosSettingsAdvOp::PosSettingsAdvOp(HbView* view) : mView(view)
+    {
+    qDebug() << "+ PosSettingsAdvOp::PosSettingsAdvOp()";
+    mDataForm = qobject_cast<HbDataForm*>(mView->widget());
+    mDataFormModel = static_cast<HbDataFormModel*>(mDataForm->model());
+    qDebug() << "- PosSettingsAdvOp::PosSettingsAdvOp()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::~PosSettingsAdvOp()
+// Destructor
+//---------------------------------------------------------------------
+PosSettingsAdvOp::~PosSettingsAdvOp()
+    {
+    qDebug() << "+ PosSettingsAdvOp::~PosSettingsAdvOp()";
+    qDebug() << "- PosSettingsAdvOp::~PosSettingsAdvOp()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::appendDataFormItem
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::appendDataFormItem(HbDataFormModelItem *data,
+        HbDataFormModelItem *parent)
+    {
+    qDebug() << "+ PosSettingsAdvOp::appendDataFormItem()";
+    mDataFormModel->appendDataFormItem(data, parent);
+    qDebug() << "- PosSettingsAdvOp::appendDataFormItem()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::addConnection
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::addConnection(HbDataFormModelItem *item,
+        const char* signal, QObject *receiver, const char* slot)
+    {
+    qDebug() << "+ PosSettingsAdvOp::addConnection()";
+    mDataForm->addConnection(item, signal, receiver, slot);
+    qDebug() << "- PosSettingsAdvOp::addConnection()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::addAction
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::addAction(HbAction *action,
+        HbView::ActionContainer preferedActionContainer)
+    {
+    qDebug() << "+ PosSettingsAdvOp::addAction()";
+    mView->addAction(action, preferedActionContainer);
+    qDebug() << "- PosSettingsAdvOp::addAction()";
+    }
+
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::indexFromItem
+// 
+//---------------------------------------------------------------------
+QModelIndex PosSettingsAdvOp::indexFromItem(const HbDataFormModelItem * item)
+    {
+    qDebug() << "+ PosSettingsAdvOp::indexFromItem()";
+    qDebug() << "- PosSettingsAdvOp::indexFromItem()";
+    return mDataFormModel->indexFromItem(item);
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::removeConnection
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::removeConnection(HbDataFormModelItem *item,
+        const char* signal, QObject *receiver, const char* slot)
+    {
+    qDebug() << "+ PosSettingsAdvOp::removeConnection()";
+    mDataForm->removeConnection(item, signal, receiver, slot);
+    qDebug() << "- PosSettingsAdvOp::removeConnection()";    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::setExpanded
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::setExpanded(const QModelIndex &index, bool expanded)
+    {
+    qDebug() << "+ PosSettingsAdvOp::setExpanded()";
+    mDataForm->setExpanded( index,expanded);
+    qDebug() << "- PosSettingsAdvOp::setExpanded()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::isExpanded
+// 
+//---------------------------------------------------------------------
+bool PosSettingsAdvOp::isExpanded(const QModelIndex &index)const
+    {
+    qDebug() << "+ PosSettingsAdvOp::isExpanded()";
+    qDebug() << "- PosSettingsAdvOp::isExpanded()";
+    return mDataForm->isExpanded(index);
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::removeItem
+// 
+//---------------------------------------------------------------------
+bool PosSettingsAdvOp::removeItem(HbDataFormModelItem* item)
+    {
+    qDebug() << "+ PosSettingsAdvOp::removeItem()";
+    qDebug() << "- PosSettingsAdvOp::removeItem()";
+    return mDataFormModel->removeItem(item);
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::removeItem
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::setItemPrototypes(
+        QList<HbAbstractViewItem *> &protoTypeList)
+    {
+    qDebug() << "+ PosSettingsAdvOp::setItemPrototypes()";
+    QList<HbAbstractViewItem *> oldProtoTypeList = mDataForm->itemPrototypes();
+    oldProtoTypeList.append(protoTypeList);
+    mDataForm->setItemPrototypes(oldProtoTypeList);
+    qDebug() << "- PosSettingsAdvOp::setItemPrototypes()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvOp::itemPrototypes
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvOp::itemPrototypes(
+        QList<HbAbstractViewItem *> &protoTypeList)
+    {
+    qDebug() << "+ PosSettingsAdvOp::itemPrototypes()";
+    protoTypeList = mDataForm->itemPrototypes();
+    qDebug() << "- PosSettingsAdvOp::itemPrototypes()";
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsadvview.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 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"
+ * 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:Implementation of the Positioning Settings Advanced View class 
+ *
+ */
+
+#include "possettingsadvview.h"
+#include "possettingspluginsloader.h"
+#include "possettingsgroupboxitem.h"
+#include <QDebug>
+#include <QFileSystemWatcher>
+
+#ifdef Q_OS_SYMBIAN
+#define PLUGIN_PATH QString("\\resource\\qt\\plugins\\positioningsettings")
+
+#else
+#define PLUGIN_PATH QString("C:\\qt\\plugins\\positioningsettings")
+#endif 
+
+//---------------------------------------------------------------------
+// PosSettingsAdvView::PosSettingsAdvView()
+// Constructor
+//---------------------------------------------------------------------
+PosSettingsAdvView::PosSettingsAdvView( QGraphicsItem *parent ):
+CpBaseSettingView(0,parent)
+    {
+    qDebug() << "+ PosSettingsAdvView::PosSettingsAdvView()";
+    // create instance of HbDataForm
+    mAdvancedDataForm = new HbDataForm();
+    
+    // Create an instance of HbDataFormModel
+    HbDataFormModel* advancedDataFormModel = new HbDataFormModel();
+
+    // set the model
+    mAdvancedDataForm->setModel( advancedDataFormModel );
+
+    // set the Advanced settings form for this view
+    this->setWidget( mAdvancedDataForm );
+    
+    //set prototype for custom controls
+    QList<HbAbstractViewItem *> protoTypeList = mAdvancedDataForm->itemPrototypes();
+    protoTypeList.append(new PosSettingsGroupboxItem(this));  
+    mAdvancedDataForm->setItemPrototypes(protoTypeList);
+    
+    //Heading                   
+     mHeading = advancedDataFormModel->appendDataFormItem(static_cast<HbDataFormModelItem::DataItemType>(GroupboxItem),
+                                                   QString(),
+                                                   advancedDataFormModel->invisibleRootItem());
+     mHeading->setContentWidgetData("heading",
+                                hbTrId("txt_loe_subtitle_advanced_positioning_settings"));
+
+    
+    
+    // Create an instance of PosSettingsAdvancedOperation
+    mAdvancedOperation = new PosSettingsAdvOp(this);
+    
+
+    mPluginsLoader = new PosSettingsPluginsLoader();
+    // load the plugins
+    mPluginsList = mPluginsLoader->loadPlugins();
+    
+    // for each plugin detected call the plugin's initialize method
+   
+    int cnt = mPluginsList.count();
+    int error = 0;
+    for(int i=0;i<cnt;i++)
+        {
+				error = mPluginsList[i]->initialise(mAdvancedOperation );
+        //pluging is unloaded if the there is an error, with exception for not found.
+        if (error != 0 && error != -1)
+            {
+            delete mPluginsList[i];
+            mPluginsList[i] = 0;
+            mPluginsList.removeAt(i);
+            --cnt;
+            --i;
+            }
+        }
+    // create a QFileSystemWatcher instance
+    mWatcher = new QFileSystemWatcher();
+    mWatcher->addPath(PLUGIN_PATH);
+    
+    // make connection to update the advanced view on change in the plugins
+    QObject::connect(mWatcher,SIGNAL(fileChanged ( const QString & path )),
+                    this,SLOT(updateAdvView()));
+    qDebug() << "- PosSettingsAdvView::PosSettingsAdvView()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvView::~PosSettingsAdvView()
+// Destructor
+//---------------------------------------------------------------------
+PosSettingsAdvView::~PosSettingsAdvView()
+    {   
+    qDebug() << "+ PosSettingsAdvView::~PosSettingsAdvView()";
+  //  mAdvancedDataForm->removeAllConnection();	 
+    delete mAdvancedDataForm;
+    mAdvancedDataForm = NULL;
+    
+    
+    delete mAdvancedOperation;
+    mAdvancedOperation = NULL;
+    
+    delete mPluginsLoader;
+    mPluginsLoader = NULL;
+    
+    // delete the list of plugins
+    foreach( PosSettingsAdvInterface *plugin, mPluginsList )
+            {
+            delete plugin;
+            plugin = 0;
+            }
+    mPluginsList.clear();
+    
+    //ToDo: disconnect mWatcher'signal
+    delete mWatcher;
+    mWatcher = NULL;
+    qDebug() << "- PosSettingsAdvView::~PosSettingsAdvView()";    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsAdvView::updateAdvView()
+// 
+//---------------------------------------------------------------------
+void PosSettingsAdvView::updateAdvView()
+    {
+    qDebug() << "+ PosSettingsAdvView::updateAdvView()";
+    // clear the plugins list
+    foreach( PosSettingsAdvInterface *plugin, mPluginsList )
+        {
+        delete plugin;
+        plugin= NULL;
+        }
+    mPluginsList.clear();
+    
+    // reload the plugins again
+    mPluginsList = mPluginsLoader->loadPlugins();
+    
+    int count = mPluginsList.count();
+    
+    // for each plugin detected call the plugin's initialize method
+    for( int i=0;i<count;++i )
+        {
+        int error = mPluginsList[i]->initialise( mAdvancedOperation );
+        if( error != KErrNone )
+            {
+            delete mPluginsList[i];
+            mPluginsList[i] =NULL;
+            }
+        }
+    qDebug() << "- PosSettingsAdvView::updateAdvView()";
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsengine.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 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"
+* 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:  Implementation of positioning settings engine class. 
+*
+*/
+
+
+#include "possettingsengine.h"
+#include "possettingscrkey.h"
+#include <QDebug>
+#include <xqsettingsmanager.h>
+#include <xqsettingskey.h>
+
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::PosSettingsEngine()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+PosSettingsEngine::PosSettingsEngine()
+    {
+    qDebug() << "+ PosSettingsEngine::PosSettingsEngine()";
+    d_ptr = new PosSettingsEnginePrivate( *this );
+    qDebug() << "- PosSettingsEngine::PosSettingsEngine()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::~PosSettingsEngine()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+PosSettingsEngine::~PosSettingsEngine()
+    {
+    qDebug() << "+ PosSettingsEngine::~PosSettingsEngine()";
+    delete d_ptr;
+    d_ptr = NULL;
+    qDebug() << "- PosSettingsEngine::~PosSettingsEngine()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::isPositionTechnologyAvailable()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsEngine::isPositionTechnologyAvailable( 
+                                      PositionTechnology posTechnology )
+    {
+    qDebug() << "+ PosSettingsEngine::isPositionTechnologyAvailable()";	
+    bool err = d_ptr->isPositionTechnologyAvailable( posTechnology );   
+    qDebug() << "- PosSettingsEngine::isPositionTechnologyAvailable() retvat: " << err;
+    return err; 
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::setPositionTechnologyState()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSettingsEngine::setPositionTechnologyState( 
+                                       State posTechnologyState,
+                                       PositionTechnology posTechnology )
+    {
+    qDebug() << "+ PosSettingsEngine::setPositionTechnologyState()";
+    qDebug() << "posTechnologyState: " << posTechnologyState;
+    int ret = d_ptr->setPositionTechnologyState( posTechnologyState, 
+                                              posTechnology ); 
+		qDebug() << "- PosSettingsEngine::setPositionTechnologyState()" << ret;       
+		return ret;                                       
+    }
+
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::isPositionTechnologyEnabled()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsEngine::isPositionTechnologyEnabled(
+                                         PositionTechnology posTechnology )
+    {
+    qDebug() << "+ PosSettingsEngine::isPositionTechnologyEnabled()";
+    bool ret = d_ptr->isPositionTechnologyEnabled( posTechnology );  
+    qDebug() << "- PosSettingsEngine::isPositionTechnologyEnabled() retval= " << ret;  
+    return ret;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::setBackGroundPositioningState()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSettingsEngine::setBackGroundPositioningState( 
+                                             State backGroundPosState )
+    {
+    qDebug() << "+ PosSettingsEngine::setBackGroundPositioningState()";
+    qDebug() << "backGroundPosState: " <<	backGroundPosState;
+    int ret = d_ptr->setBackGroundPositioningState( backGroundPosState );    
+    qDebug() << "- PosSettingsEngine::setBackGroundPositioningState() retval= " << ret;
+    return ret;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::isPositionTechnologyEnabled()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsEngine::isBackGroundPositioningEnabled()
+    {
+    qDebug() << "+ PosSettingsEngine::isBackGroundPositioningEnabled()";
+    bool ret = d_ptr->isBackGroundPositioningEnabled();    
+    qDebug() << "- PosSettingsEngine::isBackGroundPositioningEnabled() retval= " << ret;
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsEngine::backgroundPositioningStatus
+// ---------------------------------------------------------------------------
+bool PosSettingsEngine::cRBackgroundPositioningStatus()
+    {
+    qDebug() << "+ PosSettingsEngine::isBackGroundPositioningEnabled()";
+    // create a XQSettingsManager instance
+    XQSettingsManager* manager = new XQSettingsManager();
+    // create a XQSettingsKey object to read the cenrep key value
+    XQSettingsKey cenrepKey(XQSettingsKey::TargetCentralRepository,
+            KCRUidPositioningSettings.iUid, KPositioningSettingsBackgroundServicesStatus);
+    // read the cenrep key value
+    QVariant key(manager->readItemValue(cenrepKey,XQSettingsManager::TypeInt));
+    // convert the key value to string
+    int keyIntValue = key.toInt();
+    
+    delete manager;
+    manager = 0;
+    
+    qDebug() << "- PosSettingsEngine::cRBackgroundPositioningStatus()";
+    return keyIntValue;
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsEngine::setCRBackgroundPositioningStatus
+// ---------------------------------------------------------------------------
+void PosSettingsEngine::setCRBackgroundPositioningStatus(State backGroundPosState)
+    {
+    qDebug() << "+ PosSettingsEngine::isBackGroundPositioningEnabled()";
+    // create a XQSettingsManager instance
+    XQSettingsManager* manager = new XQSettingsManager();
+    // create a XQSettingsKey object to read the cenrep key value
+    XQSettingsKey cenrepKey(XQSettingsKey::TargetCentralRepository,
+            KCRUidPositioningSettings.iUid, KPositioningSettingsBackgroundServicesStatus);
+    
+    // write the cenrep key value
+    if(backGroundPosState == StateEnable)
+        QVariant key(manager->writeItemValue(cenrepKey,QVariant(1)));
+    else
+        QVariant key(manager->writeItemValue(cenrepKey,QVariant(0)));
+    
+    delete manager;
+    manager = 0;
+    qDebug() << "- PosSettingsEngine::setCRBackgroundPositioningStatus()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEngine::handlePositionTechnologyChange()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSettingsEngine::handlePositionTechnologyChange()
+    {
+    qDebug() << "+ PosSettingsEngine::handlePositionTechnologyChange()";
+    emit positionTechnologyChange();
+    qDebug() << "- PosSettingsEngine::handlePositionTechnologyChange()";
+    }
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsengineprivate.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,329 @@
+/*
+* Copyright (c) 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"
+* 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:  Implementation of positioning settings engine private class. 
+*
+*/
+
+#include "possettingsengineprivate.h"
+#include "possettingsengine.h"
+#include <qglobal.h>
+#include <epos_csuplsettings.h>
+#include <lbtcommon.h>
+#include <epos_cposmodules.h>
+#include <epos_cposmoduleidlist.h>
+#include <epos_cposmoduleupdate.h>
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::PosSettingsEnginePrivate()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+PosSettingsEnginePrivate::PosSettingsEnginePrivate( 
+                                      PositionTechnologyChangeObserver& 
+                                      posTechChangeObserver):
+                                      mPosTechChangeObserver(
+                                      posTechChangeObserver )
+    {
+    // Open session to LBT server.
+    int error = mLbtServer.Connect();
+    if( error != KErrNone )
+        {
+        throw( error );
+        }
+    //Open subsession to LBT server.
+    error = mLbtManager.Open( mLbtServer );
+    if( error != KErrNone )
+        {
+        throw( error );
+        }
+    QT_TRAP_THROWING( mSuplSettings = CSuplSettings::NewL();
+                      mPosModules = CPosModules::OpenL();
+                
+                      populatePsyModuleInfoListL();
+                      // Get back ground position status
+                      GetBackGroundPositioingStateL();
+                      // Register for settings change.
+                      mPosModules->SetObserverL( *this )
+                    );
+    }
+
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::~PosSettingsEnginePrivate()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+PosSettingsEnginePrivate::~PosSettingsEnginePrivate()
+    {
+    mLbtManager.Close();
+    mLbtServer.Close();
+    delete mSuplSettings;
+    mSuplSettings = NULL;
+    // remove observer
+    mPosModules->RemoveObserver();
+    delete mPosModules;
+    mPosModules = NULL;
+    
+    mPsyModuleInfoList.Close();
+    }
+
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::isPositionTechnologyAvailable()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsEnginePrivate::isPositionTechnologyAvailable( 
+                                       PositionTechnology posTechnology )
+    {
+    // Iterate through the PSY list to find the specified position 
+    // technology.
+    TInt cnt = mPsyModuleInfoList.Count();
+    for( TInt i=0;i<cnt;++i )
+        {
+        if( mPsyModuleInfoList[i].mPosTech == posTechnology )
+            {
+            return true;
+            }
+        }
+    return false;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::setPositionTypeState()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSettingsEnginePrivate::setPositionTechnologyState( 
+                                      State posTechnologyState,
+                                      PositionTechnology posTechnology )
+    {
+    // If the specified position technology is unavailable, return error.
+    if( !isPositionTechnologyAvailable( posTechnology ) )
+        {
+        return KErrNotFound;
+        }
+    
+    int error = KErrNone;
+    TRAP( error,setPositionTechnologyStateL( posTechnologyState,posTechnology ) );
+    return error;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::isPositionTechnologyEnabled()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsEnginePrivate::isPositionTechnologyEnabled( 
+                                       PositionTechnology posTechnology )
+    {
+    // Iterate through the PSY info list to find specified position 
+    // technology and its corresponding state.
+    TInt cnt = mPsyModuleInfoList.Count();
+    for( TInt i=0;i<cnt;++i )
+        {
+        if( mPsyModuleInfoList[i].mPosTech == posTechnology && 
+            mPsyModuleInfoList[i].mState == StateEnable )
+            {
+            return true;
+            }
+        }
+    return false;
+    }
+                                         
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::setBackGroundPositioningState()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSettingsEnginePrivate::setBackGroundPositioningState( 
+                                             State backGroundPosState )
+    {    
+    // Check if any of the position technology are available.
+    if( !mPsyModuleInfoList.Count() )
+        {
+        return KErrNotSupported;
+        }
+    int error = KErrNone;
+    // Change the state of back ground positioning only if its current
+    // state is different from the requested state.
+    if( backGroundPosState != mBackGroundPositioningState )
+        {
+        TRAP( error,setBackGroundPositioningStateL( backGroundPosState ) );
+        }
+    return error;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::isBackGroundPositioningEnabled()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsEnginePrivate::isBackGroundPositioningEnabled()
+    {
+    if( mBackGroundPositioningState == StateEnable )
+        {
+        return true;
+        }
+    return false;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::HandleSettingsChangeL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSettingsEnginePrivate::HandleSettingsChangeL( 
+                                       TPosModulesEvent aEvent )
+    {    
+    // Reset the module info list and repopulate again.
+    mPsyModuleInfoList.Reset();
+    populatePsyModuleInfoListL();
+    
+    if( aEvent.iType == EPosModulesEventModuleInstalled || aEvent.iType == EPosModulesEventModuleRemoved
+    	|| aEvent.iType == EPosModulesEventVisibilityChanged ) 
+        {       
+    	mPosTechChangeObserver.handlePositionTechnologyChange();
+    	}
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::setPositionTechnologyStateL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSettingsEnginePrivate::setPositionTechnologyStateL( 
+                                        State posTechnologyState,
+                                        PositionTechnology posTechnology )
+    {
+    CPosModuleUpdate* updateParams = CPosModuleUpdate::NewLC();
+    
+    if( posTechnologyState == StateEnable )
+        {
+        updateParams->SetUpdateAvailability( ETrue );
+        }
+    else
+        {
+        updateParams->SetUpdateAvailability( EFalse );
+        }
+    TInt cnt = mPsyModuleInfoList.Count();    
+    for( TInt i=0;i<cnt;++i )
+        {
+        // Change the state only if position technology of PSY matches
+        // with the position technology specified and if the state of 
+        // the PSY is different from the requested state.
+        if( mPsyModuleInfoList[i].mPosTech == posTechnology &&
+            mPsyModuleInfoList[i].mState != posTechnologyState )
+            {
+            mPosModules->UpdateModuleL( mPsyModuleInfoList[i].mPsyModuleId, 
+                                        *updateParams );
+            mPsyModuleInfoList[i].mState = posTechnologyState;
+            }
+        }
+    CleanupStack::PopAndDestroy( updateParams );
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::setBackGroundPositioningStateL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSettingsEnginePrivate::setBackGroundPositioningStateL( 
+                                           State backGroundPosState )
+    {
+    if( backGroundPosState == StateEnable )
+        {
+        mLbtManager.SetTriggeringMechanismStateL( 
+                     ETriggeringMechanismOn );
+        User::LeaveIfError( mSuplSettings->SetSuplTriggeredServiceStatus( 
+                                CSuplSettings::ESuplTriggerOn  ) );
+        mBackGroundPositioningState = StateEnable;
+        }
+    else
+        {
+        mLbtManager.SetTriggeringMechanismStateL( 
+                     ETriggeringMechanismOff );
+        User::LeaveIfError( mSuplSettings->SetSuplTriggeredServiceStatus( 
+                                CSuplSettings::ESuplTriggerOff ) );
+        mBackGroundPositioningState = StateDisable;
+        }
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::populatePsyModuleInfoListL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSettingsEnginePrivate::populatePsyModuleInfoListL()
+    {
+    CPosModuleIdList* idList = mPosModules->ModuleIdListLC();
+    TInt cnt = idList->Count();
+    for ( TInt i = 0; i < cnt; ++i )
+        {
+        TPositionModuleInfo moduleInfo;
+        mPosModules->GetModuleInfoL( (*idList)[i], moduleInfo );
+        
+        // Psy module info hold the information regarding PSY that are
+        // essential for our operation.
+        PsyModuleInfo psyModuleInfo;
+        
+        // Set the module Id.
+        psyModuleInfo.mPsyModuleId = moduleInfo.ModuleId();
+        
+        // Set position technology type.
+        if( moduleInfo.TechnologyType() == TPositionModuleInfo::ETechnologyTerminal ||
+            moduleInfo.TechnologyType() == TPositionModuleInfo::ETechnologyAssisted )
+            {
+            psyModuleInfo.mPosTech = PositionTechnologyGps;
+            }
+        else if ( moduleInfo.TechnologyType() == TPositionModuleInfo::ETechnologyNetwork )
+            {
+            psyModuleInfo.mPosTech = PositionTechnologyNetwork;
+            }
+        
+        // Set state of Psy.
+        if( moduleInfo.IsAvailable() )
+            {
+            psyModuleInfo.mState = StateEnable;
+            }
+        else 
+            {
+            psyModuleInfo.mState = StateDisable;
+            }
+        
+        mPsyModuleInfoList.Append( psyModuleInfo );
+        }
+    CleanupStack::PopAndDestroy( idList );
+    }
+
+
+//---------------------------------------------------------------------
+// PosSettingsEnginePrivate::GetBackGroundPositioingStateL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSettingsEnginePrivate::GetBackGroundPositioingStateL()
+    {
+    // Get the SUPL service status.
+    CSuplSettings::TSuplTriggerStatus suplTriggerStatus;
+    User::LeaveIfError( mSuplSettings->GetSuplTriggeredServiceStatus( 
+                        suplTriggerStatus ) );
+    
+    // Get LBT service status.
+    TLbtTriggeringSystemManagementSettings triggeringSystemSettings;
+    mLbtManager.GetTriggeringSystemSettingsL( triggeringSystemSettings );
+    
+    // Back ground positioning state is considered to be enabled only 
+    // if both LBT and SUPL services are enabled.
+    if( suplTriggerStatus == CSuplSettings::ESuplTriggerOn && 
+        triggeringSystemSettings.TriggeringMechanismState() ==
+        ETriggeringMechanismOn )
+        {
+        mBackGroundPositioningState = StateEnable;
+        }
+    else
+        {
+        mBackGroundPositioningState = StateDisable;
+        } 
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsform.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,465 @@
+/*
+* Copyright (c) 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"
+* 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:  This class is for first basic view for positioning settings
+*
+*/
+
+
+#include "possettingsform.h"
+#include "possettingspushbuttonitem.h"
+#include "possettingsgroupboxitem.h"
+#include "checkcustomviewitem.h"
+#include "possettingsengine.h"
+#include "possettingsadvview.h"
+#include <QDebug>
+#include <hbdataformmodelitem.h>
+#include <hbdataformmodel.h>
+#include <hbinstance.h>
+#include <hbaction.h>
+#include <hbstyleloader.h>
+
+static const QString FILE_PATH_CSS = ":/data";
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::PosSettingsForm
+// Constructor
+// ---------------------------------------------------------------------------
+PosSettingsForm::PosSettingsForm( 
+                                       PosSettingsEngine& settingsEngine,
+                                       QGraphicsItem *parent ):
+                                       HbDataForm( parent ),mSettingsEngine( settingsEngine )
+    {
+    qDebug() << "+ PosSettingsForm::PosSettingsForm()";
+    //initialize the form model
+    initSettingModel(); 
+    
+    // slots for required signals on required controls
+    addConnection( mGpsPosType, SIGNAL(released()),
+                    this, SLOT(onPressedGps()) );
+    addConnection( mWirelessPosType, SIGNAL(released()),
+                        this, SLOT(onPressedWireless()) );
+    addConnection( mBgPosType, SIGNAL(released()),
+                        this, SLOT(onPressedBackground()) );
+    addConnection( mAdvancedSettings, SIGNAL(clicked()),
+                        this, SLOT(onPressedAdvanced()) );   
+    
+    //to check runtime if any positioning technology installed/removed or if its visibility is changed.
+    connect(&mSettingsEngine, SIGNAL(positionTechnologyChange()),this, SLOT(validateVisibility()) );
+    
+    //validate visibility of controls based on visibility of positioning technology
+    validateVisibility();
+    qDebug() << "- PosSettingsForm::PosSettingsForm()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::~PosSettingsForm
+// Destructor
+// ---------------------------------------------------------------------------
+PosSettingsForm::~PosSettingsForm()
+    {
+    qDebug() << "+ PosSettingsForm::PosSettingsForm()";
+    // Remove custom layouts
+    HbStyleLoader::unregisterFilePath(FILE_PATH_CSS);
+    
+    //TODO Disconnect of mSettingsEngine positionTechnologyChange
+    
+    removeConnection( mAdvancedSettings, SIGNAL(clicked()),
+                            this, SLOT(onPressedAdvanced()) );
+    removeConnection( mGpsPosType, SIGNAL(released),
+                        this, SLOT(onPressedGps()) );
+    removeConnection( mWirelessPosType, SIGNAL(released),
+                        this, SLOT(onPressedWireless()) );
+    removeConnection( mBgPosType, SIGNAL(released),
+                        this, SLOT(onPressedBackground()) );
+    
+    //ToDo: removeAllConnection crashes with Kern-Exec3 error 
+    //removeAllConnection();
+    qDebug() << "- PosSettingsForm::PosSettingsForm()";     
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::initSettingModel
+// ---------------------------------------------------------------------------
+void PosSettingsForm::initSettingModel()
+    {
+    qDebug() << "+ PosSettingsForm::initSettingModel()";
+    HbDataFormModel *model = new HbDataFormModel(0);
+    this->setModel(model);
+    
+    //set prototype for custom controls
+    QList<HbAbstractViewItem *> protoTypeList = this->itemPrototypes();
+    protoTypeList.append(new PosSettingsPushButtonItem(this) );
+    protoTypeList.append(new CheckCustomViewItem());  
+    protoTypeList.append(new PosSettingsGroupboxItem(this));  
+    this->setItemPrototypes(protoTypeList);
+    
+    // Set custom layouts
+    HbStyleLoader::registerFilePath(FILE_PATH_CSS);    
+    
+    //Heading                   
+    mHeading = model->appendDataFormItem(static_cast<HbDataFormModelItem::DataItemType>(GroupboxItem),
+                                                  QString(),
+                                                  model->invisibleRootItem());
+    mHeading->setContentWidgetData("heading",
+                               hbTrId("txt_loe_subtitle_positioning_settings"));
+
+         
+         
+    //GPS
+    createPosTypeModelItem(PosTypeIndexGps);
+    model->appendDataFormItem(mGpsPosType, model->invisibleRootItem());    
+    //Wireless
+    createPosTypeModelItem(PosTypeIndexWireless);
+    model->appendDataFormItem(mWirelessPosType, model->invisibleRootItem());           
+    //Background
+    createPosTypeModelItem(PosTypeIndexBackground);
+    model->appendDataFormItem(mBgPosType, model->invisibleRootItem());       
+ 
+    //Advance                   
+    mAdvancedSettings = model->appendDataFormItem(static_cast<HbDataFormModelItem::DataItemType>(PushButtonItem),
+                                                  QString(),
+                                                  model->invisibleRootItem());
+    mAdvancedSettings->setContentWidgetData("text",
+                               hbTrId("txt_loe_button_advanced"));
+
+         
+    setPosTypeState(PosTypeIndexGps);
+    setPosTypeState(PosTypeIndexWireless);
+    setPosTypeState(PosTypeIndexBackground);
+    qDebug() << "- PosSettingsForm::initSettingModel()";  
+	}
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::onPressedAdvanced
+// ---------------------------------------------------------------------------
+void PosSettingsForm::onPressedAdvanced()
+{
+    qDebug() << "+ PosSettingsForm::onPressedAdvanced()";
+    mAdvancedView = new PosSettingsAdvView();
+    HbMainWindow* mainWindow = hbInstance->allMainWindows().at(0);
+
+    mainWindow->addView(mAdvancedView);
+    mainWindow->setCurrentView(mAdvancedView);
+     
+    //take back action from controlpanel main window.
+    mBackAction = new HbAction(Hb::BackNaviAction ,mAdvancedView);
+    mAdvancedView->setNavigationAction(mBackAction);
+
+    connect(mBackAction, SIGNAL(triggered()), this, SLOT(closeAdvancedView()));
+    mAdvancedView->show();
+    qDebug() << "- PosSettingsForm::onPressedAdvanced()"; 
+}
+// ---------------------------------------------------------------------------
+// PosSettingsForm::closeAdvancedView
+// ---------------------------------------------------------------------------
+//
+void PosSettingsForm::closeAdvancedView()
+    {
+    qDebug() << "+ PosSettingsForm::closeAdvancedView()";
+    disconnect(mBackAction, SIGNAL(triggered()), this, SLOT(closeAdvancedView()));
+
+    HbMainWindow* mainWindow = hbInstance->allMainWindows().at(0);
+    mainWindow->removeView(mAdvancedView);
+
+    mAdvancedView->setParent(NULL);
+    
+    delete mAdvancedView;
+    mAdvancedView = NULL;
+    
+    // refresh first view 
+    setPosTypeState( PosTypeIndexGps);
+    setPosTypeState( PosTypeIndexWireless);
+    setPosTypeState( PosTypeIndexBackground);
+    validatePosTypeVisibility(PosTypeIndexBackground);  
+    qDebug() << "- PosSettingsForm::closeAdvancedView()"; 
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::onPressedGps
+// ---------------------------------------------------------------------------
+void PosSettingsForm::onPressedGps()
+    { 
+    qDebug() << "+ PosSettingsForm::onPressedGps()";	
+    validatePosTypeVisibility(PosTypeIndexBackground);  	
+    
+     int state = mGpsPosType->contentWidgetData("checkState").toInt();
+     if(state == Qt::Checked)
+        {    //if Gps enable
+        mSettingsEngine.setPositionTechnologyState(StateEnable, PositionTechnologyGps);
+        }
+    else 
+        {    //if Gps disable
+        mSettingsEngine.setPositionTechnologyState(StateDisable, PositionTechnologyGps);
+        }
+    qDebug() << "- PosSettingsForm::onPressedGps()";    
+    }
+	
+// ---------------------------------------------------------------------------
+// PosSettingsForm::onPressedWireless
+// ---------------------------------------------------------------------------
+void PosSettingsForm::onPressedWireless()
+    {  
+    qDebug() << "+ PosSettingsForm::onPressedWireless()";
+    validatePosTypeVisibility(PosTypeIndexBackground); 
+    int state = mWirelessPosType->contentWidgetData("checkState").toInt();
+     if(state == Qt::Checked)
+        {
+        //if Wireless enable
+        mSettingsEngine.setPositionTechnologyState(StateEnable, PositionTechnologyNetwork);
+        }
+    else 
+        {    //if Wireless disable
+        mSettingsEngine.setPositionTechnologyState(StateDisable, PositionTechnologyNetwork);
+        }
+    qDebug() << "- PosSettingsForm::onPressedWireless()"; 
+    }
+	
+// ---------------------------------------------------------------------------
+// PosSettingsForm::onPressedBackground
+// ---------------------------------------------------------------------------
+void PosSettingsForm::onPressedBackground()
+    {
+    qDebug() << "+ PosSettingsForm::onPressedBackground()";
+    int state = mBgPosType->contentWidgetData("checkState").toInt();	
+    if(state == Qt::Checked)
+        {
+        //if Bg enable
+        mSettingsEngine.setBackGroundPositioningState(StateEnable);
+        mSettingsEngine.setCRBackgroundPositioningStatus(StateEnable);
+        }
+     else 
+        {    //if Bg disable;
+        mSettingsEngine.setBackGroundPositioningState(StateDisable);
+        mSettingsEngine.setCRBackgroundPositioningStatus(StateDisable);
+        }
+    qDebug() << "- PosSettingsForm::onPressedBackground()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::validatePosTypeVisibility
+// ---------------------------------------------------------------------------
+//
+void PosSettingsForm::validatePosTypeVisibility(PosTypeIndex posTypeModelItemIndex)
+    {   
+    qDebug() << "+ PosSettingsForm::validatePosTypeVisibility()";
+    bool valid = false;
+    HbDataFormModelItem* posTypeModelItem = NULL; //does not own
+    int posIndex = posTypeModelItemIndex;
+    switch(posTypeModelItemIndex) {
+        case PosTypeIndexGps: {
+            valid = mSettingsEngine.isPositionTechnologyAvailable(PositionTechnologyGps);
+            posTypeModelItem = mGpsPosType;
+            break;
+            }
+        case PosTypeIndexWireless: {
+            valid = mSettingsEngine.isPositionTechnologyAvailable(PositionTechnologyNetwork);
+            posTypeModelItem = mWirelessPosType;
+            HbDataFormModel* model =  static_cast<HbDataFormModel*>(this->model());
+            //if GPS is not there, it will be at position 1
+             if(!model->indexFromItem(mGpsPosType).isValid()) {
+             	 --posIndex ;
+            	}
+            break;
+            }
+        case  PosTypeIndexBackground: {
+            //if Gps and Wireless are not marked, then make Background invisible            
+            valid = (mGpsPosType->contentWidgetData("checkState").toInt() == Qt::Checked ||
+                        mWirelessPosType->contentWidgetData("checkState").toInt() == Qt::Checked);
+            posTypeModelItem = mBgPosType;
+            HbDataFormModel* model =  static_cast<HbDataFormModel*>(this->model());
+            
+             //if GPS is not there, decremenet position
+            if(!model->indexFromItem(mGpsPosType).isValid()) {
+             		--posIndex;
+            	}
+            //if Wireless is not there, decremenet position 	
+            if(!model->indexFromItem(mWirelessPosType).isValid()) {
+             		--posIndex;
+				}
+			 //if no gps no wireless, quit control-panel application	
+			if(posIndex == PosTypeIndexGps-1) { 
+             		qApp->quit();
+             		}
+            break;
+            }
+        default:{
+            break;
+            }
+        
+        }
+   qDebug() << "valid =" << valid;	    
+   insertOrRemovePosTypeModelItem(valid, posTypeModelItem, posTypeModelItemIndex, posIndex);
+   qDebug() << "- PosSettingsForm::validatePosTypeVisibility()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::InsertOrRemovePosTypeModelItem
+// ---------------------------------------------------------------------------
+//
+void PosSettingsForm::insertOrRemovePosTypeModelItem(bool insert, HbDataFormModelItem*  posTypeModelItem, 
+														PosTypeIndex posTypeModelItemIndex, int posIndex)
+    {
+    qDebug() << "+ PosSettingsForm::insertOrRemovePosTypeModelItem()";
+    HbDataFormModel* model =  static_cast<HbDataFormModel*>(this->model());
+    if(!insert) {
+        if(model->indexFromItem(posTypeModelItem).isValid()) {
+            if(model->removeItem(posTypeModelItem)) {
+                //Note: In removeItem, modelitem is removed and then deleted too.
+                // So next time when we want to check if it is present, we have to create dummy modelitem
+                // else with existing handle, we will get kern exec 3 error
+                createPosTypeModelItem(posTypeModelItemIndex);  
+                if(posTypeModelItem == mBgPosType) {
+                        mSettingsEngine.setBackGroundPositioningState(StateDisable);
+                    }
+                }
+            }
+        }
+    else {
+        if(!model->indexFromItem(posTypeModelItem).isValid()) { 
+                model->insertDataFormItem(posIndex,posTypeModelItem);  
+                addPosTypeConnection(posTypeModelItem);
+                
+                if(posTypeModelItem == mBgPosType) {
+                    //Restore to old state in case of background positioning.
+                    if(mSettingsEngine.cRBackgroundPositioningStatus()) {
+                        mSettingsEngine.setBackGroundPositioningState(StateEnable);
+                        }
+                    else {
+                        mSettingsEngine.setBackGroundPositioningState(StateDisable);                    
+                        }
+                    setPosTypeState(PosTypeIndexBackground);
+                    }
+                else //Restore old state of GPS/Wireless
+                    setPosTypeState(posTypeModelItemIndex); 
+           }
+        }
+    qDebug() << "- PosSettingsForm::insertOrRemovePosTypeModelItem()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::createPosTypeModelItem
+// ---------------------------------------------------------------------------
+//
+void PosSettingsForm::createPosTypeModelItem(PosTypeIndex posTypeModelItemIndex)
+    {
+    qDebug() << "+ PosSettingsForm::createPosTypeModelItem()";
+    HbDataFormModel* model =  static_cast<HbDataFormModel*>(this->model());
+    switch(posTypeModelItemIndex) {
+        case PosTypeIndexGps: {         
+           mGpsPosType = new HbDataFormModelItem(HbDataFormModelItem::CheckBoxItem,
+                   QString(),
+                   model->invisibleRootItem());         
+           mGpsPosType->setData(HbDataFormModelItem::DescriptionRole, hbTrId("txt_loe_info_enable_for_most_accurate_positioning"));
+           mGpsPosType->setContentWidgetData("text", hbTrId("txt_loe_list_gps"));
+            break;
+            }
+        case PosTypeIndexWireless: {          
+            mWirelessPosType = new HbDataFormModelItem(HbDataFormModelItem::CheckBoxItem,
+                    QString(),
+                    model->invisibleRootItem());          
+            mWirelessPosType->setData(HbDataFormModelItem::DescriptionRole, hbTrId("txt_loe_info_use_wifi_and_mobile_networks_to_get"));
+            mWirelessPosType->setContentWidgetData("text", hbTrId("txt_loe_list_wireless_networks"));   
+           break;
+           }
+        case PosTypeIndexBackground:{  
+            mBgPosType = new HbDataFormModelItem(HbDataFormModelItem::CheckBoxItem,
+            		QString(),
+                    model->invisibleRootItem());          		    
+		    mBgPosType->setData(HbDataFormModelItem::DescriptionRole, hbTrId("txt_loe_info_enable_applications_and_services_upda"));
+		    mBgPosType->setContentWidgetData("text", hbTrId("txt_loe_list_background_positioning")); 		  	
+           break;
+           }
+        default: {
+            break;
+           }
+        }
+    qDebug() << "- PosSettingsForm::createPosTypeModelItem()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::validateVisibility
+// ---------------------------------------------------------------------------
+//
+void PosSettingsForm::validateVisibility()
+    {  
+    qDebug() << "+ PosSettingsForm::validateVisibility()";
+    validatePosTypeVisibility(PosTypeIndexGps);
+    validatePosTypeVisibility(PosTypeIndexWireless);
+    validatePosTypeVisibility(PosTypeIndexBackground);
+    qDebug() << "- PosSettingsForm::validateVisibility()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::setPosTypeState
+// ---------------------------------------------------------------------------
+void PosSettingsForm::setPosTypeState(PosTypeIndex posTypeModelItemIndex)
+    {
+    qDebug() << "+ PosSettingsForm::setPosTypeState()";
+    int state = Qt::Unchecked;
+    switch(posTypeModelItemIndex){
+        case PosTypeIndexGps: {        
+            if(mSettingsEngine.isPositionTechnologyEnabled(PositionTechnologyGps))
+                state = Qt::Checked;
+            mGpsPosType->setContentWidgetData("checkState", state);      
+            break;
+            }
+        case PosTypeIndexWireless: {
+            if(mSettingsEngine.isPositionTechnologyEnabled(PositionTechnologyNetwork))
+                   state = Qt::Checked;
+            mWirelessPosType->setContentWidgetData("checkState",state);                    
+            break;
+            }
+        case PosTypeIndexBackground: {
+            if(mSettingsEngine.isBackGroundPositioningEnabled())
+                  state = Qt::Checked;
+            mBgPosType->setContentWidgetData("checkState",state);      
+            break;
+            }
+        default : {
+            break;
+            }
+        }
+    qDebug() << "- PosSettingsForm::setPosTypeState()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsForm::addPosTypeConnection
+// ---------------------------------------------------------------------------
+void PosSettingsForm::addPosTypeConnection(HbDataFormModelItem*  posTypeModelItem)
+    {
+    qDebug() << "+ PosSettingsForm::addPosTypeConnection()";
+    if(posTypeModelItem == mGpsPosType)
+        {       
+        addConnection( mGpsPosType, SIGNAL(released()),
+                                                  this, SLOT(onPressedGps()) );
+        qDebug() << "- PosSettingsForm::addPosTypeConnection()";
+        return;
+        }
+    
+    if(posTypeModelItem == mWirelessPosType)        
+       {
+       addConnection( mWirelessPosType, SIGNAL(released()),
+                                                 this, SLOT(onPressedWireless()) );
+       qDebug() << "- PosSettingsForm::addPosTypeConnection()";
+       return;
+       }
+    if(posTypeModelItem == mBgPosType) 
+       {
+       addConnection( mBgPosType, SIGNAL(released()),
+                                                 this, SLOT(onPressedBackground()) );
+       qDebug() << "- PosSettingsForm::addPosTypeConnection()";
+       return;
+       }        
+    }
+//EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsgroupboxitem.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 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"
+* 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:  This class provides custom list item for the
+* DataForm
+*
+*/
+
+#include <possettingsgroupboxitem.h>
+#include <hbdataformmodelitem.h>
+#include <hbgroupbox.h>
+#include <hbabstractitemview.h>
+#include <QMetaProperty>
+#include <hbdataformmodel.h>
+
+// ---------------------------------------------------------------------------
+// PosSettingsGroupboxItem:::PosSettingsGroupboxItem
+// ---------------------------------------------------------------------------
+//
+PosSettingsGroupboxItem::PosSettingsGroupboxItem(QGraphicsItem *parent) :
+HbDataFormViewItem(parent)
+{
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsGroupboxItem:::~PosSettingsGroupboxItem
+// ---------------------------------------------------------------------------
+//
+PosSettingsGroupboxItem::~PosSettingsGroupboxItem()
+{
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsGroupboxItem:::createItem
+// ---------------------------------------------------------------------------
+//
+HbAbstractViewItem* PosSettingsGroupboxItem::createItem()
+{
+    return new PosSettingsGroupboxItem(*this);
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsGroupboxItem:::canSetModelIndex
+// ---------------------------------------------------------------------------
+
+bool PosSettingsGroupboxItem::canSetModelIndex(const QModelIndex &index) const
+{
+        int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+        if (type == GroupboxItem ) {
+                return true;
+        }
+        else {
+                return false;
+        }
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsGroupboxItem:::createCustomWidget
+// ---------------------------------------------------------------------------
+//
+HbWidget* PosSettingsGroupboxItem::createCustomWidget()
+{
+    HbDataFormModelItem::DataItemType itemType =
+    static_cast<HbDataFormModelItem::DataItemType> 
+    ( modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt() );
+    
+    switch (itemType) {
+      case GroupboxItem:
+            { 
+            //custom button
+            QString str =
+                    modelIndex().data(HbDataFormModelItem::PropertyRole).toString();
+           HbGroupBox* groupbox = new HbGroupBox(this);
+					  // Use the Groupbox widget for heading
+					  groupbox->setHeading(str);
+            mWidget = groupbox;
+            return mWidget;
+            }
+        default:
+            return 0;
+    }
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsGroupboxItem:::restore
+// ---------------------------------------------------------------------------
+//
+void PosSettingsGroupboxItem::restore()
+{
+    HbDataFormViewItem::restore();
+    if (mWidget) {
+        HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+            modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+        if(itemType == GroupboxItem) {
+
+            QModelIndex itemIndex = modelIndex();
+            HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+            HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+                model->itemFromIndex(itemIndex));
+
+            const QMetaObject *metaObj = mWidget->metaObject();
+            int count = metaObj->propertyCount();
+            for (int i = 0; i < count; ++i) {
+                QMetaProperty metaProperty = metaObj->property(i);
+                if (metaProperty.isValid() && metaProperty.isWritable()) {
+                    metaProperty.write(mWidget,modelItem->contentWidgetData(metaProperty.name()));
+                }
+          }
+      }
+  }
+}
+   
+//EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingspluginsloader.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 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"
+ * 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: Implementation of the Positioning Settings Plugins Loader class 
+ *
+ */
+
+
+#include "possettingspluginsloader.h"
+#include "possettingscrkey.h"
+#include <QDir>
+#include <QFileInfoList>
+#include <QFileInfo>
+#include <QPluginLoader>
+#include <QDebug>
+#include <xqsettingsmanager.h>
+#include <xqsettingskey.h>
+
+
+#ifdef Q_OS_SYMBIAN
+#define PLUGIN_PATH QString("\\resource\\qt\\plugins\\positioningsettings")
+
+#else
+#define PLUGIN_PATH QString("C:\\qt\\plugins\\positioningsettings")
+#endif 
+
+// constants
+const int KNoOfDigits = 4;
+
+//---------------------------------------------------------------------
+// PosSettingsPluginsLoader::PosSettingsPluginsLoader
+// 
+//---------------------------------------------------------------------
+PosSettingsPluginsLoader::PosSettingsPluginsLoader()
+    {
+    qDebug() << "+ PosSettingsPluginsLoader::PosSettingsPluginsLoader()";
+    qDebug() << "- PosSettingsPluginsLoader::PosSettingsPluginsLoader()";
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsPluginsLoader::~PosSettingsPluginsLoader
+// 
+//---------------------------------------------------------------------
+PosSettingsPluginsLoader::~PosSettingsPluginsLoader()
+    {
+    qDebug() << "+ PosSettingsPluginsLoader::~PosSettingsPluginsLoader()";
+    mDllNameList.clear();
+    qDebug() << "- PosSettingsPluginsLoader::~PosSettingsPluginsLoader()";
+    }
+//---------------------------------------------------------------------
+// PosSettingsPluginsLoader::loadPlugins
+// 
+//---------------------------------------------------------------------
+QList<PosSettingsAdvInterface*> PosSettingsPluginsLoader::loadPlugins()
+    {
+    qDebug() << "+ PosSettingsPluginsLoader::loadPlugins()";
+    // parse the default cen rep key value which is used to determine
+    // the order of loading the default positioning settings plugins
+    ParseCenRepKey();
+    // List containing the plugins implementing the PositioningSettingsAdvancedInterface
+    QList<PosSettingsAdvInterface*> pluginsList;
+    // Check for the files under the positioningsettings directory
+    QDir pluginsDir(PLUGIN_PATH + QDir::separator());
+    QFileInfoList fileInfoList = pluginsDir.entryInfoList();
+    // check each file in this directory,only if its a dll give it to the
+    // plugin loader
+    foreach ( const QFileInfo &fileInfo, fileInfoList )
+            {
+            QString fileName = fileInfo.absoluteFilePath();
+						qDebug() << "Filename: " <<  fileName;
+						
+            if (!QLibrary::isLibrary(fileName))
+                {
+                continue;
+                }
+            // load the dlls using QPluginLoader
+            QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName));
+            qDebug() << "Plugin Filename: " <<  pluginsDir.absoluteFilePath(fileName);
+            QObject *plugin = pluginLoader.instance();
+            // Check if the plugin found is an implementation of the
+            // PosSettingsAdvInterface,if yes add it to the plugins list
+
+            if (plugin)
+                {
+                PosSettingsAdvInterface* advancedInterface = qobject_cast<
+                        PosSettingsAdvInterface *> (plugin);
+
+                if (advancedInterface)
+                    {
+                    
+                    QString dllName = fileInfo.baseName();
+                    // check the position into which the plugin needs to be
+                    // inserted if it is one of the default plugins
+                    for (int i = 0; i < mDllNameList.count(); i++)
+                        {
+                        if (dllName.compare(mDllNameList[i],Qt::CaseInsensitive) == KErrNone)
+                            {
+                            pluginsList.insert(i, advancedInterface);
+                            break;
+                            }
+                        }
+                    }
+                }
+            }
+    qDebug() << "- PosSettingsPluginsLoader::loadPlugins()";
+    return pluginsList;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsPluginsLoader::ParseCenRepKey
+// 
+//---------------------------------------------------------------------
+void PosSettingsPluginsLoader::ParseCenRepKey()
+    {
+    qDebug() << "+ PosSettingsPluginsLoader::ParseCenRepKey()";
+    // create a XQSettingsManager instance
+    XQSettingsManager* manager = new XQSettingsManager();
+    // create a XQSettingsKey object to read the cenrep key value
+    XQSettingsKey cenrepKey(XQSettingsKey::TargetCentralRepository,
+            KCRUidPositioningSettings.iUid, KPositioningSettingsPlugins);
+    // read the cenrep key value
+    QVariant key(manager->readItemValue(cenrepKey,XQSettingsManager::TypeString));
+    // convert the key value to string
+    QString keyStringValue = key.toString();
+    // if the length of default value is less than 4 digits then return
+    if (keyStringValue.size() < KNoOfDigits)
+        {
+        qDebug() << "- PosSettingsPluginsLoader::ParseCenRepKey()";
+        return;
+        }
+    // get the count of the number of plugin dlls
+    int dllCount = keyStringValue.left(KNoOfDigits).toInt();
+    // initialise current index to 4
+    int currentIndex = KNoOfDigits;
+    // extract the name of each of the dll from the cenrep key value
+    for (int i = 0; i < dllCount; i++)
+        {
+        // extract length of dll name
+        int length = keyStringValue.mid(currentIndex, KNoOfDigits).toInt();
+        // increment the current index value
+        currentIndex += KNoOfDigits;
+        // get the dll name
+        QString dllName = keyStringValue.mid(currentIndex, length);
+        // append to list of dll names
+        mDllNameList.append(dllName);
+        // increment the value of currentIndex by length of name
+        currentIndex += length;
+        }
+    qDebug() << "- PosSettingsPluginsLoader::ParseCenRepKey()";
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingspushbuttonitem.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 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"
+* 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:  This class provides custom list item for the
+* DataForm
+*
+*/
+
+#include <possettingspushbuttonitem.h>
+#include <hbdataformmodelitem.h>
+#include <hbpushbutton.h>
+#include <hbabstractitemview.h>
+#include <QMetaProperty>
+#include <hbdataformmodel.h>
+
+// ---------------------------------------------------------------------------
+// PosSettingsPushButtonItem:::PosSettingsPushButtonItem
+// ---------------------------------------------------------------------------
+//
+PosSettingsPushButtonItem::PosSettingsPushButtonItem(QGraphicsItem *parent) :
+HbDataFormViewItem(parent)
+{
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsPushButtonItem:::~PosSettingsPushButtonItem
+// ---------------------------------------------------------------------------
+//
+PosSettingsPushButtonItem::~PosSettingsPushButtonItem()
+{
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsPushButtonItem:::createItem
+// ---------------------------------------------------------------------------
+//
+HbAbstractViewItem* PosSettingsPushButtonItem::createItem()
+{
+    return new PosSettingsPushButtonItem(*this);
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsPushButtonItem:::canSetModelIndex
+// ---------------------------------------------------------------------------
+
+bool PosSettingsPushButtonItem::canSetModelIndex(const QModelIndex &index) const
+{
+        int type = index.data(HbDataFormModelItem::ItemTypeRole).toInt();
+        if (type == PushButtonItem ) {
+                return true;
+        }
+        else {
+                return false;
+        }
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsPushButtonItem:::createCustomWidget
+// ---------------------------------------------------------------------------
+//
+HbWidget* PosSettingsPushButtonItem::createCustomWidget()
+{
+    HbDataFormModelItem::DataItemType itemType =
+    static_cast<HbDataFormModelItem::DataItemType> 
+    ( modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt() );
+    
+    switch (itemType) {
+      case PushButtonItem:
+            { 
+            //custom button
+            QString str =
+                    modelIndex().data(HbDataFormModelItem::PropertyRole).toString();
+            HbPushButton *button = new HbPushButton(str);
+            mWidget = button;
+            return mWidget;
+            }
+        default:
+            return 0;
+    }
+}
+
+// ---------------------------------------------------------------------------
+// PosSettingsPushButtonItem:::restore
+// ---------------------------------------------------------------------------
+//
+void PosSettingsPushButtonItem::restore()
+{
+    HbDataFormViewItem::restore();
+    if (mWidget) {
+        HbDataFormModelItem::DataItemType itemType = static_cast<HbDataFormModelItem::DataItemType>(
+            modelIndex().data(HbDataFormModelItem::ItemTypeRole).toInt());
+
+        if(itemType == PushButtonItem) {
+
+            QModelIndex itemIndex = modelIndex();
+            HbDataFormModel *model = static_cast<HbDataFormModel*>(itemView()->model());;
+            HbDataFormModelItem *modelItem = static_cast<HbDataFormModelItem*>(
+                model->itemFromIndex(itemIndex));
+
+            const QMetaObject *metaObj = mWidget->metaObject();
+            int count = metaObj->propertyCount();
+            for (int i = 0; i < count; i++) {
+                QMetaProperty metaProperty = metaObj->property(i);
+                if (metaProperty.isValid() && metaProperty.isWritable()) {
+                    metaProperty.write(mWidget,modelItem->contentWidgetData(metaProperty.name()));
+                }
+          }
+      }
+  }
+}
+   
+//EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsengine/src/possettingsview.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 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"
+* 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: This is the first view for Positioning Settings plugin 
+*
+*/
+
+#include "possettingsview.h"
+#include "possettingsengine.h"
+#include "possettingsform.h"
+#include "possettingspushbuttonitem.h"
+#include <QDebug>
+
+// ---------------------------------------------------------------------------
+// PosSettingsView::PosSettingsView
+// ---------------------------------------------------------------------------
+//
+PosSettingsView::PosSettingsView(QGraphicsItem 
+                                       *parent):CpBaseSettingView(0,parent)
+    {   
+    qDebug() << "================ Positiong settings is launched ==============================";
+    qDebug() << "+ PosSettingsView::PosSettingsView()";
+    mSettingsEngine = new PosSettingsEngine;
+    if(!mSettingsEngine){
+        qDebug() << "- PosSettingsView::PosSettingsView()";
+        return;
+        }
+        
+    mSettingsForm = new PosSettingsForm( *mSettingsEngine, this );  
+    if(mSettingsForm)
+    		this->setWidget( mSettingsForm );   
+    qDebug() << "- PosSettingsView::PosSettingsView()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsView::~PosSettingsViewl
+// ---------------------------------------------------------------------------
+//
+PosSettingsView::~PosSettingsView()
+    {
+    qDebug() << "+ PosSettingsView::~PosSettingsView()";
+    delete mSettingsEngine;
+    mSettingsEngine = NULL;
+    
+    delete mSettingsForm;
+    mSettingsForm = NULL;
+    
+    qDebug() << "- PosSettingsView::~PosSettingsView()";            
+    qDebug() << "================ Positiong settings is closed ==============================";	   
+    }
+
+//EOF
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/inc/apilogger.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 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"
+* 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:  This class provides function that help in logging entry and exit of APIs of classes
+*
+*/
+
+#ifndef APILOGGER_H
+#define APILOGGER_H
+
+#include <iostream>
+#include <fstream> 
+#include <QDebug>
+#include <qfile.h>
+#include <qtextstream.h>
+
+using namespace std;
+
+
+class ApiLogger
+    {
+    public:
+    static void OpenLogFile();
+    static void CloseLogFile();
+    static void MyOutputHandler(QtMsgType type, const char *msg);
+    };
+    
+#endif // APILOGGER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/inc/possettingsplugin.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 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"
+* 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: This is for Positioning Settings plugin in ControlPanel
+*
+*/
+
+#ifndef POSSETTINGS_PLUGIN_H
+#define POSSETTINGS_PLUGIN_H
+
+class QTranslator;
+#include <cpplugininterface.h>
+
+class PosSettingsPlugin : public QObject, public CpPluginInterface
+{
+Q_OBJECT
+    Q_INTERFACES(CpPluginInterface)
+public: //constructor and destructor
+    PosSettingsPlugin();
+    virtual ~PosSettingsPlugin();
+public:
+    /*
+     * Derived from CpPluginPlatInterface
+     */
+    virtual QList<CpSettingFormItemData*> createSettingFormItemData(CpItemDataHelper &itemDataHelper) const;    
+private:
+	/**
+	* Holds localization translator handle
+	*/
+    QTranslator* mTranslator;
+};
+#endif // POSSETTINGS_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/inc/possettingspluginhelper.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 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"
+* 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:  Positioning settings plugin helper class. 
+*
+*/
+
+#ifndef POSITIONINGSETTINGSPLUGIN_HELPER_H
+#define POSITIONINGSETTINGSPLUGIN_HELPER_H
+
+#include <qglobal.h>
+
+class PosSettingsPluginHelperPrivate;
+/**
+ * PosSettingsPluginHelper is a class that provides helper functions:
+ * To check if feature flag is On/Of
+ * To check if any positioning PSY is visible
+ */
+class PosSettingsPluginHelper
+    {
+public:
+
+
+    /**
+     * Constructor 
+     */
+    PosSettingsPluginHelper();
+
+    /**
+     * Destructor
+     */
+    ~PosSettingsPluginHelper();
+        
+    /**
+     * Returns whether any position psy is available.
+     * @return true if any position psy is available,
+     *         false if it is not available.
+     */
+    bool isPositionPsyAvailable();
+    
+     /**
+     * Returns whether feature flag is enabled.
+     * @return true if feature flag is enabled,
+     *         false if it is not enabled.
+     */
+    bool isFeatureFlagEnabled();
+    
+private:      
+    Q_DECLARE_PRIVATE(PosSettingsPluginHelper)
+protected:
+		PosSettingsPluginHelperPrivate* const d_ptr;   
+    };
+
+
+#endif /* POSITIONINGSETTINGSPLUGIN_HELPER_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/inc/possettingspluginhelper_p.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 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"
+* 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:  Positioning settings plugin helper private class. 
+*
+*/
+
+#ifndef POSITIONINGSETTINGSPLUGIN_HELPERPRIVATE_H
+#define POSITIONINGSETTINGSPLUGIN_HELPERPRIVATE_H
+
+class PosSettingsPluginHelper;
+/**
+ * PosSettingsPluginHelperPrivate is a class that provides helper functions:
+ * To check if feature flag is On/Of
+ * To check if any positioning PSY is visible
+ */
+class PosSettingsPluginHelperPrivate
+    {
+private:
+    
+    /**
+     * Returns whether any position psy is available.
+     * @return true if any position psy is available,
+     *         false if it is not available.
+     */
+    bool isPositionPsyAvailable();
+    
+     /**
+     * Returns whether feature flag is enabled.
+     * @return true if feature flag is enabled,
+     *         false if it is not enabled.
+     */
+    bool isFeatureFlagEnabled();
+    
+    friend class PosSettingsPluginHelper;
+    };
+
+
+#endif /* POSITIONINGSETTINGSPLUGIN_HELPERPRIVATE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/possettingsplugin.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,77 @@
+#
+# Copyright (c) 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"
+# 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:  project file for positioing settings plugin                                                     
+#  
+
+TEMPLATE = lib
+TARGET = possettingsplugin
+DEPENDPATH += .
+INCLUDEPATH += ../inc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+
+CONFIG += hb\
+           plugin
+  
+#Uncomment following line to disable logging
+#DEFINES += QT_NO_DEBUG_OUTPUT
+         
+MOC_DIR =     moc
+OBJECTS_DIR = obj
+RCC_DIR =     rcc
+RESOURCES += possettingsplugin.qrc
+#TRANSLATIONS = lilocationmw.ts
+
+# Platforms
+SYMBIAN_PLATFORMS = WINSCW \
+                    ARMV5
+    
+LIBS += -lcpframework \
+        -lpossettingsengine \
+        -leposmodset \
+        -lfeatmgr
+
+# Input
+SOURCES += 	src/possettingsplugin.cpp \
+						src/possettingspluginhelper.cpp	\
+						src/possettingspluginhelper_p.cpp	 \
+    				src/apilogger.cpp					
+			
+HEADERS += 	inc/possettingsplugin.h \
+						inc/possettingspluginhelper.h \
+						inc/possettingspluginhelper_p.h \
+    				inc/apilogger.h
+						
+symbian { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    DEFINES += PLUGINUID3=0x2002C318
+    TARGET.UID3 = 0x2002C318 
+
+    # Add translation files
+    addFiles.sources = translations/possettings.qm
+    addFiles.path = .
+    #DEPLOYMENT += addFiles
+
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/controlpanel
+    qtplugins.sources += qmakepluginstubs/possettingsplugin.qtplugin    
+    # This is for new exporting system coming in garden
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+}
+     
+TARGET.CAPABILITY = All -TCB
+plugin.sources = possettingsplugin.dll
+plugin.path = \resource\qt\plugins\controlpanel
+DEPLOYMENT += plugin	
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/possettingsplugin.qrc	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,5 @@
+<RCC>
+    <qresource prefix="/translations" >
+        <file alias="possettings">translations/possettings.qm</file>
+    </qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/src/apilogger.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 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"
+* 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:  This class provides function that help in logging entry and exit of APIs of classes
+*
+*/
+
+
+#include "apilogger.h"
+#include <qdatetime.h>
+
+const char* debugFileName("c://logs//lbs//posSettingsEngineLog.txt");
+ofstream logfile;
+
+void ApiLogger::OpenLogFile() 
+{   
+    logfile.open(debugFileName, ios::app);   
+}
+
+void ApiLogger::CloseLogFile() 
+{
+    logfile.flush();
+    logfile.close();
+}
+
+void ApiLogger::MyOutputHandler(QtMsgType type, const char *msg) 
+{    
+    switch (type) {
+        case QtDebugMsg:
+            logfile << QTime::currentTime().toString().toAscii().data() << " Debug: " << msg << "\n";            
+            break;
+        case QtCriticalMsg:
+            logfile << QTime::currentTime().toString().toAscii().data() << " Critical: " << msg << "\n";
+            break;
+        case QtWarningMsg:
+           // logfile << QTime::currentTime().toString().toAscii().data() << " Warning: " << msg << "\n";
+            break;
+        case QtFatalMsg:
+            logfile << QTime::currentTime().toString().toAscii().data() << " Fatal: " << msg << "\n";
+        default:
+            break;
+    }
+    logfile.flush();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/src/possettingsplugin.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is for Positioning Settings plugin in ControlPanel
+ *
+ */
+
+#include "possettingsplugin.h"
+#include "possettingsview.h"
+#include "possettingspluginhelper.h"
+#include "apilogger.h"
+
+#include <QTCore>
+#include <QDebug>
+#include <QTranslator>
+#include <cpsettingformentryitemdataimpl.h>
+
+
+
+// ---------------------------------------------------------------------------
+// PosSettingsPlugin::PosSettingsPlugin
+// ---------------------------------------------------------------------------
+//
+PosSettingsPlugin::PosSettingsPlugin():mTranslator(0)
+    {
+#ifndef QT_NO_DEBUG_OUTPUT
+    ApiLogger::OpenLogFile();
+    qInstallMsgHandler(ApiLogger::MyOutputHandler);
+#endif
+    
+    qDebug() << "+ PosSettingsPluginHelper::PosSettingsPlugin()";
+   mTranslator = new QTranslator();
+    
+    QString lang = QLocale::system().name();
+    QString path = "z:/resource/qt/translations/";
+    bool loaded = false;
+    loaded = mTranslator->load(path + QString("lilocationmw_") + lang);
+    if (loaded == false)
+        {
+        loaded = mTranslator->load("possettings", ":/translations");
+        }
+    if (loaded)
+        {
+        qApp->installTranslator(mTranslator);
+        }
+    qDebug() << "- PosSettingsPluginHelper::PosSettingsPlugin()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsPlugin::~PosSettingsPlugin
+// ---------------------------------------------------------------------------
+//
+PosSettingsPlugin::~PosSettingsPlugin()
+    {
+    qDebug() << "+ PosSettingsPluginHelper::~PosSettingsPlugin()";
+    if (mTranslator)
+        {
+        if (mTranslator->isEmpty() == false)
+            qApp->removeTranslator(mTranslator);
+        delete mTranslator;
+        }
+    qDebug() << "- PosSettingsPluginHelper::~PosSettingsPlugin()";
+    #ifndef QT_NO_DEBUG_OUTPUT
+    qInstallMsgHandler(0);
+    ApiLogger::CloseLogFile();
+    #endif
+    }
+
+// ---------------------------------------------------------------------------
+// PosSettingsPlugin::createSettingFormItemData
+// ---------------------------------------------------------------------------
+//
+QList<CpSettingFormItemData*> PosSettingsPlugin::createSettingFormItemData(
+        CpItemDataHelper &itemDataHelper) const
+    {    
+    qDebug() << "+ PosSettingsPluginHelper::createSettingFormItemData()";
+    PosSettingsPluginHelper helper;
+    QList<CpSettingFormItemData*> formItemDataList;
+    if (!helper.isFeatureFlagEnabled() && helper.isPositionPsyAvailable())
+        {
+        CpSettingFormItemData *itemData = new CpSettingFormEntryItemDataImpl<
+                PosSettingsView> (itemDataHelper, hbTrId(
+                "txt_cp_dblist_positioning"), hbTrId(
+                "txt_cp_dblist_positioning_val_change_positioning_s"));
+        formItemDataList.append(itemData);
+        }
+        qDebug() << "- PosSettingsPluginHelper::createSettingFormItemData()";
+        return formItemDataList;
+    }
+
+Q_EXPORT_PLUGIN2(possettingsplugin, PosSettingsPlugin)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/src/possettingspluginhelper.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 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"
+* 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:  Implementation of positioning settings plugin helper class. 
+*
+*/
+
+#include "possettingspluginhelper.h"
+#include "possettingspluginhelper_p.h"
+#include <QDebug>
+
+//-----------------------------------------------------------------
+//PosSettingsPluginHelper::PosSettingsPluginHelper()
+//-----------------------------------------------------------------
+PosSettingsPluginHelper::PosSettingsPluginHelper() :
+    d_ptr(new PosSettingsPluginHelperPrivate())
+    {
+    qDebug() << "+ PosSettingsPluginHelper::PosSettingsPluginHelper()";
+    qDebug() << "- PosSettingsPluginHelper::PosSettingsPluginHelper()";    
+    }
+
+//-----------------------------------------------------------------
+//PosSettingsPluginHelper::~PosSettingsPluginHelper()
+//-----------------------------------------------------------------
+PosSettingsPluginHelper::~PosSettingsPluginHelper()
+    {
+    qDebug() << "+ PosSettingsPluginHelper::~PosSettingsPluginHelper()";    	
+    if (d_ptr)
+        {
+        delete d_ptr;
+        }
+    qDebug() << "- PosSettingsPluginHelper::~PosSettingsPluginHelper()";            
+    }
+    
+//---------------------------------------------------------------------
+// PosSettingsPluginHelper::populatePsyModuleInfoListL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsPluginHelper::isPositionPsyAvailable()
+    {
+    qDebug() << "+ PosSettingsPluginHelper::isPositionPsyAvailable()";
+    bool ret = d_ptr->isPositionPsyAvailable();
+    qDebug() << "- PosSettingsPluginHelper::isPositionPsyAvailable() ret =" << ret;
+    return ret;
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsPluginHelperPrivate::isFeatureFlagEnabledL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsPluginHelper::isFeatureFlagEnabled()    
+    {   
+    qDebug() << "+ PosSettingsPluginHelper::isFeatureFlagEnabled()";	
+    bool ret = d_ptr->isFeatureFlagEnabled();
+    qDebug() << "- PosSettingsPluginHelper::isFeatureFlagEnabled() ret =" << ret;
+    return ret;
+		}
+		
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/src/possettingspluginhelper_p.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 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"
+* 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:  Implementation of positioning settings plugin helper private class. 
+*
+*/
+
+
+#include "possettingspluginhelper_p.h"
+#include "possettingspluginhelper.h"
+#include <epos_cposmodules.h>
+#include <lbs/epos_cposmoduleidlist.h>
+#include <featmgr.h> 
+
+//---------------------------------------------------------------------
+// PosSettingsPluginHelperPrivate::isPositionPsyAvailable()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsPluginHelperPrivate::isPositionPsyAvailable()
+    {
+    TInt cnt = 0;	
+    TInt err2 = KErrGeneral;
+    CPosModules*  posModules;
+    TRAPD(err1, posModules = CPosModules::OpenL(););
+    if(!posModules)
+      {
+    	User::Leave( KErrGeneral );
+      }
+    else
+    	{
+    	TRAP(err2,
+      CPosModuleIdList* idList = posModules->ModuleIdListLC();    
+      cnt = idList->Count();
+      CleanupStack::PopAndDestroy( idList ););
+      }
+    if(err1==KErrNone && err2 ==KErrNone && cnt) //if no error and there 
+    	return true;
+    else
+    	return false;	
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsPluginHelperPrivate::isFeatureFlagEnabled()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+bool PosSettingsPluginHelperPrivate::isFeatureFlagEnabled()    
+    {   
+    TBool flag = EFalse;
+    TRAPD(err, 
+		FeatureManager::InitializeLibL();	    
+    if ( FeatureManager::FeatureSupported( KFeatureIdFfLocationsysuiHidePositioningMenu ) )
+        {
+        flag = ETrue;
+        }    
+		FeatureManager::UnInitializeLib();		
+		);
+		if(err==KErrNone && flag)
+			return true;
+		else
+			return false;
+		}
+		
+// End of file
Binary file locationsystemui/locationsysui/possettings/possettingsplugin/translations/possettings.qm has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possettingsplugin/translations/possettings.ts	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,599 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
+<context>
+<message numerus="no" id="txt_location_notifications_info_your_location_will">
+    <comment>Info text for periodic location request query (Default policy - Reject)</comment>        
+    <source>Your location will not be shared periodically by default if you don&apos;t respond</source>
+    <translation variants="no">Your location will not be shared periodically by default if you don&apos;t respond</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_03</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_use_1">
+    <comment>Name of the positioning server</comment>        
+    <source>Use %1</source>
+    <translation variants="no">Use %1</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_cellular_network">
+    <comment>2G/3G/etc network settings for positionin use</comment>        
+    <source>Cellular network</source>
+    <translation variants="no">Cellular network</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_opt_delete_server">
+    <comment>Option menu item</comment>        
+    <source>Delete server</source>
+    <translation variants="no">Delete server</translation>
+    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>opt</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_button_advanced">
+    <comment>Button - takes to advanced positioning settings</comment>        
+    <source>Advanced</source>
+    <translation variants="no">Advanced</translation>
+    <extra-loc-layout_id>qtl_dataform_button_sec </extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_button_settings">
+    <comment>Button for accessing settings in control palel</comment>        
+    <source>Settings</source>
+    <translation variants="no">Settings</translation>
+    <extra-loc-layout_id>txt_lint_button_settings</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_updates_every_l1_seconds">
+    <comment>Update interval value when update happens in seconds (59s or less)</comment>        
+    <source>Updates every %L1 seconds</source>
+    <translation variants="no">Updates every %L1 seconds</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_l1l2l3l4e">
+    <comment>Coordinates</comment>        
+    <source>L1%?L2%&apos;L3%.L4%&quot;E</source>
+    <translation variants="no">L1%?L2%&apos;L3%.L4%&quot;E</translation>
+    <extra-loc-layout_id>txt_loe_list_l1l2l3l4e</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_button_reject">
+    <comment>Location request query dialog - Softkey button. Allows the user to reject the suggested operation.</comment>        
+    <source>Reject</source>
+    <translation variants="no">Reject</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cp_dblist_positioning_val_change_positioning_s">
+    <comment>Control panel item in CP main view</comment>        
+    <source>Change positioning settings</source>
+    <translation variants="no">Change positioning settings</translation>
+    <extra-loc-layout_id>qtl_list_sec_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>cp_001</extra-loc-viewid>
+    <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
+    <extra-loc-feature>cp</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_updates_every_l1_days_and_l2_hours">
+    <comment>Update interval value when interval is in days</comment>        
+    <source>Updates every %L1 days and %L2 hours</source>
+    <translation variants="no">Updates every %L1 days and %L2 hours</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_accuracy_l1_meters">
+    <comment>Accuracy information in meters. Displayed when value is 999 meters or less</comment>        
+    <source>Accuracy: %L1 meters</source>
+    <translation variants="no">Accuracy: %L1 meters</translation>
+    <extra-loc-layout_id>txt_lint_accuracy_1_meters</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_subtitle_positioning_methods">
+    <comment>Group heading for positioning methods</comment>        
+    <source>Positioning methods</source>
+    <translation variants="no">Positioning methods</translation>
+    <extra-loc-layout_id>qtl_groupbox_expand_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_button_cancel">
+    <comment>Button. Note! Use this text ID only if there are max. two buttons in the dialog. Allows the user to cancel the action or process.</comment>        
+    <source>Cancel</source>
+    <translation variants="no">Cancel</translation>
+    <extra-loc-layout_id>None</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_accuracy_l1_kilometers">
+    <comment>Accuracy information in kilometers. Displayed when over 999 meters</comment>        
+    <source>Accuracy: %L1 kilometers</source>
+    <translation variants="no">Accuracy: %L1 kilometers</translation>
+    <extra-loc-layout_id>txt_lint_list_accuracy_1_kilometers</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_list_time">
+    <comment>Primary text in list widget. Notification recieved time</comment>        
+    <source>&lt;Time&gt;</source>
+    <translation variants="no">&lt;Time&gt;</translation>
+    <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_internal_gps">
+    <comment>Internal GPS chipset - enabling or disabling that</comment>        
+    <source>Internal GPS</source>
+    <translation variants="no">Internal GPS</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_wifi">
+    <comment>Wi-FI - enable/disable wifi usage in positioning context</comment>        
+    <source>Wi-Fi</source>
+    <translation variants="no">Wi-Fi</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_dpophead_your_location">
+    <comment>Location notification heading text </comment>        
+    <source>Your location not sent to :</source>
+    <translation variants="no">Your location not sent to :</translation>
+    <extra-loc-layout_id>qtl_notifdialog_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_04</extra-loc-viewid>
+    <extra-loc-positionid>dpophead</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_info_enable_for_most_accurate_positioning">
+    <comment>Description text for GPS under the checkbox item</comment>        
+    <source>Enable for most accurate positioning</source>
+    <translation variants="no">Enable for most accurate positioning</translation>
+    <extra-loc-layout_id>qtl_dataform_description_sec </extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_subtitle_positioning_servers">
+    <comment>Group heading positioning servers</comment>        
+    <source>Positioning servers</source>
+    <translation variants="no">Positioning servers</translation>
+    <extra-loc-layout_id>qtl_groupbox_expand_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_info_use_wifi_and_mobile_networks_to_get">
+    <comment>Description text for wireless networks under the checkbox item</comment>        
+    <source>Use WI-FI and mobile networks to get position information</source>
+    <translation variants="no">Use WI-FI and mobile networks to get position information</translation>
+    <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_button_clear_logs">
+    <comment>Single toolbar item to clear logs in Location notification log view</comment>        
+    <source>Clear logs</source>
+    <translation variants="no">Clear logs</translation>
+    <extra-loc-layout_id>qtl_toolbar_tiny1_1</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_subhead_logs">
+    <comment>Sub heading text for Location notification logs view</comment>        
+    <source>Logs</source>
+    <translation variants="no">Logs</translation>
+    <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>subhead</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_button_save">
+    <comment>Save button for saving current position</comment>        
+    <source>Save</source>
+    <translation variants="no">Save</translation>
+    <extra-loc-layout_id>txt_loe_button_save</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_info_select_server_to_delete">
+    <comment>Dialog text for server deletion</comment>        
+    <source>Select server to delete</source>
+    <translation variants="no">Select server to delete</translation>
+    <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_011</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_button_delete">
+    <comment>Button. Note! Use this text ID only if there are max. two buttons in the dialog. Allows the user to delete an item. Note that deleting removes the item permanently from memory.</comment>        
+    <source>Delete</source>
+    <translation variants="no">Delete</translation>
+    <extra-loc-layout_id>None</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_valid_until_2">
+    <comment>value that tells the date until service will be active</comment>        
+    <source>Valid until %2</source>
+    <translation variants="no">Valid until %2</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_title_positioning">
+    <comment>Heading for the positioning info dialog</comment>        
+    <source>Positioning</source>
+    <translation variants="no">Positioning</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_001</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="yes" id="txt_location_notifications_dblist_ln_location_not">
+    <comment>Location notification primarry text in Universal Indicator Menu</comment>        
+    <source>%Ln Location notifications</source>
+    <translation>
+        <numerusform variants="no">(s)%Ln Location notifications</numerusform>
+        <numerusform variants="no">(p)%Ln Location notifications</numerusform>
+    </translation>
+    <extra-loc-layout_id>qtl_indimenu_pri_medium_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_05</extra-loc-viewid>
+    <extra-loc-positionid>dblist_1</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_assisted_gps">
+    <comment>Assisted GPS - enabling or disabling</comment>        
+    <source>Assisted GPS</source>
+    <translation variants="no">Assisted GPS</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_subtitle_background_positioning">
+    <comment>Group heading for location based services</comment>        
+    <source>Background positioning</source>
+    <translation variants="no">Background positioning</translation>
+    <extra-loc-layout_id>qtl_groupbox_expand_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_subtitle_positioning_settings">
+    <comment>subtitle for positioning settings main view</comment>        
+    <source>Positioning settings</source>
+    <translation variants="no">Positioning settings</translation>
+    <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_info_location_was_reque">
+    <comment>Requestor info text in Location request query dialog</comment>        
+    <source>Location was requested by : </source>
+    <translation variants="no">Location was requested by : </translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_01</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_subtitle_advanced_positioning_settings">
+    <comment>Button - takes to advanced positioning settings</comment>        
+    <source>Advanced positioning settings</source>
+    <translation variants="no">Advanced positioning settings</translation>
+    <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>subtitle</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_title_location_request">
+    <comment>Title text in Location request query dialog</comment>        
+    <source>Location request</source>
+    <translation variants="no">Location request</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_01</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_background_positioning">
+    <comment>Checkbox item for enabling/disabling Background positioning</comment>        
+    <source>Background positioning</source>
+    <translation variants="no">Background positioning</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_updates_every_l1_hours_and_l2_minut">
+    <comment>Update interval value when interval is hours (not days or months etc)</comment>        
+    <source>Updates every %L1 hours and %L2 minutes</source>
+    <translation variants="no">Updates every %L1 hours and %L2 minutes</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_updates_every_l1_minutes_and_l2_sec">
+    <comment>Update interval value when interval is in minutes</comment>        
+    <source>Updates every %L1 minutes and %L2 seconds</source>
+    <translation variants="no">Updates every %L1 minutes and %L2 seconds</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_gps">
+    <comment>Checkbox item for enabling/disabling GPS</comment>        
+    <source>GPS</source>
+    <translation variants="no">GPS</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_info_you_location_will">
+    <comment>Info text for periodic location request query - No default policy</comment>        
+    <source>You location will be shared periodically with :</source>
+    <translation variants="no">You location will be shared periodically with :</translation>
+    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_02</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_l1l2l3l4w">
+    <comment>Coordinates</comment>        
+    <source>L1%?L2%&apos;L3%.L4%&quot;W</source>
+    <translation variants="no">L1%?L2%&apos;L3%.L4%&quot;W</translation>
+    <extra-loc-layout_id>txt_loe_list_l1l2l3l4w</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_l1l2l3l4n">
+    <comment>Coordinates</comment>        
+    <source>L1%?L2%&apos;L3%.L4%&quot;N</source>
+    <translation variants="no">L1%?L2%&apos;L3%.L4%&quot;N</translation>
+    <extra-loc-layout_id>txt_loe_list_l1l2l3l4n</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_title_save_as">
+    <comment>Query header for save dialog</comment>        
+    <source>Save as</source>
+    <translation variants="no">Save as</translation>
+    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_005</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_updates_every_l1_months_and_l2_days">
+    <comment>Update interval value when interval is months</comment>        
+    <source>Updates every %L1 months and %L2 days</source>
+    <translation variants="no">Updates every %L1 months and %L2 days</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_bluetooth_gps">
+    <comment>Bluetooth GPS - enabling/disabling external BT GPS device usage</comment>        
+    <source>Bluetooth GPS</source>
+    <translation variants="no">Bluetooth GPS</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_008</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_wireless_networks">
+    <comment>Checkbox item for enabling/disabling Wireless positioning</comment>        
+    <source>Wireless networks</source>
+    <translation variants="no">Wireless networks</translation>
+    <extra-loc-layout_id>qtl_checkbox_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_list_timedate">
+    <comment>Primary text in list widget. Notification received time and ate</comment>        
+    <source>&lt;Time&gt;&lt;Date&gt;</source>
+    <translation variants="no">&lt;Time&gt;&lt;Date&gt;</translation>
+    <extra-loc-layout_id>qtl_list_pri</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cp_dblist_positioning">
+    <comment>Control panel item in CP main view</comment>        
+    <source>Positioning</source>
+    <translation variants="no">Positioning</translation>
+    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>cp_001</extra-loc-viewid>
+    <extra-loc-positionid>dblist_1</extra-loc-positionid>
+    <extra-loc-feature>cp</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_list_your_location_sent">
+    <comment>Multiline secondary text in a list item</comment>        
+    <source>Your location sent to : </source>
+    <translation variants="no">Your location sent to : </translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_button_accept">
+    <comment>Location request query dialog - Softkey button. Allows the user to accept the location request</comment>        
+    <source>Accept</source>
+    <translation variants="no">Accept</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_01</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_list_l1l2l3l4s">
+    <comment>Coordinates</comment>        
+    <source>L1%?L2%&apos;L3%.L4%&quot;S</source>
+    <translation variants="no">L1%?L2%&apos;L3%.L4%&quot;S</translation>
+    <extra-loc-layout_id>txt_loe_list_l1l2l3l4s</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_dblist_positioning">
+    <comment>UniversalIndicatorMenu item text. </comment>        
+    <source>Positioning</source>
+    <translation variants="no">Positioning</translation>
+    <extra-loc-layout_id>qtl_indimenu_pri_medium_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_001</extra-loc-viewid>
+    <extra-loc-positionid>dblist_1</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_button_done">
+    <comment>Button in dialog for closing the Positioning info dialog</comment>        
+    <source>Done</source>
+    <translation variants="no">Done</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey_1</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_002</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_info_stop_service_1">
+    <comment>Confirmation about stopping service</comment>        
+    <source>Stop service %1</source>
+    <translation variants="no">Stop service %1</translation>
+    <extra-loc-layout_id>qtl_dialog_pri3_large_graphic</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_010</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_loe_info_enable_applications_and_services_upda">
+    <comment>Description text for Location based services &amp; background applications</comment>        
+    <source>Enable applications and services update and retrieve location information</source>
+    <translation variants="no">Enable applications and services update and retrieve location information</translation>
+    <extra-loc-layout_id>qtl_dataform_description_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>loe_007</extra-loc-viewid>
+    <extra-loc-positionid>info</extra-loc-positionid>
+    <extra-loc-feature>lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_list_your_location_not">
+    <comment>Multiline secondary text in a list item</comment>        
+    <source>Your location not sent to:</source>
+    <translation variants="no">Your location not sent to:</translation>
+    <extra-loc-layout_id>qtl_list_sec</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>list</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_location_notifications_title_location_notifica">
+    <comment>Title text for Location notifications log view</comment>        
+    <source>Location notifications</source>
+    <translation variants="no">Location notifications</translation>
+    <extra-loc-layout_id>qtl_chrome_title</extra-loc-layout_id>    
+    <extra-loc-viewid>Location notifications_06</extra-loc-viewid>
+    <extra-loc-positionid>title</extra-loc-positionid>
+    <extra-loc-feature>Lo</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_common_button_ok">
+    <comment>Button. Note! Use this text ID only if there are max. two buttons in the dialog. When this button is pressed, the focused item or operation will be selected or accepted.</comment>        
+    <source>OK</source>
+    <translation variants="no">OK</translation>
+    <extra-loc-layout_id>qtl_dialog_softkey_2</extra-loc-layout_id>    
+    <extra-loc-viewid>common</extra-loc-viewid>
+    <extra-loc-positionid>button</extra-loc-positionid>
+    <extra-loc-feature>co</extra-loc-feature>
+    <extra-loc-blank>False</extra-loc-blank>
+</message>
+</context>
+</TS>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possettingssignalmapper.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 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"
+ * 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: Declaration of the Positioning Settings signal mapper 
+ *              used to map the signals of each check box item to the index
+ *
+ */
+
+#ifndef POSSETTINGSSIGNALMAPPER_H
+#define POSSETTINGSSIGNALMAPPER_H
+
+#include <QObject>
+
+class PosSettingsSignalMapper : public QObject
+    {
+    Q_OBJECT
+public:
+    /*
+     * constructor
+     */
+    PosSettingsSignalMapper();
+    /**
+     * destructor
+     */
+    ~PosSettingsSignalMapper();
+public:
+signals:
+    /**
+     * signal emitted by the slot of this class
+     */
+    void signalmapped();
+public slots:
+    /**
+     * slot to be called on a change in state of checkbox.
+     * this in turn calls the signal signalmapped()
+     */
+    void signalmap();
+    };
+
+#endif //POSSETTINGSSIGNALMAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettings.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is for SUPL Positioning Settings plugin 
+ *							for Advanced View
+ *
+ */
+
+#ifndef POSSUPLSETTINGS_PLUGIN_H
+#define POSSUPLSETTINGS_PLUGIN_H
+
+//User Includes
+#include "possuplsettingscommon.h"
+#include "possettingssignalmapper.h"
+
+#include <QObject>
+#include <hbdataformmodelitem.h>
+#include <possettingsadvinterface.h>
+#include <qsignalmapper.h>
+#include <hbdataformviewitem.h>
+
+//Forward Declaration
+class PosSettingsAdvOp;
+class PosSuplSettingsEngine;
+class QModelIndex;
+class HbRadioButtonList;
+class HbDialog;
+
+class PosSuplSettingsPlugin : public QObject, public PosSettingsAdvInterface
+
+    {
+Q_OBJECT
+    Q_INTERFACES( PosSettingsAdvInterface )
+public:
+    /**
+     * Constructor
+     */
+    PosSuplSettingsPlugin();
+
+    /**
+     * Destructor
+     */
+    ~PosSuplSettingsPlugin();
+public:
+    /*
+     * Derived from PosSettingsAdvInterface   
+     */
+    virtual int initialise(PosSettingsAdvOp* operation);
+
+private:
+    /**
+     * This method is used to list all the server that are present for 
+     * positioing. Depending on whether the server is enabled/disabled for positioning
+     * the corresponding checkboxes are marked.
+     */
+    void listServers();
+    
+    /**
+     * This method creates menu to delete the servers
+     */
+    void createMenu();
+
+private slots:
+    /**
+     * This is used as a slot whenever the checkbox is marked/unmarked.
+     * On changing the state of the checkbox the corresponding positioning
+     * server is enabled/disabled
+     * @param [in] - slpid for the server to be enababled/disabled
+     */
+    void changeServerUsage(int slpid);
+
+    /**
+     * This is slot, which is called whenever there is a new server added or 
+     * a server in the list is deleted. This refreshes the view.
+     */
+    void updateList();
+
+    /**
+     * This is slot, which is called when the user selects the   
+     * server to be deleted
+     */
+    void onDeleteServer();
+    
+    /**
+     * This slot is used to enable the primary Action wheneven 
+     * a server is selected from the list of servers to be deleted
+     * @param [in] - index of the server to be deleted
+     */
+    void setPrimaryAction(int itemSelected);
+
+    /**
+     * This slot is used to delete the server whenever
+     * a server is selected from the list of servers to be deleted
+     */
+    void deleteServer();
+    
+private:
+
+    /**
+     * an object if the supl setting engine class
+     * Owns
+     */
+    PosSuplSettingsEngine* mSuplSettingsEngine;
+
+    /**
+     * an object of data form model item class
+     * Owns
+     */
+    HbDataFormModelItem * mGroup;
+
+    /**
+     * Holds the params of the list of servers
+     * Owns
+     */
+    QList<PosServerParams> mServerList;
+
+    /**
+     * hold the signal mapper objects of PosPsySettingsSignalMapper
+     * Owns
+     */
+    QList<PosSettingsSignalMapper*> mSignalMapperList;
+
+    /**
+     * Handle to PosSettingsAdvOp object
+     * Does not own
+     */
+    PosSettingsAdvOp * mOperation;
+
+    /**
+     * an object of QSignalMapper
+     * Owns 
+     */
+    QSignalMapper * mSignalMapper;
+    
+    /**
+     * an object on HbMenu
+     * Owns
+     */
+    HbMenu* mMainMenu;
+    
+    /**
+     * list of servers that can be deleted
+     * Owns
+     */    
+    QList<PosServerParams> mDeleteableServerList;
+    
+    /**
+     * an instance of HBAction, used for SK1 in 
+     * the delete server Dialog box
+     * Owns
+     */
+    HbAction* mPrimaryAction;
+    
+    /**
+     * an instance of HbRadioButtonList, used to add server 
+     * in the delete server selection Dialog box
+     * Owns
+     */
+    HbRadioButtonList *mRadioButtonList;
+    
+    /**
+     * holds the server delete query dialog
+	 * Owns
+     */
+	HbDialog *mDeleteQuery;
+    };
+#endif // POSSUPLSETTINGS_PLUGIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettingscommon.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is a common header for SUPL Positioning Settings plugin 
+ *							for Advanced View
+ *
+ */
+
+#ifndef POSSUPLSETTINGS_COMMON_H
+#define POSSUPLSETTINGS_COMMON_H
+
+#include <qstring.h>
+
+/**
+ * Contains info related to each SUPL Servers
+ * - SLP id
+ * - Server Address
+ * - Access Point
+ * - Server Usage State(enabled/disabled)
+ * - Sim Change Remove (Yes/No)
+ * - Usage is Home Network(Yes/No)
+ * - editable (Yes/No)
+ */
+class PosServerParams
+    {
+public:
+    long slpId;
+    QString serverAdd;
+    QString iap;
+    bool serverEnabled;
+    };
+
+#endif //POSSUPLSETTINGS_COMMON_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettingsengine.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is the engine header for SUPL Positioning Settings plugin 
+ *
+ */
+
+#ifndef POSSUPLSETTINGS_ENGINE_H
+#define POSSUPLSETTINGS_ENGINE_H
+
+
+//User Includes
+#include "possuplsettingsengineprivate.h"
+#include "possuplsettingscommon.h"
+
+#include <e32base.h>
+#include <QObject>
+#include <qstringlist.h>
+#include <epos_csuplsettingparams.h>
+
+//Forward Declarations
+class PosSuplSettingsEnginePrivate;
+class MSuplSettingsObserver;
+
+class PosSuplSettingsEngine : public QObject, public PosSuplSettingsChangeObserver
+    {
+Q_OBJECT
+
+public:
+
+    /**
+     * Constructor 
+     */
+    PosSuplSettingsEngine();
+
+    /**
+     * Destructor
+     */
+    ~PosSuplSettingsEngine();
+
+    /**
+     * This method Lists all the Server that are present for Positioning.
+     * @param [out] - aServerList. Contains the servers that are present.
+     * @returns - KErrNone if successful
+     *          - KErrNotfound is no servers are present
+     */
+
+    int suplServerList(QList<PosServerParams>& serverList);
+    
+    /**
+     * This method Lists all the Server that are present for Positioning.
+     * @param [out] - aServerList. Contains the servers that are present.
+     * @returns - KErrNone if successful
+     *          - KErrNotfound is no servers are present
+     */
+
+    int deletableServerList(QList<PosServerParams>& serverList);
+    
+
+    /**
+     * This method enables/disables the server in use for postioning.
+     * If the server is disabled, it will not be used for positioning unless enabled.
+     * @param [in] - aServerIndex. The server index which has to be enabled/disabled.
+     * @param [in] - aValue. true/false.
+     * @returns - KErrNone if enabling/disabling is successful
+     *          - KErrArgument if the SLP ID passed is not valid/out of bounds
+     *          - KErrGeneral if changing SUPL settings has failed
+     */
+    int enableServer(int aServerIndex, bool aValue);
+
+    /**
+     * This method is used to delete the server.
+     * @param [in] - aServerIndex. The server index which has to be deleted.
+     * @returns - KErrNone if the deletion is successful
+     *          - KErrNotFound if the server at the index in missing/out of bounds.
+     *          - KErrPermissionDenied if the sever cannot be deleted
+     *          - KErrGeneral is other cases
+     */
+    int deleteServer(int aServerIndex);
+
+
+public:
+
+    /** 
+     * Inherited from PosSuplSettingsChangeObserver
+     */
+    void handleSuplSettingsChange( MSuplSettingsObserver::TSuplSettingsEventType event,int slpId);
+signals:
+    /**
+     * This signal is emitted when the server is deleted/added.
+     */
+    void serverListUpdated();
+
+private:
+    /**
+     * pointer to private implementation class
+     */
+     Q_DECLARE_PRIVATE_D(d_ptr, PosSuplSettingsEngine)
+    PosSuplSettingsEnginePrivate * d_ptr;
+    };
+#endif // POSSUPLSETTINGS_ENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/inc/possuplsettingsengineprivate.h	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 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"
+* 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:  Positioning settings engine private class header.
+*
+*/
+
+#ifndef POSSUPLSETTINGSENGINEPRIVATE_H
+#define POSSUPLSETTINGSENGINEPRIVATE_H
+
+#include "possuplsettingscommon.h"
+#include <QList>
+#include <epos_msuplsettingsobserver.h>
+
+class CServerParams;
+class CSuplSettings;
+
+//Constants
+const int KMaxHSLPAddrLen = 256;
+const int KMaxIAPLen = 256;
+/**
+ * The class defines the interface for receiving SUPL settings
+ *  change event.
+ */
+class PosSuplSettingsChangeObserver
+    {
+public:
+     virtual void handleSuplSettingsChange( MSuplSettingsObserver::TSuplSettingsEventType aEvent,int aSlpId) = 0;
+    };
+
+
+/**
+ * The class defines the interface for listing,enabling\disabling and deleting
+ * SLP servers.
+ */
+class PosSuplSettingsEnginePrivate : public MSuplSettingsObserver
+    {
+public:
+    /**
+     * Default constructor
+     */
+	PosSuplSettingsEnginePrivate();
+
+    /**
+     * Destructor
+     */
+    ~PosSuplSettingsEnginePrivate();
+
+    /**
+     * Returns properties of all servers from SUPL settings storage..
+     * @[OUT] paramValues Array of retrieved server entries
+     *         - KErrNone if SUPL settings are retrieved successfully.
+     *         - KErrNotFound if the settings does not have any server entry
+     */
+    int GetServerList( QList<PosServerParams>& aParamValues );
+
+     /**
+     * This method is used to change parameter which indicates whether server
+     * can be used for SUPL session or not.
+     *
+     * @param [IN] slpId SLP ID for which the parameter needs to be changed
+     * @param [IN] enableFlag Flag to indicate whether server can be enabled or not
+     * @return one of the following error codes:
+     *         - KErrNone if SUPL settings are changed successfully.
+     *         - KErrArgument if the SLP ID passed is not valid
+     *         - KErrGeneral if changing SUPL settings has failed
+     */
+    int  SetServerStatus( int aSlpId,
+                          bool aEnableFlg
+    					);
+
+
+    /**
+     * This method is deletes server entry from SUPL settings storage.
+     *
+     * @param [IN] slpId Server identity for which the entery needs to be deleted from the SUPL settings storage
+     *
+     * @return one of the following error codes:
+     *         - KErrNone if entry is deleted successfully
+     *         - KErrNotFound if the specified server identity does not exists in settings storage
+     *         - KErrGeneral if changing SUPL settings has failed
+     *
+     */
+    int RemoveServer( int aSlpId);
+
+    /**
+     * Returns list all servers from SUPL settings storage that can be deleted.Operator configured servers will be omitted from
+     * this list.
+     * @[OUT] paramValues Array of retrieved server entries
+     *         - KErrNone if SUPL settings are retrieved successfully.
+     *         - KErrNotFound if the list does not have any server entry
+     */
+    int GetRemovableServerList( QList<PosServerParams>& aParamValues );
+
+       /* @param [IN] observer The observing object.
+	    * @return one of the following values
+	    * 	- KErrNone if setting observer is successful
+	    * 	- KErrAlreadyExists if observer is already set
+	    *
+        */
+    int SetObserver( PosSuplSettingsChangeObserver* aObserver );
+
+
+public:
+    void HandleSuplSettingsChangeL( TSuplSettingsEventType aEvent,TInt aSlpId );
+    void HandleSuplTriggerStatusChangeL( CSuplSettings::TSuplTriggerStatus aSuplTriggerStatus );
+
+
+private: //Data members
+
+    /**
+     * Reference to position technology change observer.
+     * Does not own
+     */
+    PosSuplSettingsChangeObserver* mPosSuplSettingsObserver;
+
+    /**
+     * Pointer to Supl settings object
+     * Owns
+     */
+    CSuplSettings* mSuplSettings;
+
+    /**
+     * Pointer to Supl Server List
+     * Owns
+     */
+    RPointerArray<CServerParams> mServerList;
+    };
+
+
+
+#endif /* POSSUPLSETTINGSENGINEPRIVATE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/possuplsettings.pro	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,63 @@
+#
+# Copyright (c) 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"
+# 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:  Positioning Servers Plugin pro file
+#
+TEMPLATE = lib
+TARGET = possuplsettings
+DEPENDPATH += .
+INCLUDEPATH += ../inc
+INCLUDEPATH += ../possettingsengine/inc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+CONFIG += hb \
+    plugin
+MOC_DIR = moc
+OBJECTS_DIR = obj
+RCC_DIR = rcc
+
+# Platforms
+SYMBIAN_PLATFORMS = WINSCW \
+    ARMV5
+LIBS += -lcpframework \
+    -lpossettingsengine \
+    -lepos_suplsettings
+
+# Input
+SOURCES += src/possuplsettings.cpp
+SOURCES += src/possuplsettingsengine.cpp
+SOURCES += src/possuplsettingsengineprivate.cpp
+SOURCES += src/possettingssignalmapper.cpp
+
+HEADERS += inc/possuplsettingscommon.h \
+    inc/possuplsettings.h
+HEADERS += inc/possuplsettingsengine.h
+HEADERS += inc/possuplsettingsengineprivate.h
+HEADERS += inc/possettingssignalmapper.h
+symbian: { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    DEFINES += PLUGINUID3=0x2002C31B
+    TARGET.UID3 = 0x2002C31B
+}
+symbian { 
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/positioningsettings
+    qtplugins.sources += qmakepluginstubs/possuplsettings.qtplugin
+    
+    # This is for new exporting system coming in garden
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+}
+TARGET.CAPABILITY = All \
+    -TCB
+plugin.sources = possuplsettings.dll
+plugin.path = \resource\qt\plugins\positioningsettings
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possettingssignalmapper.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of positioning settings signal mapper class
+ *
+ */
+
+
+#include "possettingssignalmapper.h"
+
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// Constructor
+//---------------------------------------------------------------------
+PosSettingsSignalMapper::PosSettingsSignalMapper()
+    {
+    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// destructor
+//---------------------------------------------------------------------
+PosSettingsSignalMapper::~PosSettingsSignalMapper()
+    {
+    
+    }
+
+//---------------------------------------------------------------------
+// PosSettingsSignalMapper::PosSettingsSignalMapper()
+// 
+//---------------------------------------------------------------------
+void PosSettingsSignalMapper::signalmap()
+    {
+    emit signalmapped();
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possuplsettings.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,516 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is for Positioning Supl Settings plugin 
+ *							for Positioning Settings's Advanced view
+ *
+ */
+#include "possuplsettings.h"
+#include "possuplsettingsengine.h"
+#include "possettingsadvop.h"
+
+#include <QtCore>
+#include <QDebug>
+#include <hbcheckbox.h>
+#include <hbmenu.h>
+#include <hbaction.h>
+#include <hbradiobuttonlist.h>
+#include <hblabel.h>
+#include <hbdialog.h>
+
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::PosSuplSettingsPlugin
+// ---------------------------------------------------------------------------
+//
+PosSuplSettingsPlugin::PosSuplSettingsPlugin() :
+    mSuplSettingsEngine(0), mGroup(0), mOperation(0), mSignalMapper(0),
+            mMainMenu(0), mPrimaryAction(0), mRadioButtonList(0),
+            mDeleteQuery(0)
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::PosSuplSettingsPlugin()";
+    mSuplSettingsEngine = new PosSuplSettingsEngine();
+    qDebug() << "- PosSuplSettingsPlugin::PosSuplSettingsPlugin()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::~PosSuplSettingsPlugin
+// ---------------------------------------------------------------------------
+//
+PosSuplSettingsPlugin::~PosSuplSettingsPlugin()
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::~PosSuplSettingsPlugin()";
+
+    if (mSuplSettingsEngine)
+        {
+        delete mSuplSettingsEngine;
+        mSuplSettingsEngine = 0;
+        }
+
+    if (mGroup && mOperation)
+        {
+        mOperation->removeItem(mGroup);
+        mGroup = 0;
+        }
+
+    if (mMainMenu)
+        {
+        delete mMainMenu;
+        mMainMenu = 0;
+        }
+  ///// 
+        QObject::disconnect(mSignalMapper, SIGNAL(mapped(int)), this,
+                SLOT(changeServerUsage(int))); 
+
+    if (mSignalMapper)
+        {
+        delete mSignalMapper;
+        mSignalMapper = NULL;
+        }
+
+    if (mPrimaryAction)
+        {
+        delete mPrimaryAction;
+        mPrimaryAction = 0;
+        }
+
+    if (mRadioButtonList)
+        {
+        mRadioButtonList->reset();
+        delete mRadioButtonList;
+        }
+
+    if (mDeleteQuery)
+        {
+        delete mDeleteQuery;
+        }
+        ///
+
+    // delete the signal mapper instances 
+    int cnt = mSignalMapperList.count();
+    for (int i = 0; i < cnt ; ++i)
+        {
+        QObject::disconnect(mSignalMapperList[i], SIGNAL(signalmapped()),
+                mSignalMapper, SLOT(map()));
+        delete mSignalMapperList[i];
+        mSignalMapperList[i] = NULL;
+        }
+        
+        ///
+
+    mServerList.clear();
+    mSignalMapperList.clear();
+    mDeleteableServerList.clear();
+    qDebug() << "- PosSuplSettingsPlugin::~PosSuplSettingsPlugin()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::initialise
+// ---------------------------------------------------------------------------
+//
+int PosSuplSettingsPlugin::initialise(PosSettingsAdvOp* operation)
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::initialise()";
+
+    int result = 0;
+    // Assign to the member variable
+    mOperation = operation;
+
+    // create the signal mapper
+    mSignalMapper = new QSignalMapper();
+
+    //get the list of server present for positioning
+    if (mSuplSettingsEngine)
+        {
+        result = mSuplSettingsEngine->suplServerList(mServerList);
+        }
+
+    // if no error while getting the server list then add the group
+    // for Positioning servers
+    if (result == 0)
+        {
+        mGroup = new HbDataFormModelItem(HbDataFormModelItem::GroupItem,
+                hbTrId("txt_loe_subtitle_positioning_servers"), 0);
+        //Add the group to the data form
+        operation->appendDataFormItem(mGroup);
+        //list all the server inside the group
+        listServers();
+        }
+    QObject::connect(mSuplSettingsEngine, SIGNAL(serverListUpdated()), this,
+            SLOT(updateList()));
+
+    qDebug() << "- PosSuplSettingsPlugin::initialise()" << "result = "
+            << result;
+
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::ChangeServerUsage
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::changeServerUsage(int value)
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::changeServerUsage()";
+    //toggle the value based on the slpid
+    if (!mServerList[value].serverEnabled)
+        {
+        mSuplSettingsEngine->enableServer(mServerList[value].slpId, true);
+        }
+    else
+        {
+        mSuplSettingsEngine->enableServer(mServerList[value].slpId, false);
+        }
+    qDebug() << "- PosSuplSettingsPlugin::changeServerUsage()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::listServers
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::listServers()
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::listServers()";
+
+    qDebug() << "mServerList.count = " << mServerList.count();
+
+    //create a serverlist iterator
+    QList<PosServerParams>::const_iterator serveriterator;
+
+    // Get the server names and display
+    for (serveriterator = mServerList.begin(); serveriterator
+            != mServerList.end(); ++serveriterator)
+        {
+        qDebug() << "server name = " << serveriterator->serverAdd;
+        if (serveriterator->serverAdd.length() > 0)
+            {
+            //for each server create new checkbox item 
+            HbDataFormModelItem* checkBox = new HbDataFormModelItem(
+                    HbDataFormModelItem::CheckBoxItem, QString(), 0);
+
+            //set the widget data to the server name
+            checkBox->setContentWidgetData("text", QString(hbTrId(
+                    "txt_loe_list_use_1")).arg(serveriterator->serverAdd));
+
+            //if the server is enabled set the initial state of the checkbox
+            if (serveriterator->serverEnabled)
+                {
+                checkBox->setContentWidgetData("checkState", Qt::Checked);
+                }
+            else
+                {
+                checkBox->setContentWidgetData("checkState", Qt::Unchecked);
+                }
+
+            qDebug() << "Adding checkbox in the group";
+            
+            //this part of code is called when the servers are added and 
+            //Advanced view is in the background. Since there is no group
+            // a new group has to be created to add the servers
+            mOperation->appendDataFormItem(checkBox, mGroup);
+
+            //create an object of dummy signal mapper class
+            //this is done to send the index info to the slots
+            //since checkbox is not of QObject type and dummy class is 
+            // created.
+            PosSettingsSignalMapper* signalMapper =
+                    new PosSettingsSignalMapper();
+            mSignalMapperList.append(signalMapper);
+
+            //add connection for statechanged of the checkbox, depending on which the
+            // add connections on change of check box state
+            mOperation->addConnection(checkBox, SIGNAL(stateChanged(int)),
+                    mSignalMapperList[serveriterator - mServerList.begin()],
+                    SLOT(signalmap()));
+
+            QObject::connect(mSignalMapperList[serveriterator
+                    - mServerList.begin()], SIGNAL(signalmapped()),
+                    mSignalMapper, SLOT(map()));
+
+            // set mapping of each check box item to its index
+            if (mSignalMapper)
+                {
+                mSignalMapper->setMapping(mSignalMapperList[serveriterator
+                        - mServerList.begin()], (serveriterator
+                        - mServerList.begin()));
+                }
+            }
+        }
+
+    //use signal mapper to connect
+    QObject::connect(mSignalMapper, SIGNAL(mapped(int)), this,
+            SLOT(changeServerUsage(int)));
+
+    qDebug() << "mDeleteableServerList.count before reset = "
+            << mDeleteableServerList.count();
+
+    //refresh the list of deleteable servers in case any deleteable server is added
+    mDeleteableServerList.clear();
+
+    if (mSuplSettingsEngine)
+        {
+        mSuplSettingsEngine->deletableServerList(mDeleteableServerList);
+        }
+
+    qDebug() << "mDeleteableServerList.count after fetch = "
+            << mDeleteableServerList.count();
+
+    //if the server list is <=1 while updating the list the menu is destroyed
+    if (mDeleteableServerList.count() == 0)
+        {
+        if (mMainMenu)
+            {
+            delete mMainMenu;
+            mMainMenu = 0;
+            }
+        }
+    else 
+        {
+        delete mMainMenu;
+        mMainMenu = 0;
+        createMenu();
+        }
+    qDebug() << "-  PosSuplSettingsPlugin::listServers()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::updateList
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::updateList()
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::updateList()";
+    int result = 0;
+    int oldChildCount = 0;
+
+    if (mGroup)
+        {
+        qDebug() << "Store the group info";
+
+        oldChildCount = mGroup->childCount();
+
+        // remove all connections
+        int count = mSignalMapperList.count();
+        qDebug() << "mSignalMapperList.count() = " << count;
+
+        for (int i = 0; i < count; ++i)
+            {
+            QObject::disconnect(mSignalMapperList[i], SIGNAL(signalmapped()),
+                    mSignalMapper, SLOT(map()));
+            }
+        QObject::disconnect(mSignalMapper, SIGNAL(mapped(int)), this,
+                SLOT(changeServerUsage(int)));
+        
+        qDebug() << "oldChildCount = " << oldChildCount;
+
+        //remove the children in the group
+        if (oldChildCount > 0)
+            {
+            qDebug() << "removing the children";
+            //mGroup->removeChildren(0, oldChildCount);
+            //ToDo: Hack from HbDataForm team        
+            for (int i = 0; i < oldChildCount; ++i)
+                {
+                mGroup->removeChild(0);
+                }
+            }        
+        }
+    else
+        {
+        qDebug() << "Creating new group ";
+
+        mGroup = new HbDataFormModelItem(HbDataFormModelItem::GroupItem,
+                hbTrId("txt_loe_subtitle_positioning_servers"), 0);
+        mOperation->appendDataFormItem(mGroup);
+        }
+
+    qDebug() << "mServerList.count() before clean = " << mServerList.count();
+
+    //clear the list and get the list of server present for positioning
+    mServerList.clear();
+    if (mSuplSettingsEngine)
+        {
+        result = mSuplSettingsEngine->suplServerList(mServerList);
+        }
+    qDebug() << "result = " << result;
+
+    //update the new list to the group
+    if (result == 0)
+        {
+        listServers();
+        }
+    if (result == -1)
+        {
+        qDebug() << "Removing the group from form";
+        //remove the group
+        mOperation->removeItem(mGroup);
+        mGroup = 0;
+        // delete the menu
+        if (mMainMenu)
+            {
+            delete mMainMenu;
+            mMainMenu = 0;
+            }
+        }
+    qDebug() << "- PosSuplSettingsPlugin::updateList()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::onDeleteServer
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::onDeleteServer()
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::onDeleteServer()";
+    //list that will contain the deleteable servers names
+    QStringList contentList;
+
+    //get the deleteable server list from the engine
+    QList<PosServerParams>::const_iterator iterator;
+
+    qDebug() << "mDeleteableServerList.count = "
+            << mDeleteableServerList.count();
+
+    //add the server names to the string list
+    for (iterator = mDeleteableServerList.constBegin(); iterator
+            != mDeleteableServerList.constEnd(); ++iterator)
+        {
+        //Copy the address to Qstring object
+        qDebug() << "deletable server = " << iterator->serverAdd;
+        contentList << iterator->serverAdd;
+        }
+
+    // delete the mRadioButtonList before creating it,each time the delete
+    // query needs to be popped up
+    if (mRadioButtonList != 0)
+        {
+        delete mRadioButtonList;
+        mRadioButtonList = 0;
+        }
+    //create a radion button list of the deletable servers
+    mRadioButtonList = new HbRadioButtonList();
+    mRadioButtonList->setItems(contentList);
+    QObject::connect(mRadioButtonList, SIGNAL(itemSelected(int)), this,
+            SLOT(setPrimaryAction(int)));
+
+    // delete the mDeleteQuery before creating it,each time the delete
+    // query needs to be popped up
+    
+    if (mDeleteQuery != 0)
+        {
+        delete mDeleteQuery;
+        mDeleteQuery = 0;
+        }
+    //create the query dialog and attach the radio button to the dialog
+    mDeleteQuery = new HbDialog();
+
+    mDeleteQuery->setTimeout(HbDialog::NoTimeout);
+
+        //set the proper layout for the mDeleteQuery dialog
+        qreal lMargin = 0;
+        qreal rMargin = 0;
+        qreal tMargin = 0;
+        
+        if (mDeleteQuery->style()->parameter("hb-param-margin-gene-left",
+                lMargin) && mDeleteQuery->style()->parameter(
+                "hb-param-margin-gene-right", rMargin)
+                && mDeleteQuery->style()->parameter(
+                        "hb-param-margin-gene-top", tMargin))
+            {
+            HbLabel * heading = new HbLabel(QString(hbTrId(
+                    "txt_loe_info_select_server_to_delete")));
+            heading->setContentsMargins(lMargin, tMargin, rMargin, 0);
+            mDeleteQuery->setHeadingWidget(heading);
+            }
+
+    // delete the mPrimaryAction before creating it,each time the delete
+    // query needs to be popped up
+    if (mPrimaryAction != 0)
+        {
+        delete mPrimaryAction;
+        mPrimaryAction = 0;
+        }
+    //the primary action that will come in the SK1 of the Dialog box
+    mPrimaryAction
+            = new HbAction(QString(hbTrId("txt_common_button_delete")));
+
+    mDeleteQuery->addAction(mPrimaryAction);
+    mDeleteQuery->addAction(new HbAction(QString(hbTrId(
+            "txt_common_button_cancel"))));
+    QObject::connect(mPrimaryAction, SIGNAL(triggered()), this,
+            SLOT(deleteServer()));
+
+    //set the content Widget
+    mDeleteQuery->setContentWidget(mRadioButtonList);
+
+    //the Primary action is disabled since no server from the list is selected
+    mPrimaryAction->setDisabled(true);
+    
+    mDeleteQuery->show();
+
+    qDebug() << "- PosSuplSettingsPlugin::onDeleteServer()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::createMenu
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::createMenu()
+    {
+    qDebug() << "+ PosSuplSettingsPlugin::createMenu()";
+    mMainMenu = new HbMenu();
+    HbAction* action = mMainMenu->addAction(hbTrId(
+            "txt_loe_opt_delete_server"));
+
+    QObject::connect(action, SIGNAL(triggered()), this,
+            SLOT(onDeleteServer()));
+
+    mOperation->addAction(action, HbView::OptionsMenu);
+    qDebug() << "- PosSuplSettingsPlugin::createMenu()";
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::setPrimaryAction
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::setPrimaryAction(int /*itemSelected*/)
+    {
+    //enable the primary Action
+    if (mPrimaryAction)
+        {
+        mPrimaryAction->setEnabled(true);
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// PosSuplSettingsPlugin::deleteServer
+// ---------------------------------------------------------------------------
+//
+void PosSuplSettingsPlugin::deleteServer()
+    {
+    //get the index of the selected servers
+    int serverIndex = mRadioButtonList->selected();
+
+    if( serverIndex != -1 )
+    	{
+    		if (mSuplSettingsEngine)
+        {
+        //delete the server
+        mSuplSettingsEngine->deleteServer(
+                mDeleteableServerList[serverIndex].slpId);
+        }
+    	}
+    }
+Q_EXPORT_PLUGIN2(possuplsettings, PosSuplSettingsPlugin)
+;
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possuplsettingsengine.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 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"
+ * 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: This is the engine for Positioning Supl Settings plugin 
+ *							for Positioning Settings's Advanced view
+ *
+ */
+#include "possuplsettingsengine.h"
+#include "possuplsettingsengineprivate.h"
+
+#include <QDebug>
+
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::PosSuplSettingsEngine()
+//-----------------------------------------------------------------
+PosSuplSettingsEngine::PosSuplSettingsEngine() :
+    d_ptr(0)
+    {
+    qDebug() << "+ PosSuplSettingsEngine::PosSuplSettingsEngine()";
+    d_ptr = new PosSuplSettingsEnginePrivate();
+    //Set the PosSuplSettingsChangeObserver
+    if (d_ptr)
+        {
+        d_ptr->SetObserver(this);
+        }
+    qDebug() << "- PosSuplSettingsEngine::PosSuplSettingsEngine()";    
+    }
+
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::~PosSuplSettingsEngine()
+//-----------------------------------------------------------------
+PosSuplSettingsEngine::~PosSuplSettingsEngine()
+    {
+    qDebug() << "+ PosSuplSettingsEngine::~PosSuplSettingsEngine()";    	
+    if (d_ptr)
+        {
+        delete d_ptr;
+        d_ptr = 0;
+        }
+    qDebug() << "- PosSuplSettingsEngine::~PosSuplSettingsEngine()";            
+    }
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::suplServerList
+//-----------------------------------------------------------------
+int PosSuplSettingsEngine::suplServerList(QList<PosServerParams>& serverList)
+    {
+    qDebug() << "+ PosSuplSettingsEngine::suplServerList()";    	
+    int result = 0;
+    //Clear the server list to remove any junk
+    //serverList.clear();
+    if (d_ptr)
+        {
+        result = d_ptr->GetServerList(serverList);
+        }
+    qDebug() << "- PosSuplSettingsEngine::suplServerList() result = %d" << result;        
+    return result;
+    }
+
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::deletableServerList
+//-----------------------------------------------------------------
+int PosSuplSettingsEngine::deletableServerList(
+        QList<PosServerParams>& serverList)
+    {
+    qDebug() << "+ PosSuplSettingsEngine::deletableServerList()";    	
+    int result = 0;
+    //Clear the server list to remove any junk
+    serverList.clear();
+    if (d_ptr)
+        {
+        result = d_ptr->GetRemovableServerList(serverList);
+        }
+    qDebug() << "- PosSuplSettingsEngine::deletableServerList() result =%d" << result;        
+    return result;
+    }
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::enableServer
+//-----------------------------------------------------------------
+int PosSuplSettingsEngine::enableServer(int serverIndex, bool value)
+    {
+    qDebug() << "+ PosSuplSettingsEngine::enableServer()";    	
+    int result = 0;
+    if (d_ptr)
+        {
+        result = d_ptr->SetServerStatus(serverIndex, value);
+        }
+    qDebug() << "- PosSuplSettingsEngine::enableServer() result =%d" << result;      
+    return result;
+    }
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::deleteServer
+//-----------------------------------------------------------------
+int PosSuplSettingsEngine::deleteServer(int serverIndex)
+    {
+    qDebug() << "+ PosSuplSettingsEngine::deleteServer()"; 	
+    int result = 0;
+    if (d_ptr)
+        {
+        result = d_ptr->RemoveServer(serverIndex);
+        }
+    qDebug() << "- PosSuplSettingsEngine::deleteServer() result =%d" << result;           
+    //Check where to return KErrPermissionDenied
+    return result;
+    }
+//-----------------------------------------------------------------
+//PosSuplSettingsEngine::handleSuplSettingsChange
+//-----------------------------------------------------------------
+void PosSuplSettingsEngine::handleSuplSettingsChange(
+        MSuplSettingsObserver::TSuplSettingsEventType /*event*/, int /**slpId*/)
+    {
+    qDebug() << "+ PosSuplSettingsEngine::handleSuplSettingsChange()"; 		
+    emit serverListUpdated();
+    qDebug() << "- PosSuplSettingsEngine::handleSuplSettingsChange()"; 	
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/possuplsettingsplugin/src/possuplsettingsengineprivate.cpp	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 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"
+ * 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:  Implementation of positioning settings engine private class.
+ *
+ */
+#include "possuplsettingsengineprivate.h"
+
+#include <epos_csuplsettings.h>
+#include <epos_csuplsettingparams.h>
+#include <QDebug>
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::PosSuplSettingsEnginePrivate()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+PosSuplSettingsEnginePrivate::PosSuplSettingsEnginePrivate() :
+    mPosSuplSettingsObserver(NULL), mSuplSettings(NULL)
+    {
+    QT_TRAP_THROWING( mSuplSettings = CSuplSettings::NewL();
+            mSuplSettings->SetObserverL(*this);
+    );
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::~PosSuplSettingsEnginePrivate()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+PosSuplSettingsEnginePrivate::~PosSuplSettingsEnginePrivate()
+    {
+    
+    
+    mServerList.ResetAndDestroy();    
+    
+    if (mSuplSettings)
+        {
+        mSuplSettings->RemoveObserver();
+        delete mSuplSettings;
+        mSuplSettings = NULL;
+        }
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::GetServerList()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSuplSettingsEnginePrivate::GetServerList(
+        QList<PosServerParams> & aParamValues)
+    {
+    TInt64 slpId;
+    HBufC* serverAddress = HBufC::New(KMaxHSLPAddrLen);
+    HBufC* iapName = HBufC::New(KMaxIAPLen);
+    TBool serverEnabled;
+    TBool simChangeRemove;
+    TBool usageInHomeNw;
+    TBool editable;
+
+    if (!serverAddress || !iapName)
+        {
+        delete serverAddress;
+        delete iapName;
+        return KErrNoMemory;
+        }
+    
+    mServerList.ResetAndDestroy();
+
+    TInt error = mSuplSettings->GetAllSlp(mServerList); //handle return value...
+    if (error!=KErrNone)
+        {
+        delete serverAddress;
+        delete iapName;
+        mServerList.Close();
+        mServerList.ResetAndDestroy();
+        return error;
+        }
+    
+    TInt count = mServerList.Count();
+    for(TInt i = 0; i < count; ++i )
+        {        
+        PosServerParams params;
+        error = mServerList[i]->Get(
+                            slpId,
+                            serverAddress->Des(),
+                            iapName->Des(),
+                            serverEnabled,
+                            simChangeRemove,
+                            usageInHomeNw,
+                            editable);
+                            
+        if (error == 0)
+            {
+//            QString sName((QChar*) (serverAddress->Ptr()),
+//                    serverAddress->Length());            
+            
+            QString sName = QString::fromUtf16(serverAddress->Ptr(), serverAddress->Length()); 
+            
+            params.slpId = slpId;
+            params.serverAdd = sName;
+            params.serverEnabled =  serverEnabled;
+            
+            aParamValues.append(params);
+            }
+        }
+    
+    delete serverAddress;
+    delete iapName; 
+
+    return KErrNone;
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::SetServerStatus()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSuplSettingsEnginePrivate::SetServerStatus(int aSlpId, bool aEnableFlg)
+    {
+    return (mSuplSettings->SetServerEnabledFlag(aSlpId, aEnableFlg));
+    }
+
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::RemoveServer()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSuplSettingsEnginePrivate::RemoveServer(int aSlpId)
+    {
+    return (mSuplSettings->RemoveServer(aSlpId));
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::GetRemovableServerList()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSuplSettingsEnginePrivate::GetRemovableServerList(QList<
+        PosServerParams>& aParamValues)
+    {
+    qDebug() << "+  PosSuplSettingsEnginePrivate::getRemovableServerList()";
+    TInt64 slpId;
+    HBufC* serverAddress = HBufC::New(KMaxHSLPAddrLen);
+    HBufC* iapName = HBufC::New(KMaxIAPLen);
+    TBool serverEnabled;
+    TBool simChangeRemove;
+    TBool usageInHomeNw;
+    TBool editable;
+    TBool productConfigured;
+
+    if (!serverAddress || !iapName)
+        {
+        delete serverAddress;
+        delete iapName;
+        return KErrNoMemory;
+        }
+    
+    mServerList.ResetAndDestroy();
+
+    TInt error = mSuplSettings->GetAllSlp(mServerList); //handle return value...
+    if (error!=KErrNone)
+        {
+        delete serverAddress;
+        delete iapName;
+        mServerList.Close();
+        mServerList.ResetAndDestroy();
+        return error;
+        }
+    
+    TInt count = mServerList.Count();
+    qDebug() << "Deleteable server list count = " << count;
+    for(TInt i = 0; i < count; ++i )
+        {        
+
+        PosServerParams params;
+        error = mServerList[i]->Get(slpId,
+                                    serverAddress->Des(),
+                                    iapName->Des(),
+                                    serverEnabled,
+                                    simChangeRemove,
+                                    usageInHomeNw,
+                                    editable);
+         TInt err = mServerList[i]->GetServerConfigurationType(productConfigured);
+         qDebug()<< "GetServerConfigurationType returns error = "<< err;                   
+        if (error == 0)
+            {
+           QString sName = QString::fromUtf16(serverAddress->Ptr(), serverAddress->Length()); 
+            
+            params.slpId = slpId;
+            params.serverAdd = sName;
+            params.serverEnabled =  serverEnabled;
+            
+            if (!productConfigured)
+                {
+                aParamValues.append(params);
+                }            
+            }
+        }
+    
+    delete serverAddress;
+    delete iapName; 
+    qDebug() << "-  PosSuplSettingsEnginePrivate::getRemovableServerList()";
+    return KErrNone;
+
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::SetObserver()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+int PosSuplSettingsEnginePrivate::SetObserver(
+        PosSuplSettingsChangeObserver* aObserver)
+    {
+    TInt ret;
+    if (!mPosSuplSettingsObserver)
+        {
+        mPosSuplSettingsObserver = aObserver;
+        ret = KErrNone;
+        }
+    else
+        {
+        ret = KErrAlreadyExists;
+        }
+    return ret;
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::HandleSuplSettingsChangeL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSuplSettingsEnginePrivate::HandleSuplSettingsChangeL(
+        MSuplSettingsObserver::TSuplSettingsEventType aEvent, TInt aSlpId)
+    {
+    if (aEvent == MSuplSettingsObserver::ESuplSettingsDBAddEvent || aEvent
+            == MSuplSettingsObserver::ESuplSettingsDBDeleteEvent)
+        {
+        if (mPosSuplSettingsObserver)
+            {
+            mPosSuplSettingsObserver->handleSuplSettingsChange(aEvent, aSlpId);
+            }
+        }
+    }
+
+//---------------------------------------------------------------------
+// PosSuplSettingsEnginePrivate::HandleSuplTriggerStatusChangeL()
+// (other items were commented in a header).
+//---------------------------------------------------------------------
+void PosSuplSettingsEnginePrivate::HandleSuplTriggerStatusChangeL(
+        CSuplSettings::TSuplTriggerStatus /*aSuplTriggerStatus*/)
+    {
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/rom/possettings.iby	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 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"
+* 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: 
+*
+*/
+
+#ifndef __POSSETTINGS_IBY__
+#define __POSSETTINGS_IBY__
+
+#ifdef __LOCATIONSYSUI
+
+#include <bldvariant.hrh>
+file=ABI_DIR\BUILD_DIR\possettingsengine.dll                   SHARED_LIB_DIR\possettingsengine.dll
+file=ABI_DIR\BUILD_DIR\possettingsplugin.dll                   SHARED_LIB_DIR\possettingsplugin.dll
+file=ABI_DIR\BUILD_DIR\pospsysettings.dll											SHARED_LIB_DIR\pospsysettings.dll	
+file=ABI_DIR\BUILD_DIR\possuplsettings.dll											SHARED_LIB_DIR\possuplsettings.dll
+file=ABI_DIR\BUILD_DIR\poslocationservices.dll											SHARED_LIB_DIR\poslocationservices.dll
+data=DATAZ_\system\install\possettings_stub.sis					       system\install\possettings_stub.sis
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\possettingsplugin.qtplugin                  resource\qt\plugins\controlpanel\possettingsplugin.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\positioningsettings\pospsysettings.qtplugin              resource\qt\plugins\positioningsettings\pospsysettings.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\positioningsettings\possuplsettings.qtplugin              resource\qt\plugins\positioningsettings\possuplsettings.qtplugin
+data=\epoc32\data\c\resource\qt\plugins\positioningsettings\poslocationservices.qtplugin              resource\qt\plugins\positioningsettings\poslocationservices.qtplugin
+
+#endif // (__LOCATIONSYSUI)
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locationsystemui/locationsysui/possettings/rom/possettings_resources.iby	Thu May 27 13:18:17 2010 +0300
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 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"
+* 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:  Positioning Settings Resources iby file
+*
+*/
+
+
+#ifndef __POSSETTINGSPLUGIN_RESOURCES_IBY__
+#define __POSSETTINGSPLUGIN_RESOURCES_IBY__
+
+#ifdef __LOCATIONSYSUI
+
+#include <data_caging_paths_for_iby.hrh>
+
+// <-- QT POSSETTINGS START -->
+data=DATAZ_\QT_TRANSLATIONS_DIR\lilocationmw.qm QT_TRANSLATIONS_DIR\lilocationmw.qm
+// <-- QT POSSETTINGS END -->
+
+#endif // (__LOCATIONSYSUI)
+
+#endif
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplconnrequestor.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplconnrequestor.cpp	Thu May 27 13:18:17 2010 +0300
@@ -115,7 +115,14 @@
 //    
 void COMASuplConnRequestor::CreateConnectionL()
     {
-    TBuf<100> iapName;
+	if(!iIsSettingInitilized)
+        {
+		iState = EInitialState;
+        InitilizeSetting();
+        }
+    else
+        {
+		TBuf<100> iapName;
 		TBuf<128> buffer;
     iState = EConnecting;  
 		TBool isIapDialogShown = EFalse;
@@ -150,6 +157,7 @@
         iObserver.OperationCompleteL(errorCode);
         }
     }
+    }
 
 // -----------------------------------------------------------------------------
 // COMASuplConnRequestor::OpenConnection
@@ -206,6 +214,7 @@
         }
     else
         {
+		iState = EInitilizeSetting;
         InitilizeSetting();
         }
     }
@@ -253,6 +262,15 @@
 
     switch(iState)
         {
+		
+		case EInitialState:
+            {
+            iIsSettingInitilized = ETrue;
+            iTrace->Trace(_L("Setting API Initilizing Completed..."), KTraceFileName, __LINE__);
+            CreateConnectionL();
+            
+            break;
+            }
 
         case  EConnecting:
             {
@@ -355,7 +373,7 @@
 void COMASuplConnRequestor::InitilizeSetting()
     {
     iTrace->Trace(_L("Intilizing Setting API..."), KTraceFileName, __LINE__); 				
-    iState = EInitilizeSetting;
+    
     iSuplSettings->Initialize(iStatus);
     SetActive();
     }
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplfallbackhandler.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplfallbackhandler.cpp	Thu May 27 13:18:17 2010 +0300
@@ -136,6 +136,47 @@
             		aTls = ETrue;
             		aPskTls = EFalse;
             		aIsIapDialogShown = ETrue;
+					
+					CServerParams* param = CServerParams::NewL();
+					CleanupStack::PushL(param);
+					
+					//Find out if this alternative generated SUPL server is in the SUPL Settings list
+					TInt err = iSuplSettings.GetSlpInfoAddress(iGenratedHslpAddress, param);
+					if(err == KErrNotFound)
+						{
+						//Server does not exist
+						iTrace->Trace(_L("Server does not exist in list so adding it in."),KTraceFileName, __LINE__);
+						CServerParams* newParam=CServerParams::NewL();
+						CleanupStack::PushL(newParam);
+						User::LeaveIfError(newParam->Set( iGenratedHslpAddress,iDefaultIAPName,ETrue,ETrue,ETrue,EFalse ));
+
+						err = iSuplSettings.AddNewServer( newParam, aSLPId ); //Ignore error
+						LogBuffer.Copy(_L("AddNewServer() completed with err: "));
+						LogBuffer.AppendNum(err);
+						iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 		
+						
+						CleanupStack::PopAndDestroy(&newParam);
+						}
+					else
+						{
+						//Server exists, get the SLP ID and the IAP Access point for this server
+						HBufC* hslpAddress =  HBufC::NewL(KHSLPAddressLength);       
+						HBufC* iapName =  HBufC::NewL(KMaxIapNameLength);
+						TBool serverEnabled;
+						TBool simChangeRemove;
+						TBool usageInHomeNw;
+						TBool editable;
+						
+						iTrace->Trace(_L("Server already exists, getting the SLP ID and Access Point."),KTraceFileName, __LINE__);
+						
+						param->Get(aSLPId,hslpAddress->Des(),iapName->Des(),serverEnabled,simChangeRemove,usageInHomeNw,editable);
+						aIAPName.Copy(iapName->Des());
+						
+						delete hslpAddress;
+						delete iapName;
+						}
+					
+					CleanupStack::PopAndDestroy(&param);
                                 
             		iTrace->Trace(_L("Fallback allowed & TLSAuth failed"),KTraceFileName, __LINE__);
             		iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
@@ -163,8 +204,8 @@
 	     	{
 	     	return KErrNotFound;
 	     	}  
-	 	} 
-    
+	 	}
+
 	//Check to see if the server list is empty.  If it is create the HSLP Address from the IMSI and use that
 	// as the server address.  This does not add the server to the list and this functionality should only
 	// be tried once
@@ -192,10 +233,22 @@
 		iTrace->Trace(_L("iap being used:"),KTraceFileName, __LINE__);
 		LogBuffer.Copy(aIAPName);
 		iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
+		
+		//Add the server to the list for future connections
+		CServerParams* param=CServerParams::NewL();
+		CleanupStack::PushL(param);
+		User::LeaveIfError(param->Set( iGenratedHslpAddress,iDefaultIAPName,ETrue,ETrue,ETrue,EFalse ));
+
+		TInt err = iSuplSettings.AddNewServer( param, aSLPId ); //Ignore error
+		LogBuffer.Copy(_L("AddNewServer() completed with err: "));
+		LogBuffer.AppendNum(err);
+		iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 		
+		
+		CleanupStack::PopAndDestroy(&param);
 
 		return KErrNone;
 		}
-	
+    
     if( iSLPList->Count() <= 0 || iCurrentServerCounter >= iSLPList->Count() ) 
         {
         LogBuffer.Copy(_L("No more servers available..."));
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp	Thu May 27 13:18:17 2010 +0300
@@ -106,13 +106,21 @@
 		{
 			iSettingsLauncher->CancelLaunch();
 		}*/
-	iSuplSettings->SetUIActive( EFalse );
+		
+	if(iSuplSettings)
+		{
+		iSuplSettings->SetUIActive( EFalse );
+		}
 
 	DeleteAllSessions();
 	iSuplSessions.Reset();
 	iSuplSessions.Close();
 
-    iTelServer.UnloadPhoneModule(iTsyName);
+	//Only attempt to unload the phone if the TSY has actually been initialised
+	if(iTsyName.Length() > 0)
+		{
+		iTelServer.UnloadPhoneModule(iTsyName);
+		}
 
 	
 	iQueuedPacket.Close();
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp	Thu May 27 13:18:17 2010 +0300
@@ -4170,7 +4170,16 @@
                 HandleSuplInitErrorL(iNwInitCompletionCode);                             
                 }                
             else
-	            InitializeL(iRequestID); 
+            	{
+            		if (iRoaming)                
+                    HandleRoamingCheckCompleteL(KErrNone, EFalse);                    
+                else
+                    {                        
+                    iEtelRoamingCheck = ETrue;
+                    iProtocolManager.CheckForRoaming();
+                    }
+	            //InitializeL(iRequestID); 
+	          	}
             /*}
 
             else if (usage == CSuplSettings::ESuplUsageHomeAutomatic || usage == CSuplSettings::ESuplUsageAlwaysAsk)
@@ -4268,85 +4277,10 @@
         {            
             iUsageHomeNW = aHomeNw;   
             iConnRequestor->UpdateSLPListForHomeUsage(iUsageHomeNW);             
-            //CSuplSettings::TSuplSettingsUsage usage = iSuplSettings->SUPLUsage();
-            
-            /*if (usage == CSuplSettings::ESuplUsageAlwaysAsk)
-                {
-                TInt err = KErrNone;                
-                    if (!aHomeNw)
-                        {                            
-                        //iTrace->Trace(_L("Invoking LaunchSuplUsageSettingsUI, user is roaming"), KTraceFileName, __LINE__);
-                        //err = iProtocolManager.LaunchSuplUsageSettingsUI(this, ETrue);        
-                        }
-                    else
-                        {                            
-                        //iTrace->Trace(_L("Invoking LaunchSuplUsageSettingsUI, user is not roaming"), KTraceFileName, __LINE__);
-                        //err = iProtocolManager.LaunchSuplUsageSettingsUI(this, EFalse);        
-                        }
-
-                if(KErrNone != err && KErrInUse == err)
-                    {
-                        iTrace->Trace(_L("Dialog in use, setting flag"), KTraceFileName, __LINE__);
-                        SetSuplUsageFlag();                            
-                    }
-                if( KErrNone == err  && iRequestType == ESUPL_NETWORK )
-                    {
-                    iTrace->Trace(_L("Network Session , starting timer"), KTraceFileName, __LINE__);
-                    COMASuplInit* suplInit = static_cast <COMASuplInit*> (iDecodedAsnMessage);
-                    TOMASuplQop qop;
-                    TInt retVal = suplInit->Qop(qop);
-                    TInt delay;
-                    qop.Delay(delay);
-                    //if delay is > 7, it is not valid
-                    if (delay > 7)
-                        delay = 0;                                
-                    if(retVal == KErrNone && delay > 0)
-                        {
-                        TReal delayReal;
-                        Math::Pow(delayReal, 2, (TReal)delay);
-                        delay = (TInt) delayReal;
-                        TBuf<128> msg(_L("Delay present in message, value is = "));
-                        msg.AppendNum(delay);
-                        iTrace->Trace(msg, KTraceFileName, __LINE__); 
-                        isTimeoutDialogTimerStarted = ETrue;
-                        iDialogTimer->StartTimer(delay);
-                        }  	
-                    else
-                        {
-                        if (iSuplInitTimeOut > 0)
-                            {                                                        
-                            TBuf<256> msg(_L("Delay value in CR is"));
-                            msg.AppendNum(iSuplInitTimeOut);
-                            iTrace->Trace(msg, KTraceFileName, __LINE__); 
-                            iDialogTimer->StartTimer(iSuplInitTimeOut * KSecond);
-                            isTimeoutDialogTimerStarted = ETrue;
-                            }
-                        else
-                            iTrace->Trace(_L("Timeout is <= 0"), KTraceFileName, __LINE__);
-                        }
-                    iDlgStartTime.HomeTime();
-                    }
-                else if (KErrNone != err)
-                    {
-                    iTrace->Trace(_L("Invoking HandleSuplErrorL"), KTraceFileName, __LINE__);
-                    HandleSuplErrorL(err);
-                    }
-
-                }*/
-            //else if (usage == CSuplSettings::ESuplUsageHomeAutomatic) 
-            //{                
-            //if (!aHomeNw)
-              //  {                
-                //TInt err = KErrNone;                
-                //if (!iSuplSettings->IsUIActive() )
-                    {
-                    //iTrace->Trace(_L("Invoking LaunchSuplUsageSettingsUI, user is roaming"), KTraceFileName, __LINE__);
-                    //err = iProtocolManager.LaunchSuplUsageSettingsUI(this, ETrue);        
 
                     if(iSuplMsgType == ESUPL_INIT)
                         {
                         iTrace->Trace(_L("Dialog timer started"), KTraceFileName, __LINE__);
-				     
                         COMASuplInit* suplInit = static_cast <COMASuplInit*> (iDecodedAsnMessage);
                         TOMASuplQop qop;
                         TInt retVal = suplInit->Qop(qop);
@@ -4377,19 +4311,6 @@
                                 iTrace->Trace(_L("Timeout is <= 0"), KTraceFileName, __LINE__);
                             }
                         }
-                    }
-
-              /*  if(!iSuplSettings->IsUIActive() && KErrNone != err)
-                    {
-                        SetSuplUsageFlag();                            
-                    }
-                else
-                    {
-                    iTrace->Trace(_L("Invoking HandleSuplErrorL"), KTraceFileName, __LINE__);
-                    HandleSuplErrorL(err);
-                    }*/
-                
-                       
                                 
                 if (iNwInitError)
                     {
@@ -4397,13 +4318,15 @@
                     HandleSuplInitErrorL(iNwInitCompletionCode);                             
                     }                
                 else
-	                InitializeL(iRequestID); 
-                                                
+                {
+                	iTrace->Trace(_L("COMASuplSession::InitializeL called after roaming check"), KTraceFileName, __LINE__);
+	                InitializeL(iRequestID);  
+	              }  
         }
-        else
-            {
-	        	iSessionObserver.TerminateSession(this, KErrGeneral);	
-            }                
+   else
+        {
+      	iSessionObserver.TerminateSession(this, KErrGeneral);	
+        }                
     }            
 TInt COMASuplSession::SuplIpcSessionID() 
     {
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/inc/epos_comasuplconnrequestor.h	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/inc/epos_comasuplconnrequestor.h	Thu May 27 13:18:17 2010 +0300
@@ -289,6 +289,8 @@
             TBool iIsSettingInitilized;
             
             TInt64 iCurrentSLPId;
+            
+            TBool iTriggerSession;
 
 };
 
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/inc/epos_comasuplfallbackhandler.h	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/inc/epos_comasuplfallbackhandler.h	Thu May 27 13:18:17 2010 +0300
@@ -153,7 +153,6 @@
       TTime iFallBackStartTime;
       
       TInt iAllowedFallBackTimerValue;
-	  
 	  TBool iAttemptedBackupServer;
       
 };
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplconnrequestor.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplconnrequestor.cpp	Thu May 27 13:18:17 2010 +0300
@@ -47,7 +47,8 @@
     				 						 iCommMgr(aCommMgr), 
     				 						 iProtocolManager(aProtoMgr),
     				 						 iPort(aPort),
-    				 						 iObserver( aObserver)
+    				 						 iObserver( aObserver),
+    				 						 iTriggerSession(EFalse)
     {
 			
     }
@@ -116,6 +117,14 @@
 //    
 void COMASuplConnRequestor::CreateConnectionL(TBool aTriggerSession)
 	{
+	if(!iIsSettingInitilized)
+        {
+        iTriggerSession = aTriggerSession;
+				iState = EInitialState;
+        InitilizeSetting();
+        }
+    else
+        {
 		TBuf<100> iapName;
 		TBuf<128> buffer;
 		iState = EConnecting;  
@@ -159,6 +168,7 @@
 				iObserver.OperationCompleteL(errorCode);
 			}
 	}
+    }
 
 // -----------------------------------------------------------------------------
 // COMASuplConnRequestor::OpenConnection
@@ -215,6 +225,7 @@
 		}
 		else
 		{
+		iState = EInitilizeSetting;
 			InitilizeSetting();
 		}
 	}
@@ -261,6 +272,14 @@
     	switch(iState)
     		{
     		
+		case EInitialState:
+            {
+            iIsSettingInitilized = ETrue;
+            iTrace->Trace(_L("Setting API Initilizing Completed..."), KTraceFileName, __LINE__);
+            CreateConnectionL(iTriggerSession);
+            
+            break;
+            }
 			case  EConnecting:
 				{
 					if(iLastConnectionError < 0)
@@ -362,7 +381,7 @@
 void COMASuplConnRequestor::InitilizeSetting()
 	{
 			iTrace->Trace(_L("Intilizing Setting API..."), KTraceFileName, __LINE__); 				
-			iState = EInitilizeSetting;
+			
 			iSuplSettings->Initialize(iStatus);
 			SetActive();
 	}
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplfallbackhandler.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplfallbackhandler.cpp	Thu May 27 13:18:17 2010 +0300
@@ -115,11 +115,11 @@
     {
 	iTrace->Trace(_L("COMASuplFallBackHandler::GetNextSLPAddressL"),KTraceFileName, __LINE__);
 	
-        _LIT(KFormatTxt,"%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B"); 
-        
-        TBuf<256> LogBuffer;
-       
-       if( aLastErrorCode != KErrNone)// If its KErrNone then its means server name is asked first time and no need for Tls failure check
+    _LIT(KFormatTxt,"%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B"); 
+    
+    TBuf<256> LogBuffer;
+    
+     if( aLastErrorCode != KErrNone)// If its KErrNone then its means server name is asked first time and no need for Tls failure check
     	{
     	
     	if( CheckErrorCodeL(aLastErrorCode) )
@@ -135,6 +135,47 @@
             		aTls = ETrue;
             		aPskTls = EFalse;
             		aIsIapDialogShown = ETrue;
+					
+					CServerParams* param = CServerParams::NewL();
+					CleanupStack::PushL(param);
+					
+					//Find out if this alternative generated SUPL server is in the SUPL Settings list
+					TInt err = iSuplSettings.GetSlpInfoAddress(iGenratedHslpAddress, param);
+					if(err == KErrNotFound)
+						{
+						//Server does not exist
+						iTrace->Trace(_L("Server does not exist in list so adding it in."),KTraceFileName, __LINE__);
+						CServerParams* newParam=CServerParams::NewL();
+						CleanupStack::PushL(newParam);
+						User::LeaveIfError(newParam->Set( iGenratedHslpAddress,iDefaultIAPName,ETrue,ETrue,ETrue,EFalse ));
+
+						err = iSuplSettings.AddNewServer( newParam, aSLPId ); //Ignore error
+						LogBuffer.Copy(_L("AddNewServer() completed with err: "));
+						LogBuffer.AppendNum(err);
+						iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 		
+						
+						CleanupStack::PopAndDestroy(&newParam);
+						}
+					else
+						{
+						//Server exists, get the SLP ID and the IAP Access point for this server
+						HBufC* hslpAddress =  HBufC::NewL(KHSLPAddressLength);       
+						HBufC* iapName =  HBufC::NewL(KMaxIapNameLength);
+						TBool serverEnabled;
+						TBool simChangeRemove;
+						TBool usageInHomeNw;
+						TBool editable;
+						
+						iTrace->Trace(_L("Server already exists, getting the SLP ID and Access Point."),KTraceFileName, __LINE__);
+						
+						param->Get(aSLPId,hslpAddress->Des(),iapName->Des(),serverEnabled,simChangeRemove,usageInHomeNw,editable);
+						aIAPName.Copy(iapName->Des());
+						
+						delete hslpAddress;
+						delete iapName;
+						}
+					
+					CleanupStack::PopAndDestroy(&param);
                                 
             		iTrace->Trace(_L("Fallback allowed & TLSAuth failed"),KTraceFileName, __LINE__);
             		iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
@@ -162,138 +203,151 @@
 	     	{
 	     	return KErrNotFound;
 	     	}  
-	 	} 
-	 	
-		//Check to see if the server list is empty.  If it is create the HSLP Address from the IMSI and use that
-		// as the server address.  This does not add the server to the list and this functionality should only
-		// be tried once
-		if(iSLPList->Count() <= 0 && (!iAttemptedBackupServer))
-			{
-			iTrace->Trace(_L("Going to create and use alternative HSLP Address from IMSI"),KTraceFileName, __LINE__);
+	 	}
+
+	//Check to see if the server list is empty.  If it is create the HSLP Address from the IMSI and use that
+	// as the server address.  This does not add the server to the list and this functionality should only
+	// be tried once
+	if(iSLPList->Count() <= 0 && (!iAttemptedBackupServer))
+		{
+		iTrace->Trace(_L("Going to create and use alternative HSLP Address from IMSI"),KTraceFileName, __LINE__);
+
+		iAttemptedBackupServer = ETrue;
+
+		//Generate the HSLP Address
+		GenerateHslpAddressFromIMSIL();
 
-			iAttemptedBackupServer = ETrue;
+		//Copy the generated address into the supplied function arguments
+		aHslpToBeUsedAddress.Copy(iGenratedHslpAddress);
+		aIAPName.Zero();   
+		aIAPName.Copy(iDefaultIAPName);
+		aTls = ETrue;
+		aPskTls = EFalse;
+		aIsIapDialogShown = ETrue;
+
+		iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
+		LogBuffer.Copy(aHslpToBeUsedAddress);
+		iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
 
-			//Generate the HSLP Address
-			GenerateHslpAddressFromIMSIL();
+		iTrace->Trace(_L("iap being used:"),KTraceFileName, __LINE__);
+		LogBuffer.Copy(aIAPName);
+		iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
+		
+		//Add the server to the list for future connections
+		CServerParams* param=CServerParams::NewL();
+		CleanupStack::PushL(param);
+		User::LeaveIfError(param->Set( iGenratedHslpAddress,iDefaultIAPName,ETrue,ETrue,ETrue,EFalse ));
+
+		TInt err = iSuplSettings.AddNewServer( param, aSLPId ); //Ignore error
+		LogBuffer.Copy(_L("AddNewServer() completed with err: "));
+		LogBuffer.AppendNum(err);
+		iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 		
+		
+		CleanupStack::PopAndDestroy(&param);
 
-			//Copy the generated address into the supplied function arguments
-			aHslpToBeUsedAddress.Copy(iGenratedHslpAddress);
-			aIAPName.Zero();   
-			aIAPName.Copy(iDefaultIAPName);
-			aTls = ETrue;
-			aPskTls = EFalse;
-			aIsIapDialogShown = ETrue;
-
-			iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
-			LogBuffer.Copy(aHslpToBeUsedAddress);
-			iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-
-			iTrace->Trace(_L("iap being used:"),KTraceFileName, __LINE__);
-			LogBuffer.Copy(aIAPName);
-			iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-
-			return KErrNone;
-			}
-		
-        if( iSLPList->Count() <= 0 || iCurrentServerCounter >= iSLPList->Count() ) 
+		return KErrNone;
+		}
+    
+    if( iSLPList->Count() <= 0 || iCurrentServerCounter >= iSLPList->Count() ) 
+        {
+        LogBuffer.Copy(_L("No more servers available..."));
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 				
+        return KErrNotFound;
+        }
+             
+    iTrace->Trace(_L("Trying next server..."),KTraceFileName, __LINE__); 				
+             
+    //Fallback Timer...
+    if(aLastErrorCode == KErrNone) //This means, server name is asked for first time only...
+        {
+        iTrace->Trace(_L("Start Time: "),KTraceFileName, __LINE__); 				
+        iFallBackStartTime.HomeTime();
+        LogBuffer.Zero();
+        iFallBackStartTime.FormatL(LogBuffer,KFormatTxt); 
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 				
+        }
+    else
+        {
+        TTime currentTime;
+        currentTime.HomeTime();
+        TTimeIntervalMicroSeconds diff = currentTime.MicroSecondsFrom(iFallBackStartTime); 
+                        
+                        
+        iTrace->Trace(_L("Current Time: "),KTraceFileName, __LINE__); 				
+        LogBuffer.Zero();
+        currentTime.FormatL(LogBuffer,KFormatTxt); 
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 				
+                        
+        LogBuffer.Copy(_L("Difference between time: "));
+        LogBuffer.AppendNum(diff.Int64());
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 				
+                        
+        if( diff.Int64() > iAllowedFallBackTimerValue)	
             {
-            LogBuffer.Copy(_L("No more servers available..."));
-            iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);              
-            return KErrNotFound;
+            LogBuffer.Copy(_L("Timeout happened..."));
+            iTrace->Trace(LogBuffer,KTraceFileName, __LINE__); 		
+            
+            return KErrTimedOut;
             }
-                 
-        iTrace->Trace(_L("Trying next server..."),KTraceFileName, __LINE__);                
-                 
-        //Fallback Timer...
-        if(aLastErrorCode == KErrNone) //This means, server name is asked for first time only...
-            {
-            iTrace->Trace(_L("Start Time: "),KTraceFileName, __LINE__);                 
-            iFallBackStartTime.HomeTime();
-            LogBuffer.Zero();
-            iFallBackStartTime.FormatL(LogBuffer,KFormatTxt); 
-            iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);              
-            }
-        else
+        }	
+                
+    if(aLastErrorCode == KErrNone)  //This will be called only once...for first time only
+        {
+        aSLPId = (*iSLPList)[0].iSLPId;
+        aHslpToBeUsedAddress.Copy((*iSLPList)[0].iHSLPAddress);
+        aIAPName.Copy((*iSLPList)[0].iIapName);
+        aTls = (*iSLPList)[0].iTls;
+        aPskTls = (*iSLPList)[0].iPskTls;
+        aIsIapDialogShown = (*iSLPList)[0].iIsIAPDialgShown;
+        iCurrentServerCounter++;				
+                    
+        iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
+        LogBuffer.Copy(aHslpToBeUsedAddress);
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
+                    
+        iTrace->Trace(_L("iap being used:"),KTraceFileName, __LINE__);
+        LogBuffer.Copy(aIAPName);
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
+                    
+        iTrace->Trace(_L("iap dlg configuration:"),KTraceFileName, __LINE__);
+        LogBuffer.Delete(0,256);
+        LogBuffer.AppendNum(aIsIapDialogShown);
+        iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
+                    
+        return KErrNone;
+        }
+    else
+        {
+        if(iIsFallBackAllowed && CheckErrorCodeL(aLastErrorCode))// Do not fallback in case if IMSI generated address failed for previous try.
             {
-            TTime currentTime;
-            currentTime.HomeTime();
-            TTimeIntervalMicroSeconds diff = currentTime.MicroSecondsFrom(iFallBackStartTime); 
-                            
-                            
-            iTrace->Trace(_L("Current Time: "),KTraceFileName, __LINE__);               
-            LogBuffer.Zero();
-            currentTime.FormatL(LogBuffer,KFormatTxt); 
-            iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);              
-                            
-            LogBuffer.Copy(_L("Difference between time: "));
-            LogBuffer.AppendNum(diff.Int64());
-            iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);              
-                            
-            if( diff.Int64() > iAllowedFallBackTimerValue)  
-                {
-                LogBuffer.Copy(_L("Timeout happened..."));
-                iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);      
-                
-                return KErrTimedOut;
-                }
-            }   
-                    
-        if(aLastErrorCode == KErrNone)  //This will be called only once...for first time only
-            {
-            aSLPId = (*iSLPList)[0].iSLPId;
-            aHslpToBeUsedAddress.Copy((*iSLPList)[0].iHSLPAddress);
-            aIAPName.Copy((*iSLPList)[0].iIapName);
-            aTls = (*iSLPList)[0].iTls;
-            aPskTls = (*iSLPList)[0].iPskTls;
-            aIsIapDialogShown = (*iSLPList)[0].iIsIAPDialgShown;
-            iCurrentServerCounter++;                
-                        
+            aSLPId = (*iSLPList)[iCurrentServerCounter].iSLPId;	
+            aHslpToBeUsedAddress.Copy((*iSLPList)[iCurrentServerCounter].iHSLPAddress);
+            aIAPName.Copy((*iSLPList)[iCurrentServerCounter].iIapName);    			
+            aTls = (*iSLPList)[iCurrentServerCounter].iTls;
+            aPskTls = (*iSLPList)[iCurrentServerCounter].iPskTls;
+            aIsIapDialogShown = (*iSLPList)[iCurrentServerCounter].iIsIAPDialgShown;
+            iCurrentServerCounter++;
+            iTrace->Trace(_L("Fallback allowed & TLSAuth passed"),KTraceFileName, __LINE__);
             iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
             LogBuffer.Copy(aHslpToBeUsedAddress);
             iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-                        
+                                                                   
             iTrace->Trace(_L("iap being used:"),KTraceFileName, __LINE__);
             LogBuffer.Copy(aIAPName);
             iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-                        
+                                                                    
             iTrace->Trace(_L("iap dlg configuration:"),KTraceFileName, __LINE__);
             LogBuffer.Delete(0,256);
             LogBuffer.AppendNum(aIsIapDialogShown);
             iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-                        
             return KErrNone;
             }
         else
             {
-            if(iIsFallBackAllowed && CheckErrorCodeL(aLastErrorCode))// Do not fallback in case if IMSI generated address failed for previous try.
-                {
-                aSLPId = (*iSLPList)[iCurrentServerCounter].iSLPId; 
-                aHslpToBeUsedAddress.Copy((*iSLPList)[iCurrentServerCounter].iHSLPAddress);
-                aIAPName.Copy((*iSLPList)[iCurrentServerCounter].iIapName);             
-                aTls = (*iSLPList)[iCurrentServerCounter].iTls;
-                aPskTls = (*iSLPList)[iCurrentServerCounter].iPskTls;
-                aIsIapDialogShown = (*iSLPList)[iCurrentServerCounter].iIsIAPDialgShown;
-                iCurrentServerCounter++;
-                iTrace->Trace(_L("Fallback allowed & TLSAuth passed"),KTraceFileName, __LINE__);
-                iTrace->Trace(_L("Server being used:"),KTraceFileName, __LINE__);
-                LogBuffer.Copy(aHslpToBeUsedAddress);
-                iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-                                                                       
-                iTrace->Trace(_L("iap being used:"),KTraceFileName, __LINE__);
-                LogBuffer.Copy(aIAPName);
-                iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-                                                                        
-                iTrace->Trace(_L("iap dlg configuration:"),KTraceFileName, __LINE__);
-                LogBuffer.Delete(0,256);
-                LogBuffer.AppendNum(aIsIapDialogShown);
-                iTrace->Trace(LogBuffer,KTraceFileName, __LINE__);
-                return KErrNone;
-                }
-            else
-                {
-                return KErrNotFound;
-                }
+            return KErrNotFound;
             }
+        }
+                    
     }
     
 // -----------------------------------------------------------------------------
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplprotocolmanager2.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplprotocolmanager2.cpp	Thu May 27 13:18:17 2010 +0300
@@ -108,13 +108,21 @@
 		{
 			iSettingsLauncher->CancelLaunch();
 		}*/
-	iSuplSettings->SetUIActive( EFalse );
+	
+	if(iSuplSettings)
+		{
+		iSuplSettings->SetUIActive( EFalse );
+		}
 
 	DeleteAllSessions();
 	iSuplSessions.Reset();
 	iSuplSessions.Close();
 
+	//Only attempt to unload the phone if the TSY has actually been initialised
+	if(iTsyName.Length() > 0)
+		{
 	    iTelServer.UnloadPhoneModule(iTsyName);
+		}
 
 	
 	iQueuedPacket.Close();
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplsession2.cpp	Thu May 27 13:18:17 2010 +0300
@@ -4767,10 +4767,16 @@
                 HandleSuplInitErrorL(iNwInitCompletionCode);                             
                 }                
             else
-                {                    
-                iTrace->Trace(_L("CheckForSuplUsageL, Initializing"), KTraceFileName, __LINE__); 
-                InitializeL(iRequestID); 
-                }
+            	{
+            		if (iRoaming)                
+                    HandleRoamingCheckCompleteL(KErrNone, EFalse);                    
+                else
+                    {                        
+                    iEtelRoamingCheck = ETrue;
+                    iProtocolManager.CheckForRoaming();
+                    }
+	            //InitializeL(iRequestID); 
+	          	}
             /*}
 
         else if (usage == CSuplSettings::ESuplUsageHomeAutomatic || usage == CSuplSettings::ESuplUsageAlwaysAsk)
--- a/supl/locationomasuplprotocolhandler/provisioninghandler/group/epos_omasuplprovhandler.mmp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/provisioninghandler/group/epos_omasuplprovhandler.mmp	Thu May 27 13:18:17 2010 +0300
@@ -60,8 +60,9 @@
 LIBRARY         euser.lib
 LIBRARY         provisioningengine.lib
 LIBRARY 		bafl.lib 
-LIBRARY			apengine.lib 
+ 
 LIBRARY         commdb.lib
 LIBRARY         centralrepository.lib
 LIBRARY 				epos_csuplutils.lib
 LIBRARY         epos_suplsettings.lib
+LIBRARY         cmmanager.lib
\ No newline at end of file
--- a/supl/locationomasuplprotocolhandler/provisioninghandler/src/epos_comasuplsettings.cpp	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/provisioninghandler/src/epos_comasuplsettings.cpp	Thu May 27 13:18:17 2010 +0300
@@ -30,6 +30,11 @@
 #include "epos_omasuplprovhandler.hrh"
 #include <epos_omasuplprovhandlerres.rsg>
 
+#include <cmmanagerext.h>
+#include <cmdestinationext.h>
+#include <cmconnectionmethodext.h>
+#include <cmconnectionmethoddef.h>
+
 
 _LIT( KTraceSuplSettings, "epos_comasuplsettings.cpp" );
 
@@ -146,12 +151,59 @@
 //
 TUint32 COMASuplSettings::IapIdFromWapIdL( TUint32 aWapId ) const
     {
-    CApUtils* apUtils = CApUtils::NewLC( *iCommsDb );
+    /*CApUtils* apUtils = CApUtils::NewLC( *iCommsDb );
     TUint32 iapId = NULL;
     iapId = apUtils->IapIdFromWapIdL( aWapId );
     __ASSERT_ALWAYS( iapId, Panic( SuplAdapterInvalidId ) );
     CleanupStack::PopAndDestroy( apUtils );
     return iapId;
+    return ;*/
+    
+    RCmManagerExt cmManager;
+    cmManager.OpenLC(); // CS:1
+    RArray<TUint32> iapIds;
+    TUint32 iapId( 0 );
+
+    // First get all free IAP ID's.
+    cmManager.ConnectionMethodL( iapIds );
+    CleanupClosePushL( iapIds ); // CS:2
+
+    // Then get IAP ID's from all destinations.
+    RArray<TUint32> destIds;
+    cmManager.AllDestinationsL( destIds );
+    CleanupClosePushL( destIds ); // CS:3
+    TInt destCount = destIds.Count();
+    for ( TInt destIndex = 0; destIndex < destCount; destIndex++ )
+        {
+        RCmDestinationExt dest = cmManager.DestinationL( 
+            destIds[destIndex] );
+        CleanupClosePushL( dest ); // CS:4
+        TInt cmCount = dest.ConnectionMethodCount();
+        for ( TInt cmIndex = 0; cmIndex < cmCount; cmIndex++ )
+            {
+            TUint32 apId = dest.ConnectionMethodL( 
+                cmIndex ).GetIntAttributeL( CMManager::ECmIapId );
+            iapIds.AppendL( apId );
+            }
+        CleanupStack::PopAndDestroy( &dest ); // CS:3
+        }
+    // Finally, go through all connection methods and find correct IAP ID.
+    const TInt cmCount = iapIds.Count();
+    for ( TInt counter = 0; counter < cmCount; counter++ )
+        {
+        TUint32 id = cmManager.GetConnectionMethodInfoIntL( 
+            iapIds[counter], CMManager::ECmWapId );
+        if ( id == aWapId )
+            {
+            iapId = iapIds[counter];
+            // No need to go through rest of IAPs.
+            break;
+            }
+        }
+    // PopAndDestroy destIds, iapIds, cmManager.
+    CleanupStack::PopAndDestroy( 3, &cmManager ); // CS:0
+    return iapId;
+    
     }
 
 
--- a/supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler.iby	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler.iby	Thu May 27 13:18:17 2010 +0300
@@ -65,8 +65,8 @@
 #endif	// __SYNCML_DM
 
 // Notifier
-ECOM_PLUGIN(epos_omasuplnotifierplugin.dll,epos_omasuplnotifierplugin.rsc)
-file=ABI_DIR\BUILD_DIR\epos_omasuplnotifier.dll   SHARED_LIB_DIR\epos_omasuplnotifier.dll
+//ECOM_PLUGIN(epos_omasuplnotifierplugin.dll,epos_omasuplnotifierplugin.rsc)
+//file=ABI_DIR\BUILD_DIR\epos_omasuplnotifier.dll   SHARED_LIB_DIR\epos_omasuplnotifier.dll
 // Storage Db Backup Registration File
 data=DATAZ_\private\1027509E\backup_registration.xml    \private\1027509E\backup_registration.xml
 #endif //__OMA_SUPL_PLUGINS   
--- a/supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler_resource.iby	Fri May 14 16:17:02 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/rom/omasuplprotocolhandler_resource.iby	Thu May 27 13:18:17 2010 +0300
@@ -29,7 +29,7 @@
 #ifdef __OMA_SUPL_PLUGINS   
 
 //Resource file for notifier
-data=DATAZ_\resource\epos_omasuplnotifier.rsc      	    resource\epos_omasuplnotifier.rsc
+//data=DATAZ_\resource\epos_omasuplnotifier.rsc      	    resource\epos_omasuplnotifier.rsc
 #endif  //__OMA_SUPL_PLUGINS 
 
 #endif // OMASUPLPROTOCOLHANDLER_RESOURCE_IBY