diff -r 84a16765cd86 -r 98b66e4fb0be iaupdate/IAD/engine/controller/src/iaupdatenodeimpl.cpp --- a/iaupdate/IAD/engine/controller/src/iaupdatenodeimpl.cpp Fri Mar 19 09:33:35 2010 +0200 +++ b/iaupdate/IAD/engine/controller/src/iaupdatenodeimpl.cpp Fri Apr 16 15:05:20 2010 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include "iaupdatenodeimpl.h" #include "iaupdatenodeobserver.h" @@ -28,9 +29,11 @@ #include "iaupdatecontrollerimpl.h" #include "iaupdateutils.h" #include "iaupdatecontentoperationmanager.h" +#include "iaupdateprotocolconsts.h" #include "iaupdatedebug.h" + // ----------------------------------------------------------------------------- // CIAUpdateNode::NewLC // Two-phased constructor. @@ -150,9 +153,18 @@ // MIAUpdateNode::TPackageType CIAUpdateNode::Type() const { + MIAUpdateNode::TPackageType packageType; + if ( Mime().Compare( IAUpdateProtocolConsts::KMimeWidget ) == 0 ) + { + packageType = MIAUpdateNode::EPackageTypeWidget; + } + else + { + packageType = Details().ContentType(); + } IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateNode::Type() = %d", - Details().ContentType()); - return Details().ContentType(); + packageType ); + return packageType; } @@ -758,14 +770,26 @@ void CIAUpdateNode::AddDependantL( CIAUpdateNode& aDependantNode ) { IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNode::AddDependantL() begin"); + for ( TInt i = 0; i < iDependants.Count(); ++i ) { CIAUpdateNode* node( iDependants[ i ] ); - if ( node->Uid() == aDependantNode.Uid() ) + if ( node->Mime().Compare( IAUpdateProtocolConsts::KMimeWidget) == 0 ) { - // Corresponding node is already in the array. - return; + if ( node->Identifier() == aDependantNode.Identifier() ) + { + // Corresponding node is already in the array. + return; + } + } + else + { + if ( node->Uid() == aDependantNode.Uid() ) + { + // Corresponding node is already in the array. + return; + } } } @@ -898,7 +922,18 @@ IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNode::IsInstalledL() begin"); TIAUpdateVersion installedVersion; - TBool installed( IAUpdateUtils::IsAppInstalledL( Uid(), installedVersion ) ); + + TBool installed = EFalse; + + if ( Mime().Compare( IAUpdateProtocolConsts::KMimeWidget ) == 0 ) + { + installed = IAUpdateUtils::IsWidgetInstalledL( Identifier(), installedVersion ); + } + else + { + installed = IAUpdateUtils::IsAppInstalledL( Uid(), installedVersion ); + } + IAUPDATE_TRACE_3("CIAUpdateNode::IsInstalledL() Installed version %d.%d.%d", installedVersion.iMajor, installedVersion.iMinor,