Revision: 201015 RCL_3 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:25:00 +0300
branchRCL_3
changeset 20 f6aa907032f4
parent 19 f2fc39bc30a5
child 25 7f4d10e92162
Revision: 201015 Kit: 201017
applicationmanagement/server/src/AMDeploymentComponent.cpp
applicationmanagement/server/src/AMDownloadManager.cpp
applicationmanagement/server/src/AMSmlHelper.cpp
applicationmanagement/server/src/ApplicationManagementServer.cpp
omadm/omadmappui/inc/NSmlDMSyncAppUi.h
omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp
omadm/omadmextensions/adapters/nsmldinternet/src/NSmlInternetAdapter.cpp
--- a/applicationmanagement/server/src/AMDeploymentComponent.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/applicationmanagement/server/src/AMDeploymentComponent.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -712,18 +712,23 @@
     
     RApaLsSession RSession;      
     if(RSession.Connect() == KErrNone)        
-        {           
-        TDataRecognitionResult FileDataType;         
-        RSession.RecognizeData(aDlFileName,iData->Data(),*&FileDataType);        
-              
-            FileType.Copy(FileDataType.iDataType.Des());          
-                  
+        {  
+        TUid uid;
+        TDataType datatype;
+        RSession.AppForDocument(aDlFileName,uid, datatype );
+         
+        FileType.Copy(datatype.Des()); 
+            
+           
         }
     RSession.Close();
     
     FileType8.Copy(FileType);
     
     SetDataL(FileType8);
+
+    RDEBUG8_2( "CDeploymentComponent::Pkg MIME: '%S' ", &FileType8);
+
     
     // Set PkgID same as MiME type of downloaded content
     SetPkgTypeL(FileType8);
--- a/applicationmanagement/server/src/AMDownloadManager.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/applicationmanagement/server/src/AMDownloadManager.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -408,7 +408,9 @@
         {
         iap = opts.iIAP;
         }
-    if (iap == -1)
+    RDEBUG_2( "CAMDownloadManager::SetIAPL: Set IAP Id value to (%d) ", iap);
+    
+    if (iap <= -1)
         {
         iap = 0; //as DL mgr treats 0 (zero) as "Always Ask"
         }
@@ -424,7 +426,7 @@
         }
 
 #ifdef _DEBUG
-    TInt err(iDownloadMgr.SetIntAttribute(EDlMgrIap, 11) );
+    TInt err(iDownloadMgr.SetIntAttribute(EDlMgrIap, 0) );
     RDEBUG_2( "CAMDownloadManager::SetIAPL (debug only): WARNING Overriding IAP Id to 11 results %d", err );
 #endif		
     }
--- a/applicationmanagement/server/src/AMSmlHelper.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/applicationmanagement/server/src/AMSmlHelper.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -210,11 +210,13 @@
     RDEBUG("	8/8");
 
     aDefaultIAP = num;
+    
+    RDEBUG_2( "GetDefaultIAPFromDMProfileL::SetIAPL: Set IAP Id value to (%d) ", aDefaultIAP);
 
     // If there is no default Access point in DM profile then use
     // currently used access point by DM session
 
-    if (aDefaultIAP == -1)
+    if (aDefaultIAP <= -1)
         {
 
         TInt sockIapid = -1;
@@ -271,6 +273,7 @@
                 if (uid == KSosServerUid)
                     {
                     sockIapid = connInfo().iIapId;
+                    RDEBUG_2( "GetDefaultIAPFromDMProfileL::SetIAPL: Set IAP Id value to (%d) ", sockIapid);
 
                     }
 
--- a/applicationmanagement/server/src/ApplicationManagementServer.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/applicationmanagement/server/src/ApplicationManagementServer.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -956,7 +956,7 @@
         RDEBUG_2( "CApplicationManagementServer::PrepareInstallL - ERROR leaving cannot connect installer: %d", err );
         User::LeaveIfError(err);
         }
-    CleanupClosePushL(iInstaller);
+    
 #endif
 
     RDEBUG( "CApplicationManagementServer::PrepareInstallL - connected to installer" );
@@ -1067,9 +1067,6 @@
         RDEBUG( "CApplicationManagementServer::PrepareInstallL - ERROR size of source file is 0!" );
         }
 
-#ifndef __AM_CONNECT_INSTALLER_ONSTARTUP_
-    CleanupStack::Pop( &iInstaller);
-#endif
 
     RDEBUG( "CApplicationManagementServer::PrepareInstallL end" );
     return res;
--- a/omadm/omadmappui/inc/NSmlDMSyncAppUi.h	Wed Apr 14 15:46:55 2010 +0300
+++ b/omadm/omadmappui/inc/NSmlDMSyncAppUi.h	Tue Apr 27 16:25:00 2010 +0300
@@ -41,6 +41,11 @@
 class CNSmlDMDbNotifier;
 class CNSmlDMFotaView;
 
+
+/** If download is active this P&S key is set to ETrue, otherwise EFalse. 
+ * The key is owned by omadmappui**/
+const TUint32 KFotaDownloadActive = 0x0000008;
+
 /**
 * Application UI class.
 * Provides support for the following features:
--- a/omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/omadm/omadmappui/src/NSmlDMSyncAppUi_fota.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -46,12 +46,14 @@
 
 #include <aknmessagequerydialog.h>     // For CAknMessageQueryDialog
 
+#include <fotaconst.h>
 // For KCalenHoursInDay = 24 and other time-related constants.
 #include <calenconstants.h>           
 
 // Array granuality for displaying R_QTN_FOTA_NOTE_TIME_RESTRICTION note.
 const TInt KNSmlDMFotaNoteArrayGranuality = 3;
 
+
 // ============================ MEMBER FUNCTIONS ==============================
 //
 
@@ -236,15 +238,19 @@
 	    case EAknSoftkeyExit: //For independent .exe app launch from file browser
 		case EAknCmdExit:
         case EEikCmdExit:		// quit application
-			{
-			TApaTaskList taskList(CEikonEnv::Static()->WsSession());
-	        TApaTask task1(taskList.FindApp( KFotaServerAppUid));
+			{   
 			TInt value=-1;
             TInt r1=RProperty::Set(KPSUidNSmlDMSyncApp,KNSmlDMSyncUiLaunchKey,value);
-	        if(task1.Exists())
-	        	{
-	        	task1.EndTask();
-	        	}
+	        
+        	TBool val (EFalse);
+        	TInt err = RProperty::Get(TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, val );
+        		if(val == 1)
+        			{
+        			TApaTaskList taskList(CEikonEnv::Static()->WsSession());
+        			TApaTask task1(taskList.FindApp( KFotaServerAppUid));
+        			if(task1.Exists())
+        				task1.EndTask();
+        			}	
 			Exit();
 			}
 		    break;
--- a/omadm/omadmextensions/adapters/nsmldinternet/src/NSmlInternetAdapter.cpp	Wed Apr 14 15:46:55 2010 +0300
+++ b/omadm/omadmextensions/adapters/nsmldinternet/src/NSmlInternetAdapter.cpp	Tue Apr 27 16:25:00 2010 +0300
@@ -1075,6 +1075,7 @@
                       _DBG_FILE("CNSmlInternetAdapter::AddLeafObjectL: network found, update name");
                       checknetView->WriteTextL(TPtrC(COMMDB_NAME), ConvertTo16LC(aObject));
                       _DBG_FILE("CNSmlInternetAdapter::AddLeafObjectL: network name updated");
+                      checknetView->PutRecordChanges();
                       CleanupStack::PopAndDestroy(); //ConvertTo16LC
                       }
                     // writing failed for some reason
@@ -2985,12 +2986,12 @@
         { // Name + NAPAddr + DNSAddrL
         if(aURI.Match(_L8("AP/*/Networks/*/Name"))!= KErrNotFound ) // Networks-name
             {
-            TUint32 iapID8 = IntLUID(aLUID);
+           // TUint32 iapID8 = IntLUID(aLUID);
 
             //  IAP-table NetworkId Fetch
             CCommsDbTableView* networkView = iDatabase->OpenViewMatchingUintLC(TPtrC(IAP),
                                                                                TPtrC(COMMDB_ID),
-                                                                               iapID8);
+                                                                               iapID);
             networkView->GotoFirstRecord();
             TRAPD(leavecode,networkView->ReadUintL(TPtrC(IAP_NETWORK), iISPId));
             CleanupStack::PopAndDestroy(); // networkView
@@ -5021,7 +5022,7 @@
         TPtrC qDB    = TPtrC(COMMDB_ID);
 
     //Check if URI is /AP/*/NAPDef/* then it should be check IAP ID in DB not IAPService
-    if(( iIAPId > 0 ) && ((aURI.Match(_L8("AP/*/NAPDef/*"  ))!= KErrNotFound) || (aURI.Match(_L8("AP/*/NAPDef/*/Bearer/*"  ))!= KErrNotFound)))
+    if(( iIAPId >= 0 ) && ((aURI.Match(_L8("AP/*/NAPDef/*"  ))!= KErrNotFound) || (aURI.Match(_L8("AP/*/NAPDef/*/Bearer/*"  ))!= KErrNotFound) || (aURI.Match(_L8("AP/*"  ))!= KErrNotFound) ||(aURI.Match(_L8("AP/*/NAPDef"  ))!= KErrNotFound)))
     {
       //Get parent UID and check if that exist if not add 
       iIAPId = GetAPIdFromURIL(aURI);
@@ -7204,7 +7205,16 @@
                 iBuffer->At(iExecutionIndex).iLuid = iISPId;
                 }
 
-            iBuffer->At(iExecutionIndex).iNodeBuf->At(cmd).iDone = ETrue;
+            TInt uidValue = IntLUID(addLUID);  
+            if(( iBuffer->At(iExecutionIndex).iNodeBuf->At(cmd).iUri->Des().Match( _L8( "AP/*/NAPDef/*/NAPAddr" ) ) != KErrNotFound ) && (uidValue == KErrNone))
+                {
+                iBuffer->At(iExecutionIndex).iNodeBuf->At(cmd).iDone = EFalse;
+                }
+            else
+                {
+                iBuffer->At(iExecutionIndex).iNodeBuf->At(cmd).iDone = ETrue;
+                }
+     
             }
 
         }