Revision: 201013 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 15:46:55 +0300
branchRCL_3
changeset 19 f2fc39bc30a5
parent 16 4eb398b07b07
child 20 f6aa907032f4
Revision: 201013 Kit: 201015
applicationmanagement/server/group/ApplicationManagementServer.mmp
applicationmanagement/server/src/AMDeploymentComponent.cpp
omadm/omadmextensions/adapters/fota/src/nsmldmfotaadapter.cpp
--- a/applicationmanagement/server/group/ApplicationManagementServer.mmp	Wed Mar 31 21:15:36 2010 +0300
+++ b/applicationmanagement/server/group/ApplicationManagementServer.mmp	Wed Apr 14 15:46:55 2010 +0300
@@ -123,6 +123,7 @@
  LIBRARY 				nsmldmtreedbclient.lib connmon.lib commonengine.lib
  LIBRARY     		nsmltransporthandler.lib
 LIBRARY     		nsmltransport.lib cone.lib javaregistryclient.lib avkon.lib eikcore.lib  apparc.lib
+LIBRARY					apmime.lib
 #endif // __TARM_SYMBIAN_CONVERGENCY
 
 #ifdef __JAVA_MIDP20
--- a/applicationmanagement/server/src/AMDeploymentComponent.cpp	Wed Mar 31 21:15:36 2010 +0300
+++ b/applicationmanagement/server/src/AMDeploymentComponent.cpp	Wed Apr 14 15:46:55 2010 +0300
@@ -28,6 +28,9 @@
 #include <CMenuClient.h>
 #endif
 #include "amsmlhelper.h"
+#include "APGCLI.H"
+#include "APMREC.h"
+#include "APMSTD.H"
 
 using namespace NApplicationManagement;
 
@@ -703,9 +706,27 @@
     {
     RDEBUG( "CDeploymentComponent::SuccessStatusUpdateL : start");
     SetDataL(aDlFileName, aDlMimeType);
-
+    
+    TBuf<256> FileType;
+    TBuf8<256> FileType8;
+    
+    RApaLsSession RSession;      
+    if(RSession.Connect() == KErrNone)        
+        {           
+        TDataRecognitionResult FileDataType;         
+        RSession.RecognizeData(aDlFileName,iData->Data(),*&FileDataType);        
+              
+            FileType.Copy(FileDataType.iDataType.Des());          
+                  
+        }
+    RSession.Close();
+    
+    FileType8.Copy(FileType);
+    
+    SetDataL(FileType8);
+    
     // Set PkgID same as MiME type of downloaded content
-    SetPkgTypeL(aDlMimeType);
+    SetPkgTypeL(FileType8);
 
     CDeploymentComponent* conflict( NULL);
     TBool dlOk(ETrue);
@@ -719,7 +740,7 @@
     else
         {
         RDEBUG( "CDeploymentComponent::StatusUpdateL - WARNING cannot detect uid" );
-        if (IsJavaMimeL(aDlMimeType) ||IsSisMimeL(aDlMimeType) )
+        if (IsJavaMimeL(FileType8) ||IsSisMimeL(FileType8) )
             {
             RDEBUG( "CDeploymentComponent::StatusUpdateL - Ignoring prev warning because it's java" );
             }
--- a/omadm/omadmextensions/adapters/fota/src/nsmldmfotaadapter.cpp	Wed Mar 31 21:15:36 2010 +0300
+++ b/omadm/omadmextensions/adapters/fota/src/nsmldmfotaadapter.cpp	Wed Apr 14 15:46:55 2010 +0300
@@ -1111,6 +1111,22 @@
             RFotaEngineSession::TState state = iFotaEngine.GetState( id );
             data = HBufC8::NewL( KNSmlFwMgmtObjectIntegerLength );
             data->Des().AppendNum( state );
+            
+            TInt configFlags( KErrNone );        
+           CRepository* centrep = NULL;
+           TRAPD( err, centrep = CRepository::NewL( KCRUidDeviceManagementInternalKeys ) );        
+           if ( err == KErrNone && centrep ) 
+               {
+               configFlags = 2; //means fota operation
+               centrep->Set( KDevManSessionType, configFlags );
+               delete centrep;
+               centrep = NULL;
+               }
+           else
+               {
+               User::Leave( err );
+               }
+        
             }
         
         // if data is fetched ok, set results