applicationmanagement/server/src/AMDeploymentComponentData.cpp
branchRCL_3
changeset 58 5b858729772b
parent 57 6757f1e2efd2
--- a/applicationmanagement/server/src/AMDeploymentComponentData.cpp	Tue Aug 31 15:05:55 2010 +0300
+++ b/applicationmanagement/server/src/AMDeploymentComponentData.cpp	Wed Sep 01 12:31:32 2010 +0100
@@ -15,12 +15,15 @@
  *
  */
 
+#include "amdeploymentcomponentdata.h"
+
 #include <bautils.h>
+#include <sisdataprovider.h>
+
 #include <DRMLicenseManager.h>
+#include "debug.h"
 #include <pathinfo.h>
 #include <zipfilemember.h>
-#include "amdeploymentcomponentdata.h"
-#include "debug.h"
 
 _LIT8( KSisxMimeType, "x-epoc/x-sisx-app" );
 _LIT( KTempDir, "piptemp\\" );
@@ -28,9 +31,6 @@
 _LIT8( KDrmMessageMimeType, "application/vnd.oma.drm.message" );
 _LIT8( KDrmContentMimeType, "application/vnd.oma.drm.content" );
 _LIT8( KSisMimeType, "application/vnd.symbian.install");
-_LIT8( KJadMIMEType, "text/vnd.sun.j2me.app-descriptor" );
-_LIT8( KJarMIMEType, "application/java-archive" );
-_LIT8( KJavaMIMEType, "application/java" );
 
 using namespace NApplicationManagement;
 
@@ -45,6 +45,7 @@
         const TDesC8 &aDataFile) :
     iDataFileName(aDataFile), iType(aType)
     {
+
     }
 
 void CDeploymentComponentData::ConstructL(const TDesC8 &aData,
@@ -209,72 +210,11 @@
     TUid ret(TUid::Null());
     iMimeType = aMimeType.Left(KMaxMimeLength);
 
-    if (aMimeType.Length()!=NULL)
-        {
-        TUid ret(TUid::Null());
-        RFs fs;
-        User::LeaveIfError(fs.Connect());
-        CleanupClosePushL(fs);
-        CFileMan *fm = CFileMan::NewL(fs);
-        CleanupStack::PushL(fm);
-        TFileName oldfilepath;
-        oldfilepath.Copy(iDataFileName);
-        
-        
-        RDEBUG("App Mgmt before copy start");
-        TInt maxLength = iDataFileName.Length();
-        TChar charvaldot = '.';
-        TChar charvalslash = '\\';
-        //TFileName oldfilepath;
-        TInt pos = iDataFileName.LocateReverse(charvaldot);
-
-        TInt lengthDeleted = maxLength - pos;
-
-        iDataFileName.Delete(pos, lengthDeleted);
-        
-        if (iMimeType == KSisxMimeType)
-            {
-            _LIT16(KExt,".sisx");
-            iExtn.Append(KExt);
-            }
-        if(iMimeType==KSisMimeType)
-            {
-            _LIT16(KExt,".sis");
-            iExtn.Append(KExt);
-            }
-        if(iMimeType==KPipMimeType)
-            {
-            _LIT16(KExt,".pip");
-            iExtn.Append(KExt);
-            }
-        if(iMimeType==KJadMIMEType)
-            {
-            _LIT16(KExt,".jad");
-            iExtn.Append(KExt);
-            }
-        if(iMimeType==KJarMIMEType)
-            {
-            _LIT16(KExt,".jar");
-            iExtn.Append(KExt);
-            }
-        if(iMimeType==KJavaMIMEType)
-            {
-            _LIT16(KExt,".jar");
-            iExtn.Append(KExt);
-            }
-        iDataFileName.Append(iExtn);//file name with sisx extension
-        TFileName newfilepath;
-        newfilepath.Copy(iDataFileName);
-        User::LeaveIfError(fm->Rename(oldfilepath, newfilepath));
-        CleanupStack::PopAndDestroy(fm);
-        CleanupStack::PopAndDestroy( &fs);
-        //RDEBUG_2(" filename: %S", iDataFileName );
-        }
     if (IsSISInstallFile(aMimeType) )
         {
         RFs fs;
         User::LeaveIfError(fs.Connect() );
-        CleanupClosePushL(fs);     
+        CleanupClosePushL(fs);
         ret = ResolveUidL(fs);
         CleanupStack::PopAndDestroy( &fs);
         }
@@ -286,8 +226,6 @@
         const TDesC8& aMimeType)
     {
     RDEBUG_2("CDeploymentComponentData::SetDataL() TFileName: (%S)", &aData);
-    
-    _LIT(KNewPath, "c:\\private\\200267FB\\");
 
     TUid ret(TUid::Null());
     iMimeType = aMimeType.Left(KMaxMimeLength) ;
@@ -298,41 +236,7 @@
     CleanupStack::PushL(fm);
     TFileName fn;
     fn.Copy(iDataFileName);
-
-    RDEBUG("App Mgmt before copy start");
-
-    
-    TInt maxLength = iDataFileName.Length();
-    TChar charvaldot = '.';
-    TChar charvalslash = '\\';
-    
-    TInt pos = iDataFileName.LocateReverse(charvaldot);
-    
-    TInt lengthDeleted = maxLength-pos;
-    
-    iDataFileName.Delete(pos, lengthDeleted);
-    
-    TInt srcpos = aData.LocateReverse(charvaldot);
-    
-    TBuf<15> extn(aData.Mid(srcpos));
-    
-    iDataFileName.Append(extn);
-    
-    TFileName newfilepath;
-    newfilepath.Copy(iDataFileName);
-    
-    User::LeaveIfError(fm->Move(aData,KNewPath()));
-    
-    TFileName oldfilepath(KNewPath());
-    oldfilepath.Append(aData.Mid(aData.LocateReverse(charvalslash)));
-    
-    User::LeaveIfError(fm->Rename(oldfilepath, newfilepath));
-   
-    
-    //User::LeaveIfError(fm->Copy(aData, fn) );
-
-    RDEBUG("App Mgmt before copy End");
-
+    User::LeaveIfError(fm->Copy(aData, fn) );
 
     if (IsSISInstallFile(aMimeType) )
         {