--- a/messagingapp/msgui/appengine/src/conversationsengine_p.cpp Tue Jul 13 22:09:22 2010 +0530
+++ b/messagingapp/msgui/appengine/src/conversationsengine_p.cpp Sun Jul 25 18:59:19 2010 +0530
@@ -28,6 +28,12 @@
#include "conversationlistchangehandler.h"
#include "debugtraces.h"
+
+//CONSTANTS
+/**
+ *Max number of conversation that can be exchanged in IPC call
+ */
+const TInt KMaxConversationIPCLimit = 250;
//---------------------------------------------------------------
// ConversationsEnginePrivate::ConversationsEnginePrivate
// @see header
@@ -128,8 +134,11 @@
CleanupStack::PushL(entry);
mClientConv->SetConversationEntryL(entry);
CleanupStack::PopAndDestroy(entry);
+ // Reset the values in change handler before initiating a request
+ mConvChangeHandler->ResetValuesForNewConversation();
+
//Get the conversations for new conversationId
- mServer->GetConversationsL(mClientConv);
+ mServer->GetConversationsL(mClientConv,0,KMaxConversationIPCLimit);
QCRITICAL_WRITE("ConversationsEnginePrivate::getConversationsL end.");
}
@@ -310,14 +319,15 @@
// @see header
//---------------------------------------------------------------
void ConversationsEnginePrivate::Conversations(
- RPointerArray<CCsConversationEntry>& aConversationEntryList)
+ RPointerArray<CCsConversationEntry>& aConversationEntryList,
+ TInt& aTotalCount)
{
int error;
if (mClientConv)
{
QCRITICAL_WRITE("ConversationsEnginePrivate::Conversations start.");
- TRAP(error,mConvChangeHandler->ConversationsL(aConversationEntryList));
+ TRAP(error,mConvChangeHandler->ConversationsL(aConversationEntryList,aTotalCount));
QCRITICAL_WRITE("ConversationsEnginePrivate::Conversations end.");
}
@@ -337,6 +347,21 @@
}
//---------------------------------------------------------------
+// ConversationsEngine::fetchRemainingConversations
+// @see header
+//---------------------------------------------------------------
+void ConversationsEnginePrivate::fetchRemainingConversations(TInt& aCount)
+ {
+ if ( mServer && mClientConv )
+ {
+
+ // Get conversations from server
+ mServer->GetConversationsL(mClientConv,
+ (aCount - 1),
+ KMaxConversationIPCLimit);
+ }
+ }
+//---------------------------------------------------------------
// ConversationsEnginePrivate::resendMessage()
// @see header
//---------------------------------------------------------------