messagingapp/msgappfw/server/src/ccsconversation.cpp
changeset 48 4f501b74aeb1
parent 37 518b245aa84c
child 56 f42d9a78f435
--- a/messagingapp/msgappfw/server/src/ccsconversation.cpp	Tue Jul 13 22:09:22 2010 +0530
+++ b/messagingapp/msgappfw/server/src/ccsconversation.cpp	Sun Jul 25 18:59:19 2010 +0530
@@ -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
 // ----------------------------------------------------------------------------