imservices/instantmessagingcache/imcacheserver/inc/mimcachemessageheader.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2008 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:   base call of header class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MIMCACHEMESSAGEHEADER_H
       
    20 #define MIMCACHEMESSAGEHEADER_H
       
    21 
       
    22 //INCLUDES
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 //FORWARD DECLARATIONS
       
    28 class CIMCacheMessageBase;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  *  Interface for header information of history file
       
    34  *  @lib imcacheserver.exe
       
    35  *  @since 5.0
       
    36  */
       
    37 class MIMCacheMessageHeader
       
    38     {
       
    39 	public:
       
    40 
       
    41 		/**
       
    42 		 * Destructor.
       
    43 		 */
       
    44 		virtual ~MIMCacheMessageHeader() {};
       
    45 
       
    46     public: // Interface
       
    47 	
       
    48 		/**
       
    49 		 *	service id
       
    50 		 *	@return a service id
       
    51 		 */
       
    52 		 virtual TInt ServiceId() const = 0;
       
    53 
       
    54 		/**
       
    55 		 *	user id of recipient 
       
    56 		 *	@return recipient user id
       
    57 		 */
       
    58 		virtual const TDesC& BuddyId() const = 0;
       
    59 		
       
    60 		/**
       
    61 		 *	return total message count
       
    62 		 */
       
    63 		virtual TInt MessageCount() const = 0 ;
       
    64 		
       
    65 		/**
       
    66 		 * get message at given index 
       
    67 		 * @param aIndex index
       
    68 		 */
       
    69 		virtual CIMCacheMessageBase* GetMessage(TInt aIndex )  = 0;
       
    70 	
       
    71 		/**
       
    72 		 * append message
       
    73 		 * @param aMessge message to append
       
    74 		 */
       
    75         virtual void AppendMessageL(CIMCacheMessageBase* aMessge)  = 0 ; 
       
    76      
       
    77      	/**
       
    78 		 * UnreadMessageCount 
       
    79 		 * @return unread message count
       
    80 		 */
       
    81         virtual TInt UnreadMessageCount() const = 0 ;  
       
    82         
       
    83          /**
       
    84         * check wheather chat started or not
       
    85         * @return ETrue started
       
    86         */
       
    87         virtual TBool IsChatStarted() = 0 ;
       
    88         
       
    89         /**
       
    90         * set chat started 
       
    91         * @param aStarted, a boolean value to set
       
    92          */
       
    93         virtual void SetChatStarted(TBool aStarted ) = 0 ;
       
    94        
       
    95       	/**
       
    96         * mark all message read
       
    97         */
       
    98         virtual void MarkAllRead() = 0 ;
       
    99              
       
   100 
       
   101 	    };
       
   102 
       
   103 #endif      // MIMCACHEMESSAGEHEADER_H
       
   104 
       
   105 // End of File