messagingapp/msgappfw/msghistory/inc/msghistoryprivate.h
changeset 52 12db4185673b
parent 23 238255e8b033
--- a/messagingapp/msgappfw/msghistory/inc/msghistoryprivate.h	Tue Jul 06 14:12:40 2010 +0300
+++ b/messagingapp/msgappfw/msghistory/inc/msghistoryprivate.h	Wed Aug 18 09:45:25 2010 +0300
@@ -28,6 +28,7 @@
 class MsgItem;
 
 class MsgHistoryPrivate : public CBase,
+public CActive,
 public MCsResultsObserver,
 public MCsConversationChangeObserver
     {
@@ -42,12 +43,24 @@
      */
     ~MsgHistoryPrivate();
 
+public:// CActive
+
+    /**
+     * RunL.
+     */
+    void RunL();
+
+    /**
+     * DoCancel
+     */
+    void DoCancel();
+
 public:   
     /*
      * GetMessagingHistory
      * @param aContactId, contactId
      */
-    TBool GetMessagingHistory( TInt aContactId );
+    TBool GetMessagingHistory( TInt aContactId , TInt aKnownIndex = 0 );
     
     /*
      * ClearMessagingHistory
@@ -96,10 +109,12 @@
      * 
      * @param aConversationEntryList List of conversation entries
      * returned by server.
+     * @param aTotalCount total number of conversaitons entries in the conversation
      */
 
     void Conversations(
-            RPointerArray<CCsConversationEntry>& aConversationEntryList);
+            RPointerArray<CCsConversationEntry>& aConversationEntryList,
+            TInt& aTotalCount);
   
 public://MCsConversationChangeObserver
     
@@ -157,20 +172,56 @@
     void SetMsgAttributes
     (MsgItem& item, const CCsConversationEntry& entry);
 
-
+private :
+    /**
+     * Make the active object alive
+     */
+    void IssueRequest();
+    
 private: 
     
+    /**
+     * Msghistory Internal States
+     */
+    enum MsgHistoryStates
+        {
+        EInit = 500, 
+        EFetchMoreConversations
+        };
+    /**
+     * MsgHistoryStates
+     * Own
+     */
+    MsgHistoryStates currentState;
+
+    /**
+     * Current entry being processed
+     * Own.
+     */
+    TInt mCurrentIndex;
+
     /*
      * MsgHistoryImpl
      * Not Own
      */
     MsgHistoryImpl* q_ptr;
-    
+
     /*
      * CCSRequestHandler
      * Own
      */
     CCSRequestHandler* handler;
+    /*
+     * List of MsgItem's
+     * Own
+     */
+    QList<MsgItem> msgs;
+    
+    /*
+     * Contact Id
+     * Own
+     */
+    TInt contactId;
     };
 
 #endif // __MSG_HISTORY_PRIVATE__