uiservicetab/vimpstengine/inc/mvimpstengineimsubservice.h
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
28:3104fc151679 29:9a48e301e94b
       
     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:  M-Class that capsulates IM sub service API's
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MVIMPSTENGINEIMSUBSERVICE_H
       
    20 #define MVIMPSTENGINEIMSUBSERVICE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "tvimpstenums.h"
       
    25 #include "mvimpstenginesubservice.h"
       
    26 #include <imcachedefs.h>
       
    27 
       
    28 //FORWARD DECLARATION
       
    29 class MVIMPSTEngineIMSubServiceEventObserver;
       
    30 
       
    31 //CLASS DECLARATION
       
    32 /**
       
    33  *  
       
    34  *  This class list the M-Class for IM subservices
       
    35  *
       
    36  *  @lib vimpstengine.lib
       
    37  *  @since S60 5.0
       
    38  */
       
    39 //Class declaration
       
    40 class MVIMPSTEngineIMSubService: public MVIMPSTEngineSubService
       
    41 	{
       
    42 	
       
    43 	public:
       
    44 	
       
    45 		/**
       
    46          * Casts MVIMPSTEngineIMSubService to this interface.
       
    47          *
       
    48          * @precond aSubService.Type() == TVIMPSTEnums::EIM
       
    49          *          Panic(EPanicTypeMismatch)
       
    50          *          is raised if the precondition does not hold.
       
    51          * @param aSubService    Base Class .
       
    52          * @return Casted inteface for the IM SubService
       
    53          */
       
    54         IMPORT_C static MVIMPSTEngineIMSubService& Cast(
       
    55                 MVIMPSTEngineSubService& aSubService);
       
    56 
       
    57         
       
    58         /**
       
    59          * Casts constMVIMPSTEngineIMSubService to this interface.
       
    60          *
       
    61          * @precond aSubService.Type() == TVIMPSTEnums::EIM
       
    62          *          Panic(EPanicTypeMismatch)
       
    63          *          is raised if the precondition does not hold.
       
    64          * @param aSubService    Base Class .
       
    65          * @return Casted inteface for the IM SubService
       
    66          */        
       
    67         IMPORT_C static const MVIMPSTEngineIMSubService& Cast(
       
    68                 const MVIMPSTEngineSubService& aSubService);
       
    69 	
       
    70 	
       
    71 		/**
       
    72 		* RegisterChatObserver
       
    73 		* The observers that have implemented MVIMPSTEngineIMSubServiceEventObserver can use this API
       
    74 		* to register themselves to receive IM SubService (Conversation) related events
       
    75 		* @param aObserver - Object that implements the observer class MVIMPSTEngineIMSubServiceEventObserver that 
       
    76 		* needs to be added.
       
    77 		*/
       
    78 	  	virtual void RegisterChatObserver(MVIMPSTEngineIMSubServiceEventObserver* aObserver) = 0;
       
    79 	  	
       
    80 		/**
       
    81 		* UnRegisterChatObserver
       
    82 		* The observers that have implemented MVIMPSTEngineIMSubServiceEventObserver can use this API
       
    83 		* to unregister themselves from IM SubService (Conversation) related events
       
    84 		* @param aObserver - Object that implements the observer class MVIMPSTEngineIMSubServiceEventObserver that
       
    85 		* needs to be removed.
       
    86 		*/
       
    87 	  	virtual void UnRegisterChatObserver(MVIMPSTEngineIMSubServiceEventObserver* aObserver) = 0;
       
    88 	  	
       
    89 		/**
       
    90 		* GetUnreadCountL
       
    91 		* API used to retreive the Unread Msg Count for a Buddy
       
    92 		* @param aBuddyId, id of the conversation party. 
       
    93 		*/
       
    94 	  	virtual TInt GetUnreadCountL(const TDesC& aBuddyId) = 0;
       
    95 	
       
    96 	
       
    97 		/**
       
    98          * check if already conversation opened
       
    99          * @param aBuddyId, the selected user id with whom conversation is started
       
   100          * @return TBool ETrue if already exist else EFlase.
       
   101          */
       
   102         virtual TBool IsConversationExistL(const TDesC& aBuddyId) const = 0;
       
   103         
       
   104         /**
       
   105         * Closes conversation with the selected user        
       
   106         * @param aBuddyId, id of the conversation party.           
       
   107         */
       
   108         virtual void CloseConversationL( const TDesC& aBuddyId ) = 0;
       
   109 	    						   
       
   110         /**
       
   111         * get all conversation with the selected service id        
       
   112         * @param aBuddyId, id of the conversation party.           
       
   113         */
       
   114       
       
   115         virtual RArray<SIMCacheChatItem> GetOpenChatListL() = 0 ;
       
   116         
       
   117 	   /**
       
   118 		* Destructor
       
   119 		*/		
       
   120 		virtual ~MVIMPSTEngineIMSubService() 
       
   121 		{}
       
   122 		
       
   123 	};
       
   124 
       
   125 #endif //MVIMPSTENGINEIMSUBSERVICE_H
       
   126 
       
   127