Revision: 201003 PDK_3.0.g
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 00:03:17 +0200
changeset 4 75a71fdb4c92
parent 3 ecc2fefbdf1d
child 8 0a8136f75056
child 9 db6d61d7814f
child 10 3ccc3d6bdea2
child 18 7d11f9a6646f
Revision: 201003 Kit: 201005
applicationmanagement/omascomoadapter/group/omascomoadapter.mmp
applicationmanagement/omascomoadapter/src/omascomoadapter.cpp
applicationmanagement/server/src/AMDownloader.cpp
omadm/omadmappui/help/inc/dm.hlp.hrh
omadm/omadmextensions/adapters/dcmodmadapter/group/dcmodmadapter.mmp
omadm/omadmextensions/adapters/dcmodmadapter/inc/dcmodmadapter.h
omadm/omadmextensions/adapters/dcmodmadapter/src/dcmodmadapter.cpp
--- a/applicationmanagement/omascomoadapter/group/omascomoadapter.mmp	Tue Jan 26 11:46:52 2010 +0200
+++ b/applicationmanagement/omascomoadapter/group/omascomoadapter.mmp	Tue Feb 02 00:03:17 2010 +0200
@@ -79,5 +79,6 @@
 LIBRARY		nsmldmiapmatcher.lib apgrfx.lib ws32.lib 
 #endif
 
-	
+SMPSAFE
+
 // End of File
--- a/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp	Tue Jan 26 11:46:52 2010 +0200
+++ b/applicationmanagement/omascomoadapter/src/omascomoadapter.cpp	Tue Feb 02 00:03:17 2010 +0200
@@ -1037,7 +1037,9 @@
             TPckg<TCertInfo> pcert(info);
             errx = re->Get(KCertKey, pcert) ;
 
-            RDEBUG_2("aCertInfo.iFingerprint.Length() is  %u",info.iFingerprint.Length() );
+            RDEBUG("CSCOMOAdapter::SessionL() aCertInfo");
+
+            //RDEBUG_2("aCertInfo.iFingerprint.Length() is  %u",info.iFingerprint.Length() );
             if (errx == KErrNone)
                 {
                 RDEBUG("CSCOMOAdapter::SessionL() errx == KErrNone");
--- a/applicationmanagement/server/src/AMDownloader.cpp	Tue Jan 26 11:46:52 2010 +0200
+++ b/applicationmanagement/server/src/AMDownloader.cpp	Tue Feb 02 00:03:17 2010 +0200
@@ -226,6 +226,8 @@
         RProperty::Get(KUidPSApplicationManagementKeys,
                 KAMOperationNonSilent, operNonSilent);
 
+         RDEBUG_2( "CAMDownloader::Value of operNonSilent '%d'", operNonSilent );
+
         if (operNonSilent==1 || operNonSilent==KErrNotFound)
             {
             TApaTaskList taskList(CEikonEnv::Static()->WsSession() );
@@ -237,6 +239,15 @@
                 task.BringToForeground();
 
             }
+         else
+            {
+			RDEBUG( "CAMDownloadManager::HandleAlreadyRunningL - CreateAndUpdateProgressDialogL UI enabled = 0" );
+
+		    TInt UIenabled = 0;
+			TInt err = RProperty::Set(KUidPSApplicationManagementKeys,
+			                KAMServerUIEnabled, UIenabled);
+        	User::LeaveIfError(err); // invalid
+			}
 
         iProgStarted = 1;
         }
--- a/omadm/omadmappui/help/inc/dm.hlp.hrh	Tue Jan 26 11:46:52 2010 +0200
+++ b/omadm/omadmappui/help/inc/dm.hlp.hrh	Tue Feb 02 00:03:17 2010 +0200
@@ -2,9 +2,9 @@
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of the License "Symbian Foundation License v1.0"
+* under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
--- a/omadm/omadmextensions/adapters/dcmodmadapter/group/dcmodmadapter.mmp	Tue Jan 26 11:46:52 2010 +0200
+++ b/omadm/omadmextensions/adapters/dcmodmadapter/group/dcmodmadapter.mmp	Tue Feb 02 00:03:17 2010 +0200
@@ -48,6 +48,7 @@
 STATICLIBRARY   dmutils.lib
 LIBRARY         charconv.lib
 LIBRARY					dcmoclient.lib
+LIBRARY					policyengine.lib
 LIBRARY					nsmldebug.lib
 
 
--- a/omadm/omadmextensions/adapters/dcmodmadapter/inc/dcmodmadapter.h	Tue Jan 26 11:46:52 2010 +0200
+++ b/omadm/omadmextensions/adapters/dcmodmadapter/inc/dcmodmadapter.h	Tue Feb 02 00:03:17 2010 +0200
@@ -498,7 +498,14 @@
     	* @param aError A system wide error code.
     	* @return A TError value depending on aError.
     	*/
-    CSmlDmAdapter::TError MapErrorToStatus( TInt aError ) const;     
+    		CSmlDmAdapter::TError MapErrorToStatus( TInt aError ) const;     
+    	
+    	/**
+	    * This function returns the dcmo enforcement 
+	    * @param None
+	    * @return TBool true if dcmo enforcement or false
+	    */        	
+    	TBool CheckEnforcementL();
                                 
     private: // Constructor
         /**
--- a/omadm/omadmextensions/adapters/dcmodmadapter/src/dcmodmadapter.cpp	Tue Jan 26 11:46:52 2010 +0200
+++ b/omadm/omadmextensions/adapters/dcmodmadapter/src/dcmodmadapter.cpp	Tue Feb 02 00:03:17 2010 +0200
@@ -23,6 +23,7 @@
 #include <e32base.h>
 #include <ecom.h>
 #include <utf.h>
+#include <SettingEnforcementInfo.h> // DCMO Enforcement
 #include "nsmldebug.h"
 #include "dcmodmadapter.h"
 #include "dcmointerface.h"
@@ -274,6 +275,17 @@
     _DBG_FILE( "CDcmoDMAdapter::FetchLeafObjectL - begin"  );
     MSmlDmAdapter::TError retValue = CSmlDmAdapter::EOk; 
 		TDCMOStatus err (EDcmoFail);
+		
+    TBool dcmoEnforce=EFalse;
+	  TRAPD(eError, dcmoEnforce =CheckEnforcementL())
+	  if(!(eError==KErrNone && dcmoEnforce))
+	  {
+	  	 // Respond
+	  	retValue = CSmlDmAdapter::ENotAllowed;
+  		Callback().SetStatusL( aStatusRef, retValue );
+  		return;
+	  }
+    
 		TBuf<MAXBUFLEN> iName;
 		
 		TPtrC8 category = GetCategoryFromUriL( aURI );
@@ -512,6 +524,17 @@
     _DBG_FILE( "CDcmoDMAdapter::ExecuteCommandL - begin"  );
    	MSmlDmAdapter::TError status = CSmlDmAdapter::EOk;
     TInt err (EDcmoFail);
+    
+    TBool dcmoEnforce=EFalse;
+	  TRAPD(eError, dcmoEnforce =CheckEnforcementL())
+	  if(!(eError==KErrNone && dcmoEnforce))
+	  {
+	  	 // Respond
+	  	status = CSmlDmAdapter::ENotAllowed;
+  		Callback().SetStatusL( aStatusRef, status );
+  		return;
+	  }
+	  
 		TBuf<MAXBUFLEN> iName;
 		TPtrC8 category = GetCategoryFromUriL( aURI );
 		iName.Copy ( category );		
@@ -886,4 +909,18 @@
 
 }
 
+//----------------------------------------------------------------------
+// TBool CDcmoDMAdapter::CheckEnforcementL()
+// If DCMO policy is enforced true is returned else false
+//----------------------------------------------------------------------
+TBool CDcmoDMAdapter::CheckEnforcementL()
+{
+    CSettingEnforcementInfo* info = CSettingEnforcementInfo::NewL();
+    CleanupStack::PushL(info);
+    TBool enforceActive ( EFalse );
+    User::LeaveIfError(info->EnforcementActive(EDCMOEnforcement, enforceActive));
+    CleanupStack::PopAndDestroy(info);
+    return enforceActive;
+}
+    
 // End of File