diff -r d2517372cc44 -r ae69c2e8bc34 fotaapplication/fotaserver/src/fotaupdate.cpp --- a/fotaapplication/fotaserver/src/fotaupdate.cpp Tue Sep 28 17:53:08 2010 +0530 +++ b/fotaapplication/fotaserver/src/fotaupdate.cpp Fri Oct 15 11:46:45 2010 +0530 @@ -16,7 +16,7 @@ */ // INCLUDE FILES -#include + #include #include #include @@ -24,8 +24,6 @@ #include #include #include -#include -#include #include #include #include @@ -65,6 +63,17 @@ if (iProperty.Handle()) iProperty.Close(); + + if(iNotifier) + { + delete iNotifier; + iNotifier = NULL; + } + if(iNotifParams) + { + delete iNotifParams; + iNotifParams = NULL; + } FLOG(_L("CFotaUpdate::~CFotaUpdate <<")); } @@ -76,11 +85,24 @@ CFotaUpdate* CFotaUpdate::NewL(CFotaServer* aServer) { CFotaUpdate* ao = new (ELeave) CFotaUpdate(); + CleanupStack::PushL( ao ); + ao->ConstructL(); ao->iFotaServer = aServer; + CleanupStack::Pop(ao); return ao; } // --------------------------------------------------------------------------- +// CFotaUpdate::ConstructL +// --------------------------------------------------------------------------- +// + +void CFotaUpdate::ConstructL() + { + iNotifier = CFotaDownloadNotifHandler::NewL(this); + } + +// --------------------------------------------------------------------------- // CFotaUpdate::CheckUpdateResults // Checks if there is update result file available (meaning that update just // took place) @@ -633,7 +655,7 @@ iFotaServer->ServerCanShut(EFalse); if (iFotaServer->FullScreenDialog()) - iFotaServer->FullScreenDialog()->Close(); + iFotaServer->FullScreenDialog()->close(); iNotifParams = CHbSymbianVariantMap::NewL(); @@ -644,7 +666,7 @@ CHbSymbianVariant* dialogId = CHbSymbianVariant::NewL(&aDialogid, CHbSymbianVariant::EInt); iNotifParams->Add(*keyDialog, dialogId); - iNotifier = CFotaDownloadNotifHandler::NewL(this); + iNotifier->LaunchNotifierL(iNotifParams, aDialogid);