messagingapp/msgappfw/msghistory/inc/msghistoryprivate.h
changeset 31 ebfee66fde93
parent 23 238255e8b033
child 48 4f501b74aeb1
equal deleted inserted replaced
30:6a20128ce557 31:ebfee66fde93
       
     1 /*
       
     2  * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  Private object for message history.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef __MSG_HISTORY_PRIVATE__
       
    19 #define __MSG_HISTORY_PRIVATE__
       
    20 
       
    21 #include "mcsresultsobserver.h"
       
    22 #include "mcsconversationchangeobserver.h"
       
    23 
       
    24 class CCSRequestHandler;
       
    25 class CCsConversationEntry;
       
    26 class CCsClientConversation;
       
    27 class MsgHistoryImpl;
       
    28 class MsgItem;
       
    29 
       
    30 class MsgHistoryPrivate : public CBase,
       
    31 public MCsResultsObserver,
       
    32 public MCsConversationChangeObserver
       
    33     {
       
    34 public:
       
    35     /*
       
    36      * Constructor
       
    37      */
       
    38     MsgHistoryPrivate(MsgHistoryImpl* ptr);
       
    39     
       
    40     /*
       
    41      * Destructor
       
    42      */
       
    43     ~MsgHistoryPrivate();
       
    44 
       
    45 public:   
       
    46     /*
       
    47      * GetMessagingHistory
       
    48      * @param aContactId, contactId
       
    49      */
       
    50     TBool GetMessagingHistory( TInt aContactId );
       
    51     
       
    52     /*
       
    53      * ClearMessagingHistory
       
    54      * @param aContactId, contactId
       
    55      * @return
       
    56      */
       
    57     TBool ClearMessagingHistory( TInt aContactId );
       
    58     
       
    59     /*
       
    60      * MarkReadMessagingHistory
       
    61      * @param aContactId, contactId
       
    62      * @return
       
    63      */
       
    64     TBool MarkReadMessagingHistory( TInt aContactId );
       
    65     
       
    66     /*
       
    67      * Subscribe
       
    68      * @param aContactId, contactId
       
    69      * @return
       
    70      */
       
    71     TBool Subscribe( TInt aContactId );
       
    72     
       
    73     /*
       
    74      * UnSubscribe
       
    75      * @param aContactId, contactId
       
    76      * @return
       
    77      */
       
    78     TBool UnSubscribe ( TInt aContactId );
       
    79     
       
    80 public: // From MCsResultsObserver
       
    81 
       
    82     /**
       
    83      * ConversationList
       
    84      * This is for handling GetEntryList results asynchronusly
       
    85      * from the server.
       
    86      * 
       
    87      * @param aClientConversationList List of client conversations
       
    88      * returned by server.
       
    89      */
       
    90     void ConversationList(
       
    91             RPointerArray<CCsClientConversation>& aClientConversationList);
       
    92     /**
       
    93      * Conversations
       
    94      * This is for handling GetConversation results asynchronusly
       
    95      * from the server.
       
    96      * 
       
    97      * @param aConversationEntryList List of conversation entries
       
    98      * returned by server.
       
    99      */
       
   100 
       
   101     void Conversations(
       
   102             RPointerArray<CCsConversationEntry>& aConversationEntryList);
       
   103   
       
   104 public://MCsConversationChangeObserver
       
   105     
       
   106     /**  
       
   107      * AddConversation
       
   108      * This is for handling addition of new conversation entry in
       
   109      * conversation view asynchronusly from the server.
       
   110      * 
       
   111      * @param aConversationEntry  Conversation Entry
       
   112      */
       
   113     void AddConversation(
       
   114             const CCsConversationEntry& aConversationEntry);
       
   115 
       
   116     /**  
       
   117      * ModifyConversation
       
   118      * This is for handling modification of existing
       
   119      * conversation entry in conversation view 
       
   120      * asynchronusly from the server.
       
   121      * 
       
   122      * @param aConversationEntry  Conversation Entry
       
   123      */
       
   124     void ModifyConversation(
       
   125             const CCsConversationEntry& aConversationEntry);
       
   126 
       
   127     /**  
       
   128      * DeleteConversation
       
   129      * This is for handling deletion of existing
       
   130      * conversation entry from conversation view 
       
   131      * asynchronusly from the server.
       
   132      * 
       
   133      * @param aConversationEntry  Conversation Entry
       
   134      */
       
   135     void DeleteConversation(
       
   136             const CCsConversationEntry& aConversationEntry);
       
   137     
       
   138     /**
       
   139      * RefreshConversation
       
   140      * This is for handling refresh asynchronusly from the server.
       
   141      */
       
   142     void RefreshConversation();
       
   143 
       
   144     /*
       
   145      * Populate MsgItem
       
   146      * @param item, MsgItem
       
   147      * @param entry, CCsConversationEntry
       
   148      */
       
   149     void PopulateMsgItem
       
   150     (MsgItem& item, const CCsConversationEntry& entry);
       
   151     
       
   152     /*
       
   153      * Set MsgItem Attributes
       
   154      * @param item, MsgItem
       
   155      * @param entry, CCsConversationEntry
       
   156      */   
       
   157     void SetMsgAttributes
       
   158     (MsgItem& item, const CCsConversationEntry& entry);
       
   159 
       
   160 
       
   161 private: 
       
   162     
       
   163     /*
       
   164      * MsgHistoryImpl
       
   165      * Not Own
       
   166      */
       
   167     MsgHistoryImpl* q_ptr;
       
   168     
       
   169     /*
       
   170      * CCSRequestHandler
       
   171      * Own
       
   172      */
       
   173     CCSRequestHandler* handler;
       
   174     };
       
   175 
       
   176 #endif // __MSG_HISTORY_PRIVATE__