diff -r 9d806967057c -r 7f0462e8c3da contentstorage/cautils/src/cainnerquery.cpp --- a/contentstorage/cautils/src/cainnerquery.cpp Tue Mar 23 23:42:03 2010 +0200 +++ b/contentstorage/cautils/src/cainnerquery.cpp Tue Mar 23 23:55:55 2010 +0200 @@ -30,6 +30,7 @@ { delete iEntryTypeNames; iIds.Close(); + iAttributes.ResetAndDestroy(); } // --------------------------------------------------------------------------- @@ -81,6 +82,8 @@ aStream.WriteL( iEntryTypeNames->MdcaPoint( i ), iEntryTypeNames->MdcaPoint( i ).Length() ); } + iAttributes.ExternalizeL( aStream ); + aStream.CommitL(); } // --------------------------------------------------------------------------- @@ -114,6 +117,7 @@ iEntryTypeNames->AppendL( buf ); CleanupStack::PopAndDestroy( &buf ); } + iAttributes.InternalizeL( aStream ); } // --------------------------------------------------------------------------- @@ -302,3 +306,30 @@ { return iCount; } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +EXPORT_C void CCaInnerQuery::AddAttributeL( const TDesC& aKey, + const TDesC& aValue ) + { + // to avoid duplicated attribute + if( iAttributes.Exist( aKey ) ) + { + iAttributes.RemoveAttribute( aKey ); + } + CCaEntryAttribute* attr = CCaEntryAttribute::NewLC( aKey ); + attr->SetValueL( aValue ); + iAttributes.AppendL( attr ); + CleanupStack::Pop( attr ); + } + +// --------------------------------------------------------------------------- +// +// --------------------------------------------------------------------------- +// +EXPORT_C const RCaEntryAttrArray& CCaInnerQuery::GetAttributes() const + { + return iAttributes; + }