iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp
changeset 29 26b6f0522fd8
parent 0 ba25891c3a9e
child 44 329d304c1aa1
--- a/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Fri Apr 16 15:05:20 2010 +0300
+++ b/iaupdate/IAD/firmwareupdate/src/iaupdatefwfotamodel.cpp	Mon May 03 12:38:03 2010 +0300
@@ -402,11 +402,23 @@
 // Fetches the state of last or current Fota operation
 // -----------------------------------------------------------------------------
 //
- RFotaEngineSession::TState CIAUpdateFWFotaModel::GetCurrentFwUpdState()
-	{
+RFotaEngineSession::TState CIAUpdateFWFotaModel::GetCurrentFwUpdState()
+	  {
     FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::GetCurrentFwUpdState()" );	
-	const TInt x = -1;
-	return iFotaEngine.GetState(x);
-	}
+	  // Workaround because fotaserver has closed all sessions if DM UI was closed.
+	  // So, we cannot rely on existing session but a new one needs to be opened.
+	  iFotaEngine.Close();
+	  iFotaEngine.OpenL();
+	  const TInt x = -1;
+	  return iFotaEngine.GetState(x);
+	  }
+
 
+TInt CIAUpdateFWFotaModel::TryResumeFwUpdDownload()
+    {	
+    FLOG( "[IAUPDATEFW] CIAUpdateFWFotaModel::TryResumeFwUpdDownload()" );	    
+    TInt retval = iFotaEngine.TryResumeDownload();
+    return retval;
+    }
+	
 //  End of File