contentstorage/cautils/src/cainnerentry.cpp
changeset 98 d2f833ab7940
parent 92 782e3408c2ab
child 127 7b66bc3c6dc9
--- a/contentstorage/cautils/src/cainnerentry.cpp	Tue Jun 01 11:30:17 2010 +0300
+++ b/contentstorage/cautils/src/cainnerentry.cpp	Fri Jun 11 16:13:51 2010 +0300
@@ -72,6 +72,8 @@
     aStream.WriteL( iDescription, iDescription.Length() );
     aStream.WriteUint32L( iEntryTypeName.Length() );
     aStream.WriteL( iEntryTypeName, iEntryTypeName.Length() );
+    aStream.WriteUint32L( iTextLocalized );
+    aStream.WriteUint32L( iDescriptionLocalized );
     iAttributes.ExternalizeL( aStream );
     iIcon->ExternalizeL( aStream );
     aStream.CommitL();
@@ -99,6 +101,8 @@
     iEntryTypeName.Close();
     iEntryTypeName.CreateL( length );
     aStream.ReadL( iEntryTypeName, length );
+    iTextLocalized = aStream.ReadUint32L();
+    iDescriptionLocalized = aStream.ReadUint32L();
     iAttributes.InternalizeL( aStream );
     iIcon->InternalizeL( aStream );
     }
@@ -110,6 +114,8 @@
 void CCaInnerEntry::ConstructL()
     {
     iIcon = CCaInnerIconDescription::NewL();
+    iTextLocalized = EFalse;
+    iDescriptionLocalized = EFalse;
     }
 
 // ---------------------------------------------------------------------------
@@ -224,20 +230,23 @@
 //
 // ---------------------------------------------------------------------------
 //
-EXPORT_C void CCaInnerEntry::SetTextL( const TDesC& aText )
+EXPORT_C void CCaInnerEntry::SetTextL( const TDesC& aText, TBool localized )
     {
     iText.Close();
     iText.CreateL( aText );
+    iTextLocalized = localized;
     }
 
 // ---------------------------------------------------------------------------
 //
 // ---------------------------------------------------------------------------
 //
-EXPORT_C void CCaInnerEntry::SetDescriptionL( const TDesC& aText )
+EXPORT_C void CCaInnerEntry::SetDescriptionL( 
+        const TDesC& aText, TBool localized )
     {
     iDescription.Close();
     iDescription.CreateL( aText );
+    iDescriptionLocalized = localized;
     }
 
 // ---------------------------------------------------------------------------
@@ -344,3 +353,23 @@
     {
     iIcon->SetId( aIconId );
     }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CCaInnerEntry::isLocalized(TLocalizedType aLocalized) const
+    {
+    if(aLocalized == EDescriptionLocalized)
+        {
+        return iDescriptionLocalized;
+        }
+    if(aLocalized == ENameLocalized)
+        {
+        return iTextLocalized;
+        }
+    else 
+        return EFalse;
+    }
+
+