--- a/iaupdate/IAD/engine/controller/src/iaupdatebasenodeimpl.cpp Fri Feb 19 22:57:02 2010 +0200
+++ b/iaupdate/IAD/engine/controller/src/iaupdatebasenodeimpl.cpp Fri Mar 12 15:43:14 2010 +0200
@@ -33,8 +33,11 @@
#include "iaupdatecontentoperationmanager.h"
#include "iaupdateutils.h"
#include "iaupdatectrlnodeconsts.h"
+#include "iaupdateprotocolconsts.h"
#include "iaupdatedebug.h"
-#include "iaupdateprotocolconsts.h"
+
+
+
// -----------------------------------------------------------------------------
@@ -102,7 +105,20 @@
{
iMime = contentInfo->MimeType().AllocL();
iVersion.InternalizeL( contentInfo->Version() );
- iUid = contentInfo->Uid();
+
+ //Initialize iUid or iIdentifier according to the mime-type
+ iUid = KNullUid;
+
+ if ( iMime->Compare( IAUpdateProtocolConsts::KMimeWidget ) == 0 )
+ {
+ iIdentifier = contentInfo->Identifier().AllocL();
+ }
+ else
+ {
+ iUid = contentInfo->Uid();
+ iIdentifier = KNullDesC().AllocL();
+ }
+
// Release content info.
// So, we can later check if it still exists and then get
// new one if it exists.
@@ -144,6 +160,7 @@
delete iName;
delete iDescription;
delete iMime;
+ delete iIdentifier;
delete iDetails;
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateBaseNode::~CIAUpdateBaseNode() end");
@@ -191,7 +208,17 @@
IAUPDATE_TRACE_1("[IAUPDATE] CIAUpdateBaseNode::Uid() = %x", iUid);
return iUid;
}
-
+
+
+// ---------------------------------------------------------------------------
+// CIAUpdateBaseNode::Identifier
+//
+// ---------------------------------------------------------------------------
+//
+const TDesC& CIAUpdateBaseNode::Identifier() const
+ {
+ return *iIdentifier;
+ }
// ---------------------------------------------------------------------------
// CIAUpdateBaseNode::Name
@@ -370,6 +397,17 @@
return;
}
+// ---------------------------------------------------------------------------
+// CIAUpdateBaseNode::Mime
+//
+// ---------------------------------------------------------------------------
+//
+const TDesC& CIAUpdateBaseNode::Mime() const
+ {
+ return *iMime;
+ }
+
+
// ---------------------------------------------------------------------------
// Public functions
@@ -435,18 +473,29 @@
//
TBool CIAUpdateBaseNode::Equals( const CIAUpdateBaseNode& aNode ) const
{
- if ( aNode.MetaNamespace() == MetaNamespace()
- && aNode.MetaId() == MetaId()
- || ( aNode.Uid() == Uid()
- && aNode.Version() == Version()
- && aNode.iMime->Match( IAUpdateProtocolConsts::KMimeServicePackPattern()) == KErrNotFound ) )
+ TBool equals = EFalse;
+ if ( iMime->Compare( IAUpdateProtocolConsts::KMimeWidget ) == 0 )
{
- return ETrue;
+ if ( aNode.MetaNamespace() == MetaNamespace()
+ && aNode.MetaId() == MetaId()
+ || ( aNode.Identifier() == Identifier()
+ && aNode.Version() == Version() ) )
+ {
+ equals = ETrue;
+ }
}
- else
+ else
{
- return EFalse;
+ if ( aNode.MetaNamespace() == MetaNamespace()
+ && aNode.MetaId() == MetaId()
+ || ( aNode.Uid() == Uid()
+ && aNode.Version() == Version()
+ && aNode.iMime->Match( IAUpdateProtocolConsts::KMimeServicePackPattern()) == KErrNotFound ) )
+ {
+ equals = ETrue;
+ }
}
+ return equals;
}