applicationmanagement/server/src/AMDeploymentComponent.cpp
branchRCL_3
changeset 24 6757f1e2efd2
parent 17 7f4d10e92162
child 25 5b858729772b
--- a/applicationmanagement/server/src/AMDeploymentComponent.cpp	Thu Aug 19 09:42:30 2010 +0300
+++ b/applicationmanagement/server/src/AMDeploymentComponent.cpp	Tue Aug 31 15:05:55 2010 +0300
@@ -15,22 +15,21 @@
  *
  */
 
-#include "AMDownload.h"
-#include "AMDeploymentComponent.h"
-#include "debug.h"
 #include <e32debug.h>
 #include <s32mem.h>
 #include <featmgr.h>
-#include "amprivateCRKeys.h"
-//#include "aminstalloptions.h"
-#include <ssl.h>	
+#include <ssl.h>
+#include <apgcli.h>
+#include <apmrec.h>
+#include <apmstd.h>
 #ifdef __SERIES60_30__
 #include <CMenuClient.h>
 #endif
 #include "amsmlhelper.h"
-#include "apgcli.h"
-#include "apmrec.h"
-#include "apmstd.h"
+#include "amprivateCRKeys.h"
+#include "AMDeploymentComponent.h"
+#include "debug.h"
+
 
 using namespace NApplicationManagement;
 
@@ -129,6 +128,8 @@
         iPkgIDRef = aData.PkgIDRef();
         iPkgType = aData.PkgType();
         iRemovableApp = aData.AppRemovable();
+        iDriveSelection = aData.DriveSelected();
+        iComponentId = aData.iComponentId;
         iInstallOptsSet = aData.InstallOptsSet();
         iPkgVersion = aData.iPkgVersion;
         iDownloadStatus = aData.iDownloadStatus;
@@ -253,11 +254,11 @@
     // iUserId , iState, iPkgVer, iUid, iIdLen, iNameLen, iVersLen, iDownState, iOwner, iOldState ,iDownUriLen, iInstallOptsset
     return (20*4)+iUserId.Length() + iId.Length() + iName.Length()
             + iVersion.Length() +
-
+            
     iMidletName.Length() + iMideltVendorName.Length()
             + iMidletVersion.Length()+ iDownloadURI.Length()
             + iDescription.Length()+ iPkgID.Length()+iPkgIDRef.Length()
-            +iPkgType.Length()+ sizeof(iRemovableApp) + iData->SerializedFormLength()
+            +iPkgType.Length()+ sizeof(iRemovableApp)+sizeof(iDriveSelection)+sizeof(iComponentId) + iData->SerializedFormLength()
             + iMetaData->SerializedFormLength() + sizeof(TAMInstallOptions);
     }
 
@@ -304,6 +305,8 @@
     aBuffer.WriteUint32L(iPkgType.Length() );
     aBuffer.WriteL(iPkgType);
     aBuffer.WriteUint32L(iRemovableApp);
+    aBuffer.WriteUint32L(iDriveSelection);
+    aBuffer.WriteInt32L(iComponentId);
     iData->SerializedFormL(aBuffer);
     iMetaData->SerializedFormL(aBuffer);
     aBuffer.WriteUint32L(iInstallOptsSet);
@@ -373,6 +376,8 @@
     stream.ReadL(iPkgType, len);
 
     iRemovableApp = stream.ReadUint32L();
+    iDriveSelection = stream.ReadUint32L();
+    iComponentId = stream.ReadInt32L();
     iData = CDeploymentComponentData::LoadL(stream);
     iMetaData = CDeploymentComponentData::LoadL(stream);
 
@@ -423,6 +428,15 @@
     return iRemovableApp;
     }
 
+TBool CDeploymentComponent::DriveSelected() const
+        {
+        return iDriveSelection;
+        }
+
+TInt CDeploymentComponent::GetComponentId() const
+        {
+        return iComponentId;
+        }
 void CDeploymentComponent::SetMetaDataL(const TDesC8 &aMimeType)
     {
     iMetaData->DataFileName();
@@ -440,6 +454,11 @@
     iRemovableApp = aRemovable;
     }
 
+void CDeploymentComponent::SetDriveSelectionStatus(const TBool &aDriveSelection)
+    {
+    iDriveSelection = aDriveSelection;
+    }
+
 void CDeploymentComponent::SetInstallOptsL(const TDesC8 &aInstallOpts)
     {
     using namespace SwiUI;
@@ -705,7 +724,8 @@
         const TDesC8& aDlMimeType)
     {
     RDEBUG( "CDeploymentComponent::SuccessStatusUpdateL : start");
-    SetDataL(aDlFileName, aDlMimeType);
+    
+   
     
     TBuf<256> FileType;
     TBuf8<256> FileType8;
@@ -718,14 +738,18 @@
         RSession.AppForDocument(aDlFileName,uid, datatype );
          
         FileType.Copy(datatype.Des()); 
-            
-           
+        RDEBUG_2( "CDeploymentComponent::Pkg Id: %d ", uid.iUid);  
+        RDEBUG_2( "CDeploymentComponent::Pkg MIME: '%S' ", &FileType);  
         }
     RSession.Close();
     
     FileType8.Copy(FileType);
     
-    SetDataL(FileType8);
+    SetDataL(aDlFileName, FileType8);
+    
+    
+    
+    //SetDataL(FileType8);
 
     RDEBUG8_2( "CDeploymentComponent::Pkg MIME: '%S' ", &FileType8);
 
@@ -835,6 +859,11 @@
     iOwner = aInfo;
     }
 
+void CDeploymentComponent::SetComponentId(const TInt &aComponentId)
+    {
+    iComponentId = aComponentId;
+    }
+
 void CDeploymentComponent::SetIAPL(const TInt aIap)
     {
     RDEBUG8_2( "CDeploymentComponent::SetIAPL: %d ", aIap );