messagingapp/msgappfw/msghistory/inc/msghistoryprivate.h
changeset 52 12db4185673b
parent 23 238255e8b033
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
    26 class CCsClientConversation;
    26 class CCsClientConversation;
    27 class MsgHistoryImpl;
    27 class MsgHistoryImpl;
    28 class MsgItem;
    28 class MsgItem;
    29 
    29 
    30 class MsgHistoryPrivate : public CBase,
    30 class MsgHistoryPrivate : public CBase,
       
    31 public CActive,
    31 public MCsResultsObserver,
    32 public MCsResultsObserver,
    32 public MCsConversationChangeObserver
    33 public MCsConversationChangeObserver
    33     {
    34     {
    34 public:
    35 public:
    35     /*
    36     /*
    40     /*
    41     /*
    41      * Destructor
    42      * Destructor
    42      */
    43      */
    43     ~MsgHistoryPrivate();
    44     ~MsgHistoryPrivate();
    44 
    45 
       
    46 public:// CActive
       
    47 
       
    48     /**
       
    49      * RunL.
       
    50      */
       
    51     void RunL();
       
    52 
       
    53     /**
       
    54      * DoCancel
       
    55      */
       
    56     void DoCancel();
       
    57 
    45 public:   
    58 public:   
    46     /*
    59     /*
    47      * GetMessagingHistory
    60      * GetMessagingHistory
    48      * @param aContactId, contactId
    61      * @param aContactId, contactId
    49      */
    62      */
    50     TBool GetMessagingHistory( TInt aContactId );
    63     TBool GetMessagingHistory( TInt aContactId , TInt aKnownIndex = 0 );
    51     
    64     
    52     /*
    65     /*
    53      * ClearMessagingHistory
    66      * ClearMessagingHistory
    54      * @param aContactId, contactId
    67      * @param aContactId, contactId
    55      * @return
    68      * @return
    94      * This is for handling GetConversation results asynchronusly
   107      * This is for handling GetConversation results asynchronusly
    95      * from the server.
   108      * from the server.
    96      * 
   109      * 
    97      * @param aConversationEntryList List of conversation entries
   110      * @param aConversationEntryList List of conversation entries
    98      * returned by server.
   111      * returned by server.
       
   112      * @param aTotalCount total number of conversaitons entries in the conversation
    99      */
   113      */
   100 
   114 
   101     void Conversations(
   115     void Conversations(
   102             RPointerArray<CCsConversationEntry>& aConversationEntryList);
   116             RPointerArray<CCsConversationEntry>& aConversationEntryList,
       
   117             TInt& aTotalCount);
   103   
   118   
   104 public://MCsConversationChangeObserver
   119 public://MCsConversationChangeObserver
   105     
   120     
   106     /**  
   121     /**  
   107      * AddConversation
   122      * AddConversation
   155      * @param entry, CCsConversationEntry
   170      * @param entry, CCsConversationEntry
   156      */   
   171      */   
   157     void SetMsgAttributes
   172     void SetMsgAttributes
   158     (MsgItem& item, const CCsConversationEntry& entry);
   173     (MsgItem& item, const CCsConversationEntry& entry);
   159 
   174 
   160 
   175 private :
       
   176     /**
       
   177      * Make the active object alive
       
   178      */
       
   179     void IssueRequest();
       
   180     
   161 private: 
   181 private: 
   162     
   182     
       
   183     /**
       
   184      * Msghistory Internal States
       
   185      */
       
   186     enum MsgHistoryStates
       
   187         {
       
   188         EInit = 500, 
       
   189         EFetchMoreConversations
       
   190         };
       
   191     /**
       
   192      * MsgHistoryStates
       
   193      * Own
       
   194      */
       
   195     MsgHistoryStates currentState;
       
   196 
       
   197     /**
       
   198      * Current entry being processed
       
   199      * Own.
       
   200      */
       
   201     TInt mCurrentIndex;
       
   202 
   163     /*
   203     /*
   164      * MsgHistoryImpl
   204      * MsgHistoryImpl
   165      * Not Own
   205      * Not Own
   166      */
   206      */
   167     MsgHistoryImpl* q_ptr;
   207     MsgHistoryImpl* q_ptr;
   168     
   208 
   169     /*
   209     /*
   170      * CCSRequestHandler
   210      * CCSRequestHandler
   171      * Own
   211      * Own
   172      */
   212      */
   173     CCSRequestHandler* handler;
   213     CCSRequestHandler* handler;
       
   214     /*
       
   215      * List of MsgItem's
       
   216      * Own
       
   217      */
       
   218     QList<MsgItem> msgs;
       
   219     
       
   220     /*
       
   221      * Contact Id
       
   222      * Own
       
   223      */
       
   224     TInt contactId;
   174     };
   225     };
   175 
   226 
   176 #endif // __MSG_HISTORY_PRIVATE__
   227 #endif // __MSG_HISTORY_PRIVATE__