Revision: 201033 RCL_3 PDK_3.0.3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 22:54:36 +0300
branchRCL_3
changeset 65 5cc2995847ea
parent 62 19bba8228ff0
child 69 a082c848c9a9
Revision: 201033 Kit: 201035
dcmofw/dcmoserver/group/dcmoserver.mmp
devicediagnosticsfw/diagpluginbase/group/diagpluginbase.mmp
fotaapplication/fotaserver/FotaServer/group/fotaserver.mmp
fotaapplication/fotaserver/FotaServer/inc/DevEncController.h
fotaapplication/fotaserver/FotaServer/inc/FotaServer.h
fotaapplication/fotaserver/FotaServer/src/DevEncController.cpp
fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp
fotaapplication/fotaserver/FotaServer/src/fotadownload.cpp
fotaapplication/fotaserver/fmserver/group/fmsserver.mmp
omaprovisioning/provisioning/AuthTypePlugin/Group/Authtypeplugin.mmp
omaprovisioning/provisioning/AuthTypePlugin/src/Authtypeplugin.cpp
omaprovisioning/provisioning/IMAdapter/Group/IMAdapter.mmp
omaprovisioning/provisioning/MbxNbrAdapter/Group/MbxNbrAdapter.mmp
omaprovisioning/provisioning/ProvisioningBC/Group/ProvisioningBC.mmp
omaprovisioning/provisioning/ProvisioningBC/Src/CWPBioControl.cpp
omaprovisioning/provisioning/ProvisioningBC/Src/CWPSaver.cpp
omaprovisioning/provisioning/ProvisioningCx/group/ProvisioningCx.mmp
omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp
omaprovisioning/provisioning/ProvisioningEngine/Inc/ProvisioningInternalCRKeys.h
omaprovisioning/provisioning/ProvisioningEngine/Src/CWPPushMessage.cpp
omaprovisioning/provisioning/ProvisioningHandler/Src/CWPMessage.cpp
omaprovisioning/provisioning/ProvisioningSC/Src/CWPBioMsgHandler.cpp
omaprovisioning/provisioning/ProvisioningSC/Src/CWPProvisioningSC.cpp
omaprovisioning/provisioning/WAPAdapter/Group/WPWAPAdapter.mmp
omaprovisioning/provisioning/accesspointadapter/Src/CWPAPAdapter.cpp
omaprovisioning/provisioning/accesspointadapter/Src/CWPAPNapdef.cpp
omaprovisioning/provisioning/accesspointadapter/group/WPAPAdapter.mmp
omaprovisioning/provisioning/alwaysonadapter/Group/alwaysonadapter.mmp
omaprovisioning/provisioning/conf/s60provisioning.confml
omaprovisioning/provisioning/conf/s60provisioning_101F87AA.crml
policymanagement/dmutilserver/group/DMUtilServer.mmp
policymanagement/policyengine/group/PolicyEngineUI.mmp
remotemgmt_plat/lawmo_plugin_api/inc/lawmointerface.h
syncmlfw/common/alertqueue/bld/NSmlAlertQueue.mmp
syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp
syncmlfw/common/alertqueue/src/NSmlDSAlertParser12.cpp
syncmlfw/common/obex/obexdmplugin/bld/nsmlobexdmplugin.mmp
syncmlfw/common/sosserver/bld/nsmlsosserver.mmp
syncmlfw/common/sosserver_clientapi/bld/NSmlClientAPI.mmp
syncmlfw/common/sosserver_transporthandler/src/NSmlTransportHandler.cpp
syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp
syncmlfw/common/transport/bld/nsmltransport.mmp
syncmlfw/common/wbxml/bld/nsmlwbxml.mmp
syncmlfw/common/xml/bld/nsmlxml.mmp
syncmlfw/dm/provisioningadapter/bld/NSmlDmProvisioningAdapter.mmp
syncmlfw/dm/provisioningadapter/inc/ProvisioningInternalCRKeys.h
syncmlfw/dm/provisioningadapter/src/NSmlDmProvisioningAdapter.cpp
syncmlfw/dm/settings/src/NSmlDMSettings.cpp
syncmlfw/dm/wappushalert/bld/nsmldmwappushalert.mmp
syncmlfw/ds/adapters/dataproviderbase/bld/nsmldataproviderbase.mmp
syncmlfw/ds/alerthandler/bld/nsmldsalert.mmp
syncmlfw/ds/dsutils/ProfileUtil/bld/NsmlProfileUtil.mmp
syncmlfw/ds/hostserver/dshostserverbase/bld/nsmldshostserver.mmp
syncmlfw/ds/netmon/bld/NetMon.mmp
syncmlfw/ds/provisioningadapter/bld/NSmlDsProvisioningAdapter.mmp
syncmlfw/ds/provisioningadapter/src/NSmlDsProvisioningAdapter.cpp
syncmlfw/ds/settings/src/NSmlDSSettings.cpp
syncmlfw/ds/syncagent/bld/nsmldsagent.mmp
syncmlfw/syncmlnotifier/group/SyncMLNotifier.mmp
syncmlfw/syncmlnotifier/src/SyncMLAppLaunchNotifier.cpp
syncmlfw/syncmlnotifier/src/SyncMLDlgNotifier.cpp
syncmlfw/syncmlnotifier/src/SyncMLFwUpdNotifier.cpp
terminalsecurity/SCP/SCPClient/data/SCPNotifier.rss
terminalsecurity/SCP/SCPClient/group/SCPClient.mmp
terminalsecurity/SCP/SCPClient/loc/SCPNotifier.loc
terminalsecurity/SCP/SCPClient/src/SCPClient.cpp
terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp
terminalsecurity/SCP/SCPHistoryPlugin/src/SCPHistoryPlugin.cpp
terminalsecurity/SCP/SCPHistoryPlugin/src/SCPSpecificStringsPlugin.cpp
terminalsecurity/SCP/SCPPatternPlugin/src/SCPPatternPlugin.cpp
terminalsecurity/SCP/SCPServer/group/SCPServer.mmp
terminalsecurity/SCP/SCPServer/inc/SCPSession.h
terminalsecurity/SCP/SCPServer/src/SCPSession.cpp
terminalsecurity/SCP/SCPTimestampPlugin/src/SCPTimestampPlugin.cpp
terminalsecurity/SCP/SCPTimestampPlugin/src/SCPUserInf.cpp
--- a/dcmofw/dcmoserver/group/dcmoserver.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/dcmofw/dcmoserver/group/dcmoserver.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -44,24 +44,24 @@
     LANGUAGE_IDS
 END 
 
-LIBRARY     	euser.lib commonengine.lib efsrv.lib
+LIBRARY     	euser.lib CommonEngine.lib efsrv.lib
 LIBRARY       ecom.lib
 LIBRARY       centralrepository.lib
 LIBRARY				aknnotify.lib eiksrv.lib
 LIBRARY    		flogger.lib
-LIBRARY 		TerminalControl.lib
-LIBRARY				nsmlprivateapi.lib
-LIBRARY     		commdb.lib
+LIBRARY 			terminalcontrol.lib
+LIBRARY				NSmlPrivateAPI.lib
+LIBRARY     	commdb.lib
 LIBRARY				apengine.lib	esock.lib 
 #ifdef __TARM_SYMBIAN_CONVERGENCY
- LIBRARY				dmtreeclient.lib
- LIBRARY				SmlClient.lib
+ LIBRARY			dmtreeclient.lib
+ LIBRARY			SmlClient.lib
 #else
  LIBRARY			nsmldmtreedbhandler.lib
- LIBRARY  			syncmlclientapi.lib
+ LIBRARY  		syncmlclientapi.lib
  LIBRARY 			nsmldmmodule.lib
- LIBRARY 			nsmldmtreedbclient.lib connmon.lib
- LIBRARY     		nsmltransporthandler.lib
-LIBRARY     		nsmltransport.lib cone.lib javaregistryclient.lib avkon.lib eikcore.lib  apparc.lib
+ LIBRARY 			nsmldmtreedbclient.lib ConnMon.lib
+ LIBRARY     	nsmltransporthandler.lib
+LIBRARY     	nsmltransport.lib cone.lib javaregistryclient.lib avkon.lib eikcore.lib  apparc.lib
 #endif // __TARM_SYMBIAN_CONVERGENCY
-SMPSAFE
\ No newline at end of file
+SMPSAFE
--- a/devicediagnosticsfw/diagpluginbase/group/diagpluginbase.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/devicediagnosticsfw/diagpluginbase/group/diagpluginbase.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -47,7 +47,7 @@
 LIBRARY     efsrv.lib
 LIBRARY     bafl.lib
 LIBRARY     cone.lib            // CCoeEnv
-LIBRARY     commonengine.lib
+LIBRARY     CommonEngine.lib
 LIBRARY     estor.lib           // RBufReadStream
 LIBRARY     flogger.lib         // logging
 LIBRARY     eikdlg.lib          // CEikDialog
--- a/fotaapplication/fotaserver/FotaServer/group/fotaserver.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/group/fotaserver.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -83,7 +83,7 @@
 LIBRARY     bafl.lib
 LIBRARY     cone.lib
 LIBRARY     commdb.lib
-LIBRARY     commonengine.lib
+LIBRARY     CommonEngine.lib
 LIBRARY     edbms.lib
 LIBRARY     efsrv.lib
 LIBRARY     eikctl.lib
@@ -112,11 +112,12 @@
 LIBRARY     nsmldmtreedbclient.lib
 LIBRARY		akncapserverclient.lib // AknUiServer
 LIBRARY		starterclient.lib
-LIBRARY		connmon.lib
+LIBRARY		ConnMon.lib
 LIBRARY		featmgr.lib
 LIBRARY		fmsclient.lib	//FMS Client
 LIBRARY     	cmmanager.lib 	//Connection Manager
-LIBRARY		inetprotutil.lib
+LIBRARY     	inetprotutil.lib
+LIBRARY         featdiscovery.lib
 
 LIBRARY		aknnotify.lib
 // #ifdef _FOTA_DEBUG
--- a/fotaapplication/fotaserver/FotaServer/inc/DevEncController.h	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/inc/DevEncController.h	Tue Sep 14 22:54:36 2010 +0300
@@ -52,6 +52,7 @@
         void ReportDevEncOpnCompleteL(TInt aResult);
         
         TInt GetDEOperation();
+        void CheckIfDeviceMemoryBusyL();
         
     private:
     // Functions
--- a/fotaapplication/fotaserver/FotaServer/inc/FotaServer.h	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/inc/FotaServer.h	Tue Sep 14 22:54:36 2010 +0300
@@ -739,6 +739,15 @@
 	 * @return None
 	 */ 
 	void StartNetworkMonitorL();
+	
+	/**
+	 * Checks whether FOTA needs to decrypt the memory before updating by examing the Feature Flag
+	 *
+	 * @since SF 3
+	 * @param None
+	 * @return TBool
+	 */
+	TBool IsFOTANeedToDecryptL();
 
 
 private: // Data
--- a/fotaapplication/fotaserver/FotaServer/src/DevEncController.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/src/DevEncController.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -200,16 +200,8 @@
     TInt err (KErrNone);
     TInt status (KErrNone);
 
-    TInt deoperation (EOpIdle);  
-
-    RProperty::Get(KDevEncProtectedUid, KDevEncOperationKey, deoperation );
-
-    if (deoperation != EOpIdle)
-        {
-        FLOG(_L("Some disk operation is ongoing. Hence Fota is not possible."));
-        User::Leave(KErrNotReady);
-        }
-
+    CheckIfDeviceMemoryBusyL();
+    
 		iEncMemorySession->SetDrive( aDrive);
 
     err = iEncMemorySession->Connect();
@@ -525,5 +517,19 @@
     return iDevEncOperation;
     }
 
+void CDevEncController::CheckIfDeviceMemoryBusyL()
+    {
+    TInt deoperation (EOpIdle);  
+
+    RProperty::Get(KDevEncProtectedUid, KDevEncOperationKey, deoperation );
+
+    if (deoperation != EOpIdle)
+        {
+        FLOG(_L("Some disk operation is ongoing. Hence Fota is not possible."));
+        User::Leave(KErrNotReady);
+        }
+	
+	  }
+
 // End of file
 
--- a/fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -31,6 +31,7 @@
 #include <nsmlconstants.h>
 #include <centralrepository.h>
 #include <sysversioninfo.h>
+#include <featdiscovery.h>
 #include "FotaSrvApp.h"
 #include "FotaServer.h"
 #include "FotaSrvDebug.h"
@@ -2415,6 +2416,14 @@
             __LEAVE_IF_ERROR(err);
             }
         }
+    
+    if(!IsFOTANeedToDecryptL())
+       {
+       iDEController->CheckIfDeviceMemoryBusyL();
+       return EFalse;
+       }
+    
+        
     TRAPD(err, ret = iDEController->NeedToDecryptL(drive));
     
     delete iDEController; iDEController = NULL;
@@ -2590,3 +2599,21 @@
     return ret;
     }
 
+// --------------------------------------------------------------------------
+// CFotaServer::IsFOTANeedToDecryptL
+// This method returns the device encryption operation.
+// 
+// --------------------------------------------------------------------------
+// 
+TBool CFotaServer::IsFOTANeedToDecryptL()
+    {
+    FLOG(_L("CFotaServer::IsFOTANeedToDecryptL >>"));
+
+    TBool ret(EFalse);
+    ret = CFeatureDiscovery::IsFeatureSupportedL(TUid::Uid(KFeatureIdFfFotaDecryptMemBeforeUpdate));
+    
+    FLOG(_L("CFotaServer::IsFOTANeedToDecryptL, ret = %d <<"), ret);
+    return ret;
+    }
+
+
--- a/fotaapplication/fotaserver/FotaServer/src/fotadownload.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/FotaServer/src/fotadownload.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -36,7 +36,7 @@
 #include <es_sock_partner.h>
 #endif
 #include <es_enum.h>
-#include <NSmlDMSync.rsg>	//OMA DM UI for reading resource
+#include <nsmldmsync.rsg>	//OMA DM UI for reading resource
 #include <bautils.h>
 #include <StringLoader.h>
 #include <DevManInternalCRKeys.h> //for reading san feature
--- a/fotaapplication/fotaserver/fmserver/group/fmsserver.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/fotaapplication/fotaserver/fmserver/group/fmsserver.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -42,7 +42,7 @@
 MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY       euser.lib
-LIBRARY       connmon.lib // for connection monitoring
+LIBRARY       ConnMon.lib // for connection monitoring
 LIBRARY       sysutil.lib 
 LIBRARY       efsrv.lib 
 LIBRARY       flogger.lib
--- a/omaprovisioning/provisioning/AuthTypePlugin/Group/Authtypeplugin.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/AuthTypePlugin/Group/Authtypeplugin.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -65,7 +65,7 @@
 LIBRARY             avkon.lib
 LIBRARY             bafl.lib
 LIBRARY             commdb.lib
-LIBRARY             commonengine.lib // RConeResourceLoader
+LIBRARY             CommonEngine.lib // RConeResourceLoader
 LIBRARY             cone.lib
 LIBRARY             ecom.lib
 LIBRARY             efsrv.lib
--- a/omaprovisioning/provisioning/AuthTypePlugin/src/Authtypeplugin.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/AuthTypePlugin/src/Authtypeplugin.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -21,7 +21,7 @@
 
 #include    <gsparentplugin.h>
 #include    <gscommon.hrh>
-#include    <AuthtypepluginRsc.rsg> // GUI Resource
+#include    <authtypepluginrsc.rsg> // GUI Resource
 #include    <Authtypeplugin.mbg>
 #include    <gsprivatepluginproviderids.h>
 #include    <gsfwviewuids.h>
--- a/omaprovisioning/provisioning/IMAdapter/Group/IMAdapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/IMAdapter/Group/IMAdapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -56,7 +56,7 @@
 LIBRARY         euser.lib 
 LIBRARY         provisioningengine.lib
 LIBRARY         wvsapsettingsstore.lib
-LIBRARY         msgeditorutils.lib
+LIBRARY         MsgEditorUtils.lib
 LIBRARY         apengine.lib
 LIBRARY         commdb.lib
 LIBRARY         inetprotutil.lib 
--- a/omaprovisioning/provisioning/MbxNbrAdapter/Group/MbxNbrAdapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/MbxNbrAdapter/Group/MbxNbrAdapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -54,7 +54,7 @@
 
 LIBRARY         euser.lib
 LIBRARY         provisioningengine.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 LIBRARY         vmbx.lib
 LIBRARY 		centralrepository.lib
 
--- a/omaprovisioning/provisioning/ProvisioningBC/Group/ProvisioningBC.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningBC/Group/ProvisioningBC.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -60,10 +60,10 @@
 LIBRARY         bafl.lib 
 LIBRARY         eikcore.lib 
 LIBRARY         eikcoctl.lib        // bordered control
-LIBRARY         msgeditorutils.lib
+LIBRARY         MsgEditorUtils.lib
 LIBRARY         cone.lib
 LIBRARY         msgs.lib            // Messaging Centre interface
-LIBRARY         commonengine.lib    // StringLoader
+LIBRARY         CommonEngine.lib    // StringLoader
 LIBRARY         richbio.lib
 LIBRARY         provisioningengine.lib
 LIBRARY         avkon.lib
--- a/omaprovisioning/provisioning/ProvisioningBC/Src/CWPBioControl.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningBC/Src/CWPBioControl.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -361,6 +361,20 @@
     TBool preAuthenticated( iMessage->Authenticated() );
     // If the message was not authenticated, give a warning
     AuthenticateL( *iMessage );
+    
+    // Identify the authentication type
+    TInt type = (entry->Entry()).MtmData2();
+    if(type == 1)
+    {    
+    CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );	
+    TInt err = repository->Set(KOMAProvMessageOpen, type);  
+    if(err != KErrNone)
+    	{
+    		FLOG( _L( "[ProvisioningBC] CWPBioControl::RestoreMsgL Set KOMAProvMessageOpen failed" ) );
+    	}    
+    CleanupStack::PopAndDestroy(); // repository 
+    }
+    	
     FLOG( _L( "[ProvisioningBC] CWPBioControl::RestoreMsgL 3 " ) );
     if( !tentry.ReadOnly() && preAuthenticated != iMessage->Authenticated() )
         {
@@ -375,6 +389,16 @@
     FLOG( _L( "[ProvisioningBC] CWPBioControl::RestoreMsgL 5 " ) );
     iEngine->PopulateL();
     FLOG( _L( "[ProvisioningBC] CWPBioControl::RestoreMsgL 6 " ) );
+    
+    //Reset the cenrep so it can used for next message.		
+	 CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );	
+    TInt err = repository->Set(KOMAProvMessageOpen, 0); 
+    if(err != KErrNone)
+    	{
+    		FLOG( _L( "[ProvisioningBC] CWPBioControl::RestoreMsgL Set KOMAProvMessageOpen failed" ) );
+    	} 	     
+    CleanupStack::PopAndDestroy();
+    	
     // Empty messages are not supported
     if( iEngine->ItemCount() == 0 )
         {
@@ -396,7 +420,7 @@
         {
         iEngine->SetCurrentContextL( KWPMgrUidNoContext );
         }
-
+	
     CleanupStack::PopAndDestroy(2); // orig16, entry
     FLOG( _L( "[ProvisioningBC] CWPBioControl::RestoreMsgL done" ) );
     }
--- a/omaprovisioning/provisioning/ProvisioningBC/Src/CWPSaver.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningBC/Src/CWPSaver.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -19,7 +19,7 @@
 // INCLUDE FILES
 #include <AknQueryDialog.h>
 #include <eikprogi.h>
-#include <ProvisioningBC.rsg>
+#include <provisioningbc.rsg>
 #include <commdb.h>
 #include <CWPEngine.h>
 #include <CWPAdapter.h>
--- a/omaprovisioning/provisioning/ProvisioningCx/group/ProvisioningCx.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningCx/group/ProvisioningCx.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -65,7 +65,7 @@
 LIBRARY avkon.lib
 LIBRARY provisioningengine.lib
 LIBRARY bafl.lib
-LIBRARY commonengine.lib
+LIBRARY CommonEngine.lib
 LIBRARY featmgr.lib
 LIBRARY hlplch.lib
 LIBRARY apengine.lib
--- a/omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Group/ProvisioningEngine.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -70,7 +70,7 @@
 LIBRARY         etelmm.lib
 LIBRARY         inetprotutil.lib
 LIBRARY         sysutil.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 LIBRARY         edbms.lib
 LIBRARY         centralrepository.lib
 LIBRARY         cmmanager.lib 
--- a/omaprovisioning/provisioning/ProvisioningEngine/Inc/ProvisioningInternalCRKeys.h	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Inc/ProvisioningInternalCRKeys.h	Tue Sep 14 22:54:36 2010 +0300
@@ -35,6 +35,10 @@
 const TUint32 KOMAProvAuthenticationLVFlag 	= 0x00000001;
 const TUint32 KOMAProvAuthFailMsgHandling = 0x00000002;   
 const TUint32 KOMAProvOriginatorContent =  0x00000003;  
+const TUint32 KOMAProvIsUserPin =  0x00000004;  
+const TUint32 KOMAProvCriticalAdapterSettingCount =  0x00000005;  
+const TUint32 KOMAProvMessageOpen = 0x00000006;
+const TUint32 KOMAProvAllowCriticalAdapterSetting = 0x00000007;
 
 #endif      // PROVISIONINGINTERNALCRKEYS_H
 
--- a/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPPushMessage.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningEngine/Src/CWPPushMessage.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -1047,6 +1047,14 @@
             	{
             	if( aPIN.Length() == 0 )
                 	{
+                	TInt aSetAuthValue = 1;	
+                	CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );	
+                	TInt err = repository->Set(KOMAProvIsUserPin, aSetAuthValue);                	
+                	if(err != KErrNone)
+                		{
+                				FLOG( _L( "[Provisioning] CWPPushMessage::AuthenticateL: set KOMAProvIsUserPin Failed" ) );
+                		}
+                	CleanupStack::PopAndDestroy(); // repository
                 	result = KWPAuthResultPinRequired;
                 	FLOG( _L( "[Provisioning] CWPPushMessage::AuthenticateL: KWPAuthResultPinRequired" ) );
                 	}
@@ -1089,6 +1097,14 @@
             	{
 	            if( aPIN.Length() == 0 )
     	            {
+    	            TInt aSetAuthValue = 1;	
+                	CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );	
+                	TInt err = repository->Set(KOMAProvIsUserPin, aSetAuthValue);  
+                	if(err != KErrNone)
+                		{
+                				FLOG( _L( "[Provisioning] CWPPushMessage::AuthenticateL: set KOMAProvIsUserPin Failed" ) );
+                		}              	
+                	CleanupStack::PopAndDestroy(); // repository	
         	        result = KWPAuthResultPinRequired;
         	        FLOG( _L( "[Provisioning] CWPPushMessage::AuthenticateL: KWPAuthResultPinRequired" ) );
             	    }
@@ -1112,6 +1128,14 @@
             	}
             else
             	{
+              TInt aSetAuthValue = 1;	
+              CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );	
+              TInt err = repository->Set(KOMAProvIsUserPin, aSetAuthValue);    
+              if(err != KErrNone)
+                 		{
+                		FLOG( _L( "[Provisioning] CWPPushMessage::AuthenticateL: set KOMAProvIsUserPin Failed" ) );
+                		}	            
+              CleanupStack::PopAndDestroy(); // repository
             	result = KWPAuthResultNoAuthentication;	
             	FLOG( _L( "[Provisioning] CWPPushMessage::AuthenticateL: KWPAuthResultNoAuthentication" ) );
             	}            	
--- a/omaprovisioning/provisioning/ProvisioningHandler/Src/CWPMessage.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningHandler/Src/CWPMessage.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -154,7 +154,25 @@
         }
 
     FLOG( _L( "CWPMessage::ProcessL: Creating engine" ) );
-
+		
+				
+	  TInt value( 0 );
+    CRepository* rep = CRepository::NewLC( KOMAProvAuthenticationLV );	
+    	
+    TInt error = rep->Set(KOMAProvIsUserPin, value);              
+    if(error != KErrNone)
+    	{
+        FLOG( _L( "CWPMessage::ProcessL: set KOMAProvIsUserPin Failed" ) );
+      }
+    
+    error =  rep->Set(KOMAProvCriticalAdapterSettingCount, value);      
+    if(error != KErrNone)
+    	{
+        FLOG( _L( "CWPMessage::ProcessL: set KOMAProvCriticalAdapterSettingCount Failed" ) );
+      }
+      
+    CleanupStack::PopAndDestroy(); // rep
+    	
     // Read the message into the engine
     CWPEngine* engine = CWPEngine::NewLC(); // on CS
 
@@ -162,6 +180,7 @@
     engine->ImportDocumentL( iMessage->Body() );
 
     FLOG( _L( "CWPMessage::ProcessL: Populating adapters" ) );
+   	
     engine->PopulateL();
 
     FTRACE(RDebug::Print(_L(" WPMessage::ProcessL: Number of settings: (%d)"), engine->ItemCount()));
@@ -180,13 +199,41 @@
     FLOG( _L( "CWPMessage::ProcessL: Bootstrapping" ) );
     CWPBootstrap* bootstrap = CWPBootstrap::NewL( iPhone->SubscriberId() );
     CleanupStack::PushL( bootstrap );
-
+    	
     CWPBootstrap::TBootstrapResult result( 
         bootstrap->BootstrapL( *iMessage, *engine, KNullDesC ) );
     CleanupStack::PopAndDestroy(); // bootstrap
 
     FTRACE(RDebug::Print(_L(" WPMessage::ProcessL: Bootstrap result: (%d)"), result));
         // See UI specs figure 1 
+        
+	TInt adapterCount( 0 );
+	TInt userPin(0);
+	TInt allowCriticalSetting(0);
+	
+	CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );
+	TInt getErr = repository->Get( KOMAProvCriticalAdapterSettingCount, adapterCount);
+	if(getErr != KErrNone)
+    	{
+        FLOG( _L( "CWPMessage::ProcessL: set KOMAProvCriticalAdapterSettingCount Failed" ) );
+      }
+      
+  getErr = repository->Get( KOMAProvIsUserPin, userPin );  
+	if(getErr != KErrNone)
+      { 
+      FLOG( _L( "CWPMessage::PrepareEntryLC: set KOMAProvIsUserPin Failed" ) );
+      }
+  
+  getErr = repository->Get( KOMAProvAllowCriticalAdapterSetting, allowCriticalSetting );  
+	if(getErr != KErrNone)
+      { 
+      FLOG( _L( "CWPMessage::PrepareEntryLC: set KOMAProvIsUserPin Failed" ) );
+      }    
+	        
+	CleanupStack::PopAndDestroy(); // repository		
+		
+
+		    
     TBool haveSettings( engine->ItemCount() > 0 );
     switch( result )
         {
@@ -194,9 +241,24 @@
             {
             FLOG( _L( "CWPMessage::ProcessL: Bootstrapping ENoBootstrap" ) );
             // If there's no bootstrap, just save the message
-            if( haveSettings )
+            
+            if( haveSettings)
                 {
-                StoreMsgL();
+ 	               	 if(allowCriticalSetting)
+ 	               	 	{
+ 	               	 		if(!userPin)
+                			{
+                		 	StoreMsgL();
+                			}
+                			else if(adapterCount != engine->ItemCount())
+                			{
+                			StoreMsgL();
+                			}
+                		}
+                		else
+                		{
+                			StoreMsgL();
+                		}	
                 }
             else
                 {
@@ -208,36 +270,75 @@
         case CWPBootstrap::ENotAuthenticated:
             {
             FLOG( _L( "CWPMessage::ProcessL: Bootstrapping ENotAuthenticated" ) );
-            if( haveSettings )
-                {
-                StoreMsgL();
-                }
+            
+            if(haveSettings)
+            	{
+            		if(allowCriticalSetting)
+            			{
+            				if(adapterCount != engine->ItemCount())
+            					{
+            		       StoreMsgL();
+                			}
+              		}
+              		else
+              		{ 
+              		StoreMsgL();
+              		}
+              }
             else
             {
-                
             // Message is ignored and an information SMs is put to Inbox.
             //Information SMs can be Class0,  based on operator requirement.
-            TInt auth_value;
-            CRepository * rep = 0;
-            TRAPD( err, rep = CRepository::NewL( KCRUidOMAProvisioningLV ));
-            if(err == KErrNone)
-            {
-            	rep->Get( KOMAProvAuthFailMsgHandling, auth_value );
-            	delete rep;
+            if(allowCriticalSetting)
+            	{
+            		if(adapterCount != engine->ItemCount())
+            		{
+            		TInt auth_value;
+            		CRepository * rep = 0;
+            		TRAPD( err, rep = CRepository::NewL( KCRUidOMAProvisioningLV ));
+            			if(err == KErrNone)
+            			{
+            			rep->Get( KOMAProvAuthFailMsgHandling, auth_value );
+            			delete rep;
             	
-            	if(auth_value == 1)
-            	StoreMsgclass0L(R_TEXT_AUTHENTICATION_FAILED);
+            			if(auth_value == 1)
+            			StoreMsgclass0L(R_TEXT_AUTHENTICATION_FAILED);
+            			else
+            			StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);
+            	
+            			User::Leave( KErrAccessDenied ); 
+            			}
+            			else
+            			{
+            			StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);
+            			User::Leave( KErrAccessDenied );                         
+            			}
+            		}
+            	}
             	else
-            	StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);
+            	{
+            	TInt auth_value;
+            	CRepository * rep = 0;
+            	TRAPD( err, rep = CRepository::NewL( KCRUidOMAProvisioningLV ));
+            	if(err == KErrNone)
+            	{
+            		rep->Get( KOMAProvAuthFailMsgHandling, auth_value );
+            		delete rep;
             	
-            	User::Leave( KErrAccessDenied ); 
+            		if(auth_value == 1)
+            		StoreMsgclass0L(R_TEXT_AUTHENTICATION_FAILED);
+            		else
+            		StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);
+            	
+            		User::Leave( KErrAccessDenied ); 
+            	}
+            	else
+            	{
+            		StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);
+            		User::Leave( KErrAccessDenied );                         
+            	}
             }
-            else
-            {
-            StoreMsgL(R_TEXT_AUTHENTICATION_FAILED);
-            User::Leave( KErrAccessDenied );                         
-            }
-                }
+              }
             break;
             }
 
@@ -246,12 +347,26 @@
             FLOG( _L( "CWPMessage::ProcessL: Bootstrapping EPinRequired" ) );
             
             // If PIN is required, defer authentication to ProvisioningBC
-            if( haveSettings )
+            if(haveSettings)
                 {
-                StoreMsgL();
+                	if(allowCriticalSetting)
+                		{             			
+                			if(!userPin)
+                			{
+                			StoreMsgL();
+                			}
+                			else if(adapterCount != engine->ItemCount())
+                			{
+                			StoreMsgL();	
+                			}
+                		}
+                		else
+                		{
+                		StoreMsgL();
+                		}                			
                 }
             else
-                {
+                {              	            
                 User::Leave( KErrCorrupt );
                 }
             break;
@@ -571,6 +686,22 @@
     aEntry.iError = KErrNone;
     // iMtmData1 is been used/reserved for count, please don't use for any other purpose.
     aEntry.SetMtmData1(3);
+    aEntry.SetMtmData2(0);   
+
+    TInt userPin = 0;
+	  CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );
+	  TInt err = repository->Get( KOMAProvIsUserPin, userPin );
+	  if(err != KErrNone)
+      { 
+      FLOG( _L( "CWPMessage::PrepareEntryLC: set KOMAProvIsUserPin Failed" ) );
+      }
+	  CleanupStack::PopAndDestroy(); // repository	
+		
+	  if(userPin == 1)
+	    {			
+	    aEntry.SetMtmData2(1);		
+	    }
+				
     FLOG( _L( "CWPMessage::PrepareEntryLC create an invisible blank entry done" ) );
     // Look up the details
     HBufC* details = NULL;
--- a/omaprovisioning/provisioning/ProvisioningSC/Src/CWPBioMsgHandler.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningSC/Src/CWPBioMsgHandler.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -32,7 +32,7 @@
 #include	<smsclnt.h>
 #include	<smuthdr.h>
 #include	<smutset.h>
-#include	<ProvisioningSC.rsg> 
+#include	<provisioningsc.rsg> 
 #include	<pushmessage.h>
 #include	<e32std.h>  
 #include	<sysutil.h>
--- a/omaprovisioning/provisioning/ProvisioningSC/Src/CWPProvisioningSC.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/ProvisioningSC/Src/CWPProvisioningSC.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -25,7 +25,7 @@
 #include	<e32base.h>
 #include	<CWPEngine.h>
 #include	<AknGlobalNote.h> 
-#include	<ProvisioningSC.rsg>
+#include	<provisioningsc.rsg>
 #include	<WPAdapterUtil.h>
 #include	"MWPPhone.h"
 #include	"CWPPushMessage.h"
--- a/omaprovisioning/provisioning/WAPAdapter/Group/WPWAPAdapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/WAPAdapter/Group/WPWAPAdapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -64,7 +64,7 @@
 LIBRARY         msgs.lib
 LIBRARY         apengine.lib
 LIBRARY         commdb.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 LIBRARY         favouritesengine.lib
 LIBRARY         centralrepository.lib
 
--- a/omaprovisioning/provisioning/accesspointadapter/Src/CWPAPAdapter.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/accesspointadapter/Src/CWPAPAdapter.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -23,7 +23,7 @@
 
 #include <CWPCharacteristic.h>
 #include <commdb.h>
-#include <WPAPAdapterResource.rsg>
+#include <wpapadapterresource.rsg>
 #include <featmgr.h>					// Feature manager
 #include "WPAPUtil.h"
 #include "CWPAPAccesspointItem.h"
--- a/omaprovisioning/provisioning/accesspointadapter/Src/CWPAPNapdef.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/accesspointadapter/Src/CWPAPNapdef.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -23,7 +23,7 @@
 #include "CWPAPNapdef.h"
 #include <CWPCharacteristic.h>
 #include <CWPParameter.h>
-#include <WPAPAdapterResource.rsg>
+#include <wpapadapterresource.rsg>
 #include <featmgr.h>
 #include <WPAdapterUtil.h>
 #include "CWPAPAccesspointItem.h"
--- a/omaprovisioning/provisioning/accesspointadapter/group/WPAPAdapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/accesspointadapter/group/WPAPAdapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -61,13 +61,14 @@
 SYSTEMINCLUDE 	/epoc32/include/ecom
 
 LIBRARY         euser.lib
-LIBRARY         ProvisioningEngine.lib
+LIBRARY         provisioningengine.lib
 LIBRARY         apengine.lib
 LIBRARY         commdb.lib
-LIBRARY         FeatMgr.lib
+LIBRARY         featmgr.lib
 LIBRARY         ecom.lib
 LIBRARY 		centralrepository.lib
 LIBRARY			cmmanager.lib
+LIBRARY         policyengine.lib
 DEBUGLIBRARY    flogger.lib     // Only in debug builds
 
 // End of File
--- a/omaprovisioning/provisioning/alwaysonadapter/Group/alwaysonadapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/omaprovisioning/provisioning/alwaysonadapter/Group/alwaysonadapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -46,7 +46,7 @@
 
 LIBRARY         euser.lib
 LIBRARY         provisioningengine.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 LIBRARY         centralrepository.lib
 
 DEBUGLIBRARY    flogger.lib
Binary file omaprovisioning/provisioning/conf/s60provisioning.confml has changed
Binary file omaprovisioning/provisioning/conf/s60provisioning_101F87AA.crml has changed
--- a/policymanagement/dmutilserver/group/DMUtilServer.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/policymanagement/dmutilserver/group/DMUtilServer.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -75,7 +75,7 @@
 // S60
 LIBRARY         rfs.lib
 LIBRARY         sysutil.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 // TARM
 LIBRARY					policyengine.lib
 LIBRARY					centreptool.lib
--- a/policymanagement/policyengine/group/PolicyEngineUI.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/policymanagement/policyengine/group/PolicyEngineUI.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -56,7 +56,7 @@
 LIBRARY         bafl.lib
 LIBRARY         avkon.lib
 LIBRARY         cone.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 LIBRARY         eikcoctl.lib 
 LIBRARY	    		eikdlg.lib 
 LIBRARY         eikctl.lib
--- a/remotemgmt_plat/lawmo_plugin_api/inc/lawmointerface.h	Wed Sep 01 12:27:42 2010 +0100
+++ b/remotemgmt_plat/lawmo_plugin_api/inc/lawmointerface.h	Tue Sep 14 22:54:36 2010 +0300
@@ -65,7 +65,7 @@
 
 	};
 
-#include "LAWMOInterface.inl"
+#include "lawmointerface.inl"
 
 #endif  // _MLAWMOPLUGININTERFACE_H__
 
--- a/syncmlfw/common/alertqueue/bld/NSmlAlertQueue.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/alertqueue/bld/NSmlAlertQueue.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -65,7 +65,7 @@
 
 LIBRARY         euser.lib estor.lib bafl.lib efsrv.lib nsmlwbxml.lib
 LIBRARY		nsmlhistorylog.lib
-LIBRARY		nsmldssettings.lib
+LIBRARY		NSmlDSSettings.lib
 LIBRARY		nsmldmsettings.lib
 LIBRARY		nsmldshostclient.lib
 LIBRARY         nsmlagentcommon.lib
--- a/syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/alertqueue/src/NSmlDSAlertParser11.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -24,7 +24,7 @@
 #include <barsc.h>
 #include <s32mem.h>
 #include <data_caging_path_literals.hrh>
-#include <NSmlDSTypesRes.rsg>
+#include <nsmldstypesres.rsg>
 
 #include <nsmlconstants.h>
 #include <nsmlunicodeconverter.h>
--- a/syncmlfw/common/alertqueue/src/NSmlDSAlertParser12.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/alertqueue/src/NSmlDSAlertParser12.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -20,7 +20,7 @@
 #include <barsread.h>
 #include <barsc.h>
 #include <s32mem.h>
-#include <NSmlDSTypesRes.rsg>
+#include <nsmldstypesres.rsg>
 #include <data_caging_path_literals.hrh> 
 
 #include <nsmlconstants.h>
--- a/syncmlfw/common/obex/obexdmplugin/bld/nsmlobexdmplugin.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/obex/obexdmplugin/bld/nsmlobexdmplugin.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -77,7 +77,7 @@
 LIBRARY		nsmlobexcommserver.lib
 LIBRARY		ecom.lib			
 LIBRARY		nsmlxml.lib
-LIBRARY		nsmlprivateapi.lib
+LIBRARY		NSmlPrivateAPI.lib
 
 
 
--- a/syncmlfw/common/sosserver/bld/nsmlsosserver.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/sosserver/bld/nsmlsosserver.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -74,7 +74,7 @@
 SOURCE      	NSmlJobObject.cpp
 
 LIBRARY     	euser.lib estor.lib ecom.lib bafl.lib efsrv.lib nsmldebug.lib edbms.lib
-LIBRARY     	nsmldssettings.lib 
+LIBRARY     	NSmlDSSettings.lib 
 LIBRARY     	nsmldmsettings.lib 
 LIBRARY			nsmltransport.lib
 LIBRARY     	nsmltransporthandler.lib
--- a/syncmlfw/common/sosserver_clientapi/bld/NSmlClientAPI.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/sosserver_clientapi/bld/NSmlClientAPI.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -68,7 +68,7 @@
 SYSTEMINCLUDE	/epoc32/include/http
 SYSTEMINCLUDE	/epoc32/include/libc
 
-LIBRARY         euser.lib estor.lib FeatMgr.lib bafl.lib
+LIBRARY         euser.lib estor.lib featmgr.lib bafl.lib
 LIBRARY		eikcore.lib efsrv.lib ecom.lib
 LIBRARY		nsmltransporthandler.lib
 LIBRARY		nsmldebug.lib
--- a/syncmlfw/common/sosserver_transporthandler/src/NSmlTransportHandler.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/sosserver_transporthandler/src/NSmlTransportHandler.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -24,7 +24,7 @@
 #include <f32file.h>
 #include <SyncMLTransportProperties.h>
 #include <data_caging_path_literals.hrh> 
-#include <NSmlTransport.rsg>
+#include <nsmltransport.rsg>
 
 #include <nsmlconstants.h>
 #include "NSmlTransportHandler.h"
--- a/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/syncagent/bld/NSmlAgentCommon.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -79,7 +79,7 @@
 LIBRARY         inetprotutil.lib
 
 #ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
 #endif
 //RD_AUTO_RESTART
 LIBRARY         commdb.lib 
--- a/syncmlfw/common/transport/bld/nsmltransport.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/transport/bld/nsmltransport.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -47,17 +47,17 @@
 USERINCLUDE     ../inc ../../http/inc ../../inc ../../wbxml/inc ../../wbxml/inc/syncml ../../syncagent/inc ../../debug/inc
 USERINCLUDE      ../../obex/obexcommserver/inc ../../obex/obexserverbinding/inc ../../obex/obexclient/inc
 
-LIBRARY         euser.lib
+LIBRARY     euser.lib
 LIBRARY			bluetooth.lib
 LIBRARY			nsmldebug.lib
-LIBRARY 	commonengine.lib // 1.2 CHANGES: Offline mode
-LIBRARY         commdb.lib
-LIBRARY         apengine.lib
-LIBRARY	    CENTRALREPOSITORY.LIB
-LIBRARY			FeatMgr.lib
+LIBRARY 		CommonEngine.lib // 1.2 CHANGES: Offline mode
+LIBRARY     commdb.lib
+LIBRARY     apengine.lib
+LIBRARY	    centralrepository.lib
+LIBRARY			featmgr.lib
 
 #ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
 #endif
 
 SMPSAFE
--- a/syncmlfw/common/wbxml/bld/nsmlwbxml.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/wbxml/bld/nsmlwbxml.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -70,7 +70,7 @@
 LIBRARY         euser.lib estor.lib
 
 #ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
 #endif
 
 SMPSAFE
--- a/syncmlfw/common/xml/bld/nsmlxml.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/common/xml/bld/nsmlxml.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -64,7 +64,7 @@
 LIBRARY         nsmlwbxml.lib euser.lib estor.lib
 
 #ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
 #endif
 
 SMPSAFE
--- a/syncmlfw/dm/provisioningadapter/bld/NSmlDmProvisioningAdapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/dm/provisioningadapter/bld/NSmlDmProvisioningAdapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -50,7 +50,7 @@
 
 
 LIBRARY         euser.lib commdb.lib charconv.lib bafl.lib efsrv.lib apengine.lib
-LIBRARY         nsmldebug.lib syncmlclientapi.lib nsmlprivateapi.lib
+LIBRARY         nsmldebug.lib syncmlclientapi.lib NSmlPrivateAPI.lib
 LIBRARY         provisioningengine.lib featmgr.lib centralrepository.lib
 
 #ifdef ARMCC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/syncmlfw/dm/provisioningadapter/inc/ProvisioningInternalCRKeys.h	Tue Sep 14 22:54:36 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2004 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:  Provisioning internal Central Repository keys
+*
+*/
+
+
+#ifndef PROVISIONINGINTERNALCRKEYS_H
+#define PROVISIONINGINTERNALCRKEYS_H
+
+#include <e32def.h>
+
+/******************************************************************************
+* Provisioning Variation API
+* Keys under this category are used in defining Provisioning variation.
+*/
+const TUid KCRUidOMAProvisioningLV = {0x101F87AA};
+const TUid KOMAProvAuthenticationLV	= {0x101F87AA};
+
+/**
+* Provisioning Local Variation Flags. Values are defined in ProvisioningVariant.hrh.
+*/
+const TUint32 KOMAProvisioningLVFlag = 0x00000000;
+const TUint32 KOMAProvAuthenticationLVFlag 	= 0x00000001;
+const TUint32 KOMAProvAuthFailMsgHandling = 0x00000002;   
+const TUint32 KOMAProvOriginatorContent =  0x00000003;  
+const TUint32 KOMAProvIsUserPin =  0x00000004;
+const TUint32 KOMAProvCriticalAdapterSettingCount =  0x00000005;
+const TUint32 KOMAProvMessageOpen = 0x00000006;
+const TUint32 KOMAProvAllowCriticalAdapterSetting = 0x00000007;
+#endif      // PROVISIONINGINTERNALCRKEYS_H
+
+// End of file
--- a/syncmlfw/dm/provisioningadapter/src/NSmlDmProvisioningAdapter.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/dm/provisioningadapter/src/NSmlDmProvisioningAdapter.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -23,7 +23,7 @@
 #include <cdbcols.h>			 // CommsDB columname defs
 #include <stringresourcereader.h>
 #include <barsread.h>
-#include <NSmlDMProvisioningAdapter.rsg>
+#include <nsmldmprovisioningadapter.rsg>
 #include <f32file.h>
 #include <bautils.h>
 #include <ApUtils.h>
@@ -38,8 +38,9 @@
 #include <NSmlPrivateAPI.h>
 #include "NSmlDmProvisioningAdapter.h"
 #include "NSmlTransportHandler.h"
-
 #include <data_caging_path_literals.hrh>
+#include "ProvisioningInternalCRKeys.h"
+#include <centralrepository.h>
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -132,8 +133,24 @@
 // -----------------------------------------------------------------------------
 TInt CNSmlDmProvisioningAdapter::ItemCount() const
 	{
-	return iProfiles.Count();
-	}
+		  
+	  CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );	       
+	  TInt adapterCount( 0 );	  
+		TInt getErr = repository->Get( KOMAProvCriticalAdapterSettingCount, adapterCount);
+		if(getErr != KErrNone)
+    	{
+        _DBG_FILE("CWPMessage::ProcessL: get KOMAProvCriticalAdapterSettingCount Failed" );
+      }	
+    TInt criticalAdapterSettingCount =   adapterCount +  iProfiles.Count();    	
+    
+    TInt setErr = repository->Set(KOMAProvCriticalAdapterSettingCount, criticalAdapterSettingCount);      
+    if(setErr != KErrNone)
+      {
+    		_DBG_FILE("CNSmlDmProvisioningAdapter::ItemCount(): set KOMAProvCriticalAdapterSettingCount failed");
+    	}
+    CleanupStack::PopAndDestroy(); // repository         
+	  return iProfiles.Count();
+	 }
 
 // -----------------------------------------------------------------------------
 // CNSmlDmProvisioningAdapter::SummaryTitle
@@ -488,7 +505,39 @@
 
 	if(iState!=CNSmlDmProvisioningAdapter::EStateNull)
 		{
-		aCharacteristic.AcceptL( *this );
+		
+		TInt authType( 0 );
+		TInt allowCriticalSetting( 0 );
+		CRepository* repository = CRepository::NewLC( KOMAProvAuthenticationLV );
+		
+		TInt error = repository->Get( KOMAProvMessageOpen, authType );
+		if(error !=KErrNone)
+			{
+				_DBG_FILE("CNSmlDmProvisioningAdapter::VisitL Get KOMAProvMessageOpen Failed");
+			}			
+			
+		error = repository->Get( KOMAProvAllowCriticalAdapterSetting, allowCriticalSetting );
+		if(error !=KErrNone)
+			{
+				_DBG_FILE("CNSmlDmProvisioningAdapter::VisitL Get KOMAProvMessageOpen Failed");
+			}			
+		CleanupStack::PopAndDestroy(); // repository
+		
+		if(allowCriticalSetting)
+			{
+				if(authType != 1)
+				{			
+				aCharacteristic.AcceptL( *this );
+				}
+				else
+				{
+				iState = CNSmlDmProvisioningAdapter::EStateNull;			
+				}	
+			}
+			else
+			{
+				aCharacteristic.AcceptL( *this );
+			}
 		}
 	_DBG_FILE("CNSmlDmProvisioningAdapter::VisitL(CWPCharacteristic): end");
 	}
--- a/syncmlfw/dm/settings/src/NSmlDMSettings.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/dm/settings/src/NSmlDMSettings.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-#include <NSmlDMProfileRes.rsg>
+#include <nsmldmprofileres.rsg>
 #include <SyncMLDef.h>
 #include <utf.h>
 
--- a/syncmlfw/dm/wappushalert/bld/nsmldmwappushalert.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/dm/wappushalert/bld/nsmldmwappushalert.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -50,5 +50,5 @@
 LIBRARY         ecom.lib 
 LIBRARY         wappushutils.lib 
 LIBRARY         nsmldebug.lib
-LIBRARy		nsmlprivateapi.lib
+LIBRARy					NSmlPrivateAPI.lib
 SMPSAFE
--- a/syncmlfw/ds/adapters/dataproviderbase/bld/nsmldataproviderbase.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/adapters/dataproviderbase/bld/nsmldataproviderbase.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -43,5 +43,5 @@
 SYSTEMINCLUDE   	/epoc32/include/syncml 
 SYSTEMINCLUDE 		/epoc32/include/ecom
 
-LIBRARY			euser.lib estor.lib ECom.lib
+LIBRARY			euser.lib estor.lib ecom.lib
 
--- a/syncmlfw/ds/alerthandler/bld/nsmldsalert.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/alerthandler/bld/nsmldsalert.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -49,11 +49,11 @@
 LIBRARY         euser.lib    
 LIBRARY         estor.lib    
 LIBRARY         nsmldebug.lib    
-LIBRARY 	NSmlPrivateApi.lib
-LIBRARY         nsmldssettings.lib
+LIBRARY 				NSmlPrivateAPI.lib
+LIBRARY         NSmlDSSettings.lib
 LIBRARY         nsmlwbxml.lib
 LIBRARY         nsmlagentcommon.lib
-LIBRARY		ecom.lib
+LIBRARY					ecom.lib
 
 
 
--- a/syncmlfw/ds/dsutils/ProfileUtil/bld/NsmlProfileUtil.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/dsutils/ProfileUtil/bld/NsmlProfileUtil.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -38,7 +38,7 @@
 
 LIBRARY       euser.lib
 LIBRARY       estor.lib
-LIBRARY       nsmldssettings.lib
+LIBRARY       NSmlDSSettings.lib
 LIBRARY       centralrepository.lib
 LIBRARY       nsmldebug.lib
 
--- a/syncmlfw/ds/hostserver/dshostserverbase/bld/nsmldshostserver.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/hostserver/dshostserverbase/bld/nsmldshostserver.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -59,6 +59,6 @@
 LIBRARY		nsmlchangefinder.lib syncmldatafilter.lib
 
 #ifdef ARMCC
-LIBRARY ECOM.LIB
+LIBRARY ecom.lib
 #endif
 
--- a/syncmlfw/ds/netmon/bld/NetMon.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/netmon/bld/NetMon.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -40,7 +40,7 @@
 LIBRARY       flogger.lib
 LIBRARY       syncmlclientapi.lib
 LIBRARY       nsmltransporthandler.lib
-LIBRARY       nsmlprofileutil.lib
+LIBRARY       NsmlProfileUtil.lib
 LIBRARY       nsmldebug.lib
 LIBRARY       centralrepository.lib
 LIBRARY       efsrv.lib
--- a/syncmlfw/ds/provisioningadapter/bld/NSmlDsProvisioningAdapter.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/provisioningadapter/bld/NSmlDsProvisioningAdapter.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -49,8 +49,8 @@
 MW_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE	/epoc32/include/ecom
 
-LIBRARY     euser.lib ECom.lib commdb.lib charconv.lib apengine.lib
+LIBRARY     euser.lib ecom.lib commdb.lib charconv.lib apengine.lib
 LIBRARY     nsmldbcaps.lib bafl.lib efsrv.lib nsmldebug.lib syncmlclientapi.lib
-LIBRARY     ProvisioningEngine.lib  centralrepository.lib
+LIBRARY     provisioningengine.lib  centralrepository.lib
 
 SMPSAFE
--- a/syncmlfw/ds/provisioningadapter/src/NSmlDsProvisioningAdapter.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/provisioningadapter/src/NSmlDsProvisioningAdapter.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -24,7 +24,7 @@
 #include <utf.h>
 #include <stringresourcereader.h>
 #include <barsread.h>
-#include <NSmlDSProvisioningAdapter.rsg>
+#include <nsmldsprovisioningadapter.rsg>
 #include <bautils.h>
 #include <ApUtils.h>
 #include <barsc.h>
--- a/syncmlfw/ds/settings/src/NSmlDSSettings.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/settings/src/NSmlDSSettings.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 
-#include <NSmlDSProfileRes.rsg>
+#include <nsmldsprofileres.rsg>
 
 #include <nsmlconstants.h>
 #include <nsmldsconstants.h>
--- a/syncmlfw/ds/syncagent/bld/nsmldsagent.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/ds/syncagent/bld/nsmldsagent.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -78,7 +78,7 @@
 LIBRARY         nsmlagentlog.lib         
 LIBRARY         nsmldbcaps.lib
 LIBRARY         nsmlchangefinder.lib 
-LIBRARY         nsmldssettings.lib
+LIBRARY         NSmlDSSettings.lib
 LIBRARY         nsmlfilter.lib
 LIBRARY			nsmldshostclient.lib
 LIBRARY			nsmlhistorylog.lib
--- a/syncmlfw/syncmlnotifier/group/SyncMLNotifier.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/syncmlnotifier/group/SyncMLNotifier.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -57,7 +57,7 @@
 LIBRARY euser.lib cone.lib                  // Symbian OS framework libraries
 LIBRARY avkon.lib                           // UI library
 LIBRARY bafl.lib                            // Basic Application Framework Library
-LIBRARY commonengine.lib                    // Series 60 common components library
+LIBRARY CommonEngine.lib                    // Series 60 common components library
 LIBRARY charconv.lib                        // Character conversion library
 LIBRARY eikcoctl.lib eiksrv.lib             // Eikon libraries
 LIBRARY eikdlg.lib                          // Eikon libraries
--- a/syncmlfw/syncmlnotifier/src/SyncMLAppLaunchNotifier.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/syncmlnotifier/src/SyncMLAppLaunchNotifier.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -30,7 +30,7 @@
 #include <ecom/ecom.h>
 #include <centralrepository.h>
 #include <SyncMLNotifierDomainCRKeys.h>
-#include <SyncMLNotifier.rsg>           // Own resources
+#include <syncmlnotifier.rsg>           // Own resources
 #include "SyncMLAppLaunchNotifier.h"    // Class declaration
 #include "SyncMLTimedMessageQuery.h"
 #include "SyncMLTimedQueryDialog.h"
--- a/syncmlfw/syncmlnotifier/src/SyncMLDlgNotifier.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/syncmlnotifier/src/SyncMLDlgNotifier.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -31,7 +31,7 @@
 #include <avkon.mbg>
 #include <aknconsts.h>
 #include <utf.h>
-#include <SyncMLNotifier.rsg>   // Own resources
+#include <syncmlnotifier.rsg>   // Own resources
 #include "SyncMLDlgNotifier.h"  // Class definition
 #include "SyncMLTimedMessageQuery.h"
 #include "SyncMLAppLaunchNotifier.h"
--- a/syncmlfw/syncmlnotifier/src/SyncMLFwUpdNotifier.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/syncmlfw/syncmlnotifier/src/SyncMLFwUpdNotifier.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -31,7 +31,7 @@
 #include <centralrepository.h>
 #include <DevManInternalCRKeys.h>   
 #include <SyncMLNotifierDomainCRKeys.h> 
-#include <SyncMLNotifier.rsg>           // Own resources
+#include <syncmlnotifier.rsg>           // Own resources
 #include <aknnotewrappers.h>
 #include <e32property.h>
 
--- a/terminalsecurity/SCP/SCPClient/data/SCPNotifier.rss	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPClient/data/SCPNotifier.rss	Tue Sep 14 22:54:36 2010 +0300
@@ -114,6 +114,16 @@
     {
     buf = qtn_device_locked_remotely;
     }
+
+RESOURCE TBUF r_code_mismatch_discreet_popup_heading
+    {
+    buf = qtn_code_mismatch_discreet_popup_heading;
+    }
+
+RESOURCE TBUF r_code_mismatch_discreet_popup_text
+    {
+    buf = qtn_code_mismatch_discreet_popup_text;
+    }
     
 RESOURCE DIALOG r_dialog_warning
 {
--- a/terminalsecurity/SCP/SCPClient/group/SCPClient.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPClient/group/SCPClient.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -59,15 +59,14 @@
 LIBRARY         aknnotify.lib
 LIBRARY         eikdlg.lib
 LIBRARY         ws32.lib
-LIBRARY         commonengine.lib
+LIBRARY         CommonEngine.lib
 LIBRARY         bafl.lib
 LIBRARY					flogger.lib
 LIBRARY         featmgr.lib
 LIBRARY     centralrepository.lib  // CenRep
 LIBRARY					aknnotify.lib
 LIBRARY 		estor.lib
-LIBRARY     apgrfx.lib 
-
+LIBRARY     apgrfx.lib
 SMPSAFE
 
 // End of file
--- a/terminalsecurity/SCP/SCPClient/loc/SCPNotifier.loc	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPClient/loc/SCPNotifier.loc	Tue Sep 14 22:54:36 2010 +0300
@@ -44,5 +44,13 @@
 //d: The text informing user that phone is locked by an Operator server
 //l: popup_query_data_window
 #define qtn_device_locked_remotely "Locked by %U"
+//d: This popup heading string is to alert the user that he has entered a wrong lock code.
+//l: popup_query_data_window
+//r: 5.2
+#define qtn_code_mismatch_discreet_popup_heading "Wrong code"
+//d: This string would inform the user to try entering the lock code again.
+//l: popup_query_data_window
+//r: 5.2
+#define qtn_code_mismatch_discreet_popup_text "please try again"
 // End of File
 
--- a/terminalsecurity/SCP/SCPClient/src/SCPClient.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPClient/src/SCPClient.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -32,7 +32,7 @@
 #include "SCPQueryDialog.h"
 #include "SCPParamObject.h"
 
-#include <SCPNotifier.rsg>
+#include <scpnotifier.rsg>
 #include "SCP_IDs.h"
 
 #include <centralrepository.h>
@@ -40,7 +40,7 @@
 //#ifdef __SAP_DEVICE_LOCK_ENHANCEMENTS
 #include <TerminalControl3rdPartyAPI.h>
 #include <SCPServerInterface.h>
-#include <SecUi.rsg>
+#include <secui.rsg>
 #include <scptimestamppluginlang.rsg>
 #include <secui.hrh>
 #include <StringLoader.h>
--- a/terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPClient/src/SCPQueryDialog.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -22,11 +22,11 @@
 #include <StringLoader.h>
 #include <aknappui.h> 
 #include <avkon.rsg>
-#include <SecUi.rsg>
+#include <secui.rsg>
 // Include the SecUi definitions
 #include <secui.hrh>
 #include "SCPDebug.h"
-#include <SCPNotifier.rsg>
+#include <scpnotifier.rsg>
 // For Central Repository
 #include <centralrepository.h>
 #include <AknIncallBubbleNotify.h>
@@ -35,6 +35,7 @@
 #include "SCPCodePrivateCRKeys.h"
 #include <DevManInternalCRKeys.h>
 #include <featmgr.h>
+#include <aknglobalpopupprioritycontroller.h>
 
 /*#ifdef _DEBUG
 #define __SCP_DEBUG
@@ -282,13 +283,14 @@
 	Dprint((_L("CSCPQueryDialog::PreLayoutDynInitL(): EPSCTsyCallStateNone %d"), var));
 	
     // If the call is made during device startup have the priority as normal
-    if (iECSSupport)
-    {
+    if (iECSSupport) {
+    
         switch(var) {
             default:
             case EPSCTsyCallStateNone:
                 Dprint( (_L("CSCPQueryDialog::PreLayoutDynInitL(): Started Maximized...")));
                 iEikonEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront + 1);
+                AknGlobalPopupPriorityController :: SetPopupPriorityL(*this, 1);
                 iPrioritySet = ETrue;
                 break;
             case EPSCTsyCallStateAlerting:
@@ -309,35 +311,28 @@
                 }
             }
         }
+	        
+        Dprint( (_L("CSCPQueryDialog::PreLayoutDynInitL(): Changing Window Priority") ));
+        DrawableWindow()->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
+        ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
     }
-	        
-   // this must be done always to keep the reference count in synch  
-   // this does not have any effect if autoforwarding has not been set true (normal application.)
-   iEikonEnv->BringForwards(ETrue, ECoeWinPriorityAlwaysAtFront+1);
+    else {
+        AknGlobalPopupPriorityController :: SetPopupPriorityL(*this, 0);
+        DrawableWindow()->SetOrdinalPosition(0, ECoeWinPriorityNormal);
+        ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0, ECoeWinPriorityNormal);
+    }
 
-	/// -- Change Window Priority for dialog and CBA 
-	if (iECSSupport)
-		{
-		Dprint( (_L("CSCPQueryDialog::PreLayoutDynInitL(): Changing Window Priority") ));
-		DrawableWindow()->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
-		ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront);
-		}
-	else
-		{
-		DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityNormal + 1); //
-		ButtonGroupContainer().ButtonGroup()->AsControl()->DrawableWindow()->SetOrdinalPosition(0,ECoeWinPriorityNormal + 1);
-		}	
+    // this must be done always to keep the reference count in synch  
+    // this does not have any effect if autoforwarding has not been set true (normal application.)
+    iEikonEnv->BringForwards(ETrue, ECoeWinPriorityAlwaysAtFront+1);
 
-	Dprint( (_L("CSCPQueryDialog::PreLayoutDynInitL(): Key sounds") ));
-	// Key sounds
-
-	static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->
-	    PushContextL(R_AVKON_DEFAULT_SKEY_LIST);
-	    	                                                             
-	static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->BringToForeground();
-	static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->LockContext();
-
-	iFront = ETrue;
+    Dprint( (_L("CSCPQueryDialog::PreLayoutDynInitL(): Key sounds") ));
+    // Key sounds
+    static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->PushContextL(R_AVKON_DEFAULT_SKEY_LIST);
+    static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->BringToForeground();
+    static_cast<CAknAppUi*>(iEikonEnv->EikAppUi())->KeySounds()->LockContext();
+    iFront = ETrue;
+	
     TInt currentLawmoState(0); 
     Dprint( (_L("CSCPQueryDialog::lawmo cenrep") ));
     CRepository* crep = CRepository::NewLC( KCRUidDeviceManagementInternalKeys );
@@ -853,6 +848,7 @@
                         TryExitL(EAknSoftkeyCancel);
                     }
                     else {
+                        AknGlobalPopupPriorityController :: SetPopupPriorityL(*this, 1);
                         iEikonEnv->RootWin().SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront + 1);
                         iPrioritySet = ETrue;
                     }
--- a/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPHistoryPlugin.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPHistoryPlugin.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -23,7 +23,7 @@
 #include <SCPParamObject.h>
 
 #include "SCPHistoryPlugin.h"
-#include <SCPHistoryPluginLang.rsg>
+#include <scphistorypluginlang.rsg>
 #include "SCP_IDs.h"
 
 
--- a/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPSpecificStringsPlugin.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPHistoryPlugin/src/SCPSpecificStringsPlugin.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -23,7 +23,7 @@
 #include <SCPParamObject.h>
 
 #include "SCPSpecificStringsPlugin.h"
-#include <SCPHistoryPluginLang.rsg>
+#include <scphistorypluginlang.rsg>
 #include "SCP_IDs.h"
 #include <featmgr.h>
 
--- a/terminalsecurity/SCP/SCPPatternPlugin/src/SCPPatternPlugin.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPPatternPlugin/src/SCPPatternPlugin.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -24,7 +24,7 @@
 #include <featmgr.h>
 
 #include "SCPPatternPlugin.h"
-#include <SCPPatternPluginLang.rsg>
+#include <scppatternpluginlang.rsg>
 #include "SCP_IDs.h"
 
 
--- a/terminalsecurity/SCP/SCPServer/group/SCPServer.mmp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPServer/group/SCPServer.mmp	Tue Sep 14 22:54:36 2010 +0300
@@ -80,7 +80,7 @@
 #endif // SCP_USE_POLICY_ENGINE
 
 #ifdef SCP_SMS_LOCK_AVAILABLE
-LIBRARY    rlocksettings.lib
+LIBRARY    RLockSettings.lib
 #endif // SCP_SMS_LOCK_AVAILABLE
 
 //#ifdef __SAP_DEVICE_LOCK_ENHANCEMENTS
@@ -96,6 +96,7 @@
 LIBRARY     featmgr.lib
 LIBRARY 	estor.lib
 LIBRARY 	charconv.lib
+LIBRARY       policyengine.lib
 
 SMPSAFE
 
--- a/terminalsecurity/SCP/SCPServer/inc/SCPSession.h	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPServer/inc/SCPSession.h	Tue Sep 14 22:54:36 2010 +0300
@@ -26,6 +26,7 @@
 
 #include "SCPServerInterface.h"
 #include "SCPTimer.h"
+#include <PolicyEngineClient.h>
 
 #include <TerminalControl3rdPartyParamsPlugin.h>
 // FORWARD DECLARATIONS
@@ -278,6 +279,10 @@
         * @return none
         */
         void NotifyChangeL( TInt aParamID, const TDesC8 aParamVal, TUint32 aCallerID );        
+        
+        // Check whether the SID is present in the TARM db
+        
+        TInt CheckTerminalControl3rdPartySecureIDL(TSecureId aId);
 
     private:   // Data
        // Possible states for iLockCommandState
@@ -325,6 +330,9 @@
     	/* The SID of the app that set the above two (iALParamID, iALParamValue) fields
     	 */
     	TUint32 iALParamCallerID;
+        
+    	RPolicyEngine   iPE;
+        RPolicyRequest  iPR;
     };
 
 #endif      // SCPSESSION_H   
--- a/terminalsecurity/SCP/SCPServer/src/SCPSession.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPServer/src/SCPSession.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -50,6 +50,8 @@
 #include <TerminalControl3rdPartyAPI.h>
 #include <TerminalControl3rdPartyParamsPlugin.h>
 #include <utf.h>
+
+#include <PolicyEngineXACML.h>
 // ================= MEMBER FUNCTIONS =======================
 
 // C++ default constructor can NOT contain any code, that
@@ -69,6 +71,8 @@
 // Symbian 2nd phase constructor can leave.
 void CSCPSession::ConstructL()
     {
+    User::LeaveIfError( iPE.Connect() );
+    User::LeaveIfError( iPR.Open( iPE ) );
     iServer.SessionOpened();
     }
 
@@ -113,7 +117,8 @@
     if(iALParamValue) {
 		delete iALParamValue;		
     }
-        
+    iPR.Close();
+	iPE.Close();    
     Dprint( (_L("<-- CSCPSession::~CSCPSession()")) );   
     }
 
@@ -851,7 +856,9 @@
 	}
     
     TSecureId id = aMessage.SecureId();
-	
+    TBool hasAllFilesCap = aMessage.HasCapability(ECapabilityAllFiles);
+    TBool hasDiskAdminCap = aMessage.HasCapability(ECapabilityDiskAdmin);
+    
     switch(id.iId) {
         case KSCPServerSIDAutolock:
         case KAknNfySrvUid:
@@ -860,10 +867,23 @@
         case KSCPServerSIDTerminalControl:
         case KSCPServerSIDTelephone:
         case KSCPServerSIDLog:
+            {
+            Dprint( (_L("[CSCPSession]-> fixed sid's") ));
             break;
+            }
         default: {
+        TInt retVal = CheckTerminalControl3rdPartySecureIDL(id);
+        Dprint(_L("[CSCPSession]->CheckTerminalControl3rdPartySecureIDL retval %d"), retVal);
+        if(((retVal==KErrNone)&&(hasDiskAdminCap))||(hasAllFilesCap))
+            {
+            Dprint( (_L("[CSCPSession]-> sid is 3rd party or has AllFiles") ));
+            break;
+            }
+        else
+            {
             Dprint( (_L("[CSCPSession]-> ERROR: Permission denied") ));
-        User::Leave( KErrPermissionDenied );
+            User::Leave( KErrPermissionDenied );
+            }
         }
     };
 	
@@ -1680,3 +1700,36 @@
 	Dprint(_L("[CSCPSession]->INFO: Notification to all the StakeHolders complete..."));
 	CleanupStack :: PopAndDestroy(); //lChangeArray
 }
+// -------------------------------------------------------------------------------------
+// CTcTrustedSession::CheckTerminalControl3rdPartySecureIDL
+// -------------------------------------------------------------------------------------   
+TInt CSCPSession::CheckTerminalControl3rdPartySecureIDL(TSecureId aId)
+    {
+    Dprint(_L("TerminalControl: [CSCPSession]CheckTerminalControl3rdPartySecureIDL"));    
+    TRequestContext context;
+    TResponse response;
+    TUid secureId = TUid::Uid(aId.iId);
+    context.AddSubjectAttributeL(
+        PolicyEngineXACML::KSubjectId, secureId
+        );
+    context.AddResourceAttributeL(
+        PolicyEngineXACML::KResourceId,
+        PolicyEngineXACML::KThirdPartySecureIds,
+        PolicyEngineXACML::KStringDataType
+        );
+    User::LeaveIfError( iPR.MakeRequest( context, response ) );
+    TResponseValue resp = response.GetResponseValue();
+    Dprint(_L("[CSCPSession]->CheckTerminalControl3rdPartySecureIDL Policy check returned %d"), (TInt)resp);
+    switch( resp )
+        {
+        case EResponsePermit:
+            return KErrNone;
+        case EResponseDeny:
+            case EResponseIndeterminate:
+            case EResponseNotApplicable:
+            default:
+                User::Leave( KErrAccessDenied );
+        }
+        
+      return KErrAccessDenied;
+    }
--- a/terminalsecurity/SCP/SCPTimestampPlugin/src/SCPTimestampPlugin.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPTimestampPlugin/src/SCPTimestampPlugin.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -21,7 +21,7 @@
 #include <e32std.h>
 #include <ecom/implementationproxy.h>
 #include <SCPParamObject.h>
-#include <SCPTimestampPluginLang.rsg>
+#include <scptimestamppluginlang.rsg>
 #include "SCP_IDs.h"
 #include <bautils.h>
 #include <hal.h>
--- a/terminalsecurity/SCP/SCPTimestampPlugin/src/SCPUserInf.cpp	Wed Sep 01 12:27:42 2010 +0100
+++ b/terminalsecurity/SCP/SCPTimestampPlugin/src/SCPUserInf.cpp	Tue Sep 14 22:54:36 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 #include "SCPUserInf.h"
-#include <SCPTimestampPluginLang.rsg>
+#include <scptimestamppluginlang.rsg>
 
 #include <AknGlobalNote.h>
 #include <aknnotewrappers.h>