imstutils/imconversationview/imcvuiengine/inc/mimcvenginefactory.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:  service engine factory class interface
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MIMCVENGINEFACTORY_H
       
    19 #define MIMCVENGINEFACTORY_H
       
    20 #include <e32def.h>
       
    21 
       
    22 //FORWARD DECLARATION
       
    23 class CIMCVEngine;
       
    24 class MIMCVEngineConnectionHandler;
       
    25 class MIMCVEngineOpenChatsObserver;
       
    26 class MIMCVEngineServiceChangeObserver;
       
    27 //CLASS  DECLARATION
       
    28 /**
       
    29  *  
       
    30  *  This class list the M-Class for Engine factory
       
    31  *
       
    32  *  @lib vimpstengine.lib
       
    33  *  @since S60 5.0
       
    34  */
       
    35 class MIMCVEngineFactory
       
    36     {
       
    37 
       
    38 public:	
       
    39 
       
    40     /**
       
    41      * return the engine instance for aServiceId.
       
    42      */
       
    43     virtual CIMCVEngine& GetServiceEngineL( TInt aServiceId ) = 0 ;
       
    44 
       
    45     /**
       
    46      * find and release the engine instance for aServiceId.
       
    47      */
       
    48     virtual void ReleaseServiceEngine( TInt aServiceId ) = 0 ;
       
    49 
       
    50 
       
    51     /**
       
    52      * GetDisplayNameL: returns the Identification       
       
    53      * @param aIndex - Index of the item for which Identification 
       
    54      *                 is required
       
    55      * @return TPtrC - Identification
       
    56      */
       
    57     virtual TPtrC GetDisplayNameL(TInt aIndex) const = 0;
       
    58 
       
    59 
       
    60     /**
       
    61      * GetTargetIdL: returns the Conversation Party ID      
       
    62      * @param aIndex - Index of the item 
       
    63      * @return Conversation Party ID
       
    64      */
       
    65     virtual const TDesC& GetTargetIdL(TInt aIndex) const = 0;
       
    66 
       
    67 
       
    68     /**
       
    69      * Count: Returns the number of items              
       
    70      * @return TInt - Total number of openchats item
       
    71      */
       
    72     virtual TInt Count() const = 0;
       
    73 
       
    74 
       
    75     /**
       
    76      * SetActiveItemL: Sets the item as the current active one       
       
    77      * @param aIndex - Index of the item
       
    78      * @return void
       
    79      */      
       
    80     virtual void SetActiveItemL( const TInt aIndex ) = 0;
       
    81 
       
    82 
       
    83     /**
       
    84      * GetActiveItem: Gets the current active conversation        
       
    85      * @return Active Conversation Party Id
       
    86      */
       
    87     virtual const TDesC& GetActiveItemL() const = 0;
       
    88 
       
    89     /**
       
    90      * Returns the pending messages status of the contact item 
       
    91      * @param aIndex - Index of the item
       
    92      * @return bool: true if the conversation item has pending messages
       
    93      * else return false
       
    94      */      
       
    95     virtual TBool IsMsgPendingL( const TInt aIndex ) const = 0;
       
    96 
       
    97     /**
       
    98      * Find the index of the item in the Conversation List 
       
    99      * @param aItem - Conversation Party Id      
       
   100      * @return aIndex - Index of the item        
       
   101      */
       
   102     virtual TInt FindIndexL(const TDesC& aItem) = 0;
       
   103 
       
   104     virtual void ResetL() = 0;
       
   105     
       
   106     /**
       
   107      * @see MVIMPSTEngineFactory
       
   108      */
       
   109     virtual void RegisterOpenChatObserver(MIMCVEngineOpenChatsObserver* aChatObserver) = 0 ;
       
   110     /**
       
   111      * @see MVIMPSTEngineFactory
       
   112      */
       
   113     virtual void UnRegisterOpenChatObserver() = 0 ;
       
   114     
       
   115        
       
   116     virtual TInt GetActiveServiceId() = 0 ;
       
   117 	/*
       
   118 	* return all availabe service engines
       
   119 	*/
       
   120     virtual RPointerArray<CIMCVEngine>&  GetServiceEngines() = 0;
       
   121     /**
       
   122      * @see MVIMPSTEngineFactory
       
   123      */
       
   124     virtual void RegisterServiceObserver(MIMCVEngineServiceChangeObserver* aServiceObserver) = 0 ;
       
   125     /**
       
   126      * @see MVIMPSTEngineFactory
       
   127      */
       
   128     virtual void UnRegisterServiceObserver() = 0 ;
       
   129     
       
   130     /**
       
   131      * ~CVIMPSTEngineFactory 
       
   132      * dont call delete 
       
   133      */
       
   134     virtual ~MIMCVEngineFactory() 
       
   135         {
       
   136 
       
   137         }
       
   138 
       
   139     };
       
   140 
       
   141 #endif //MIMCVENGINEFACTORY_H