messagingapp/msgappfw/server/src/ccsconversation.cpp
changeset 52 12db4185673b
parent 43 35b64624a9e7
child 70 a15d9966050f
--- a/messagingapp/msgappfw/server/src/ccsconversation.cpp	Tue Jul 06 14:12:40 2010 +0300
+++ b/messagingapp/msgappfw/server/src/ccsconversation.cpp	Wed Aug 18 09:45:25 2010 +0300
@@ -219,6 +219,33 @@
     }
 
 // ----------------------------------------------------------------------------
+// CCsConversation::GetEntryListL
+// This function shall return segment of Conversation Entry
+// of ConversationEntry based on aStartIndex and aEndIndex
+// ----------------------------------------------------------------------------
+void
+CCsConversation::GetEntryListL (
+        RPointerArray<CCsConversationEntry>* aConversationEntryList,
+        TInt aStartIndex,
+        TInt aEndIndex)
+    {
+    TInt EntryCount = iEntryList->Count();
+    if (EntryCount > 0 && aStartIndex>=0 && aEndIndex<=EntryCount)
+        {
+        // loop through each entry make a clone and add 
+        // it to aConversationEntryList class
+        for (TInt index=aEndIndex-1 ; index>=aStartIndex ; index--)
+            {
+            CCsConversationEntry* conEntry =
+                (static_cast<CCsConversationEntry*>(
+                    (*iEntryList)[index]))->CloneL();
+            aConversationEntryList->Append(conEntry);
+            }
+        }
+    }
+
+
+// ----------------------------------------------------------------------------
 // CCsConversation::AddEntryL
 // Add a entry to this conversation
 // ----------------------------------------------------------------------------