contentstorage/cautils/src/cainnerentry.cpp
changeset 103 b99b84bcd2d1
parent 66 32469d7d46ff
child 127 7b66bc3c6dc9
--- a/contentstorage/cautils/src/cainnerentry.cpp	Fri Jun 11 13:58:37 2010 +0300
+++ b/contentstorage/cautils/src/cainnerentry.cpp	Wed Jun 23 18:33:40 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;
+    }
+
+