uiservicetab/vimpstengine/inc/cvimpstenginecontactmgmtextention.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     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: Implements the Contact Management Extention Feature
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CVIMPSTENGINECONTACTMGMTEXTENTION_H
       
    19 #define __CVIMPSTENGINECONTACTMGMTEXTENTION_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "mvimpstenginecontactmgmtextention.h"
       
    25 #include "tvimpstenums.h"
       
    26 #include "mvimpstenginesessioncntxtobserver.h"
       
    27 
       
    28 // FORWARD DECLARATIONS           
       
    29 class CVIMPSTEngineRequestMapper;
       
    30 class MPresentityGroups;
       
    31 class MXIMPContext;
       
    32 class MXIMPIdentity;
       
    33    
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36  * This Class implements the Contact Management Extention Feature
       
    37  * @lib vimpstengine.lib
       
    38  * @since S60 5.0 
       
    39  */
       
    40 NONSHARABLE_CLASS( CVIMPSTEngineContactMgmtExtention ) : public CBase,							   
       
    41 							   public MVIMPSTEngineContactMgmtExtention,
       
    42 							   public MVIMPSTEngineSessionCntxtObserver
       
    43 						 	
       
    44     {
       
    45     //for test cases
       
    46     friend class T_VIMPSTEngineContactMgmtExtention;
       
    47 
       
    48     public:  // Two-phased constructors and destructor
       
    49 
       
    50         /**
       
    51          * Two-phased constructor.
       
    52          * @param aPresContext: presence context
       
    53          * @param aPresGroup - Presentity Group
       
    54          * @param aRequestMapper: Request Mapper for XIMP Events
       
    55          */
       
    56         
       
    57         static CVIMPSTEngineContactMgmtExtention* NewL(
       
    58         					MXIMPContext& aPresenceCtx,
       
    59         					MPresentityGroups& aPresGroup,
       
    60 							CVIMPSTEngineRequestMapper& aRequestMapper);
       
    61         /**
       
    62          * Two-phased constructor.
       
    63          * @param aPresContext: presence context
       
    64          * @param aPresGroup - Presentity Group
       
    65          * @param aRequestMapper: Request Mapper for XIMP Events
       
    66          */										
       
    67         static CVIMPSTEngineContactMgmtExtention* NewLC(
       
    68         					MXIMPContext& aPresenceCtx,
       
    69         					MPresentityGroups& aPresGroup,
       
    70 							CVIMPSTEngineRequestMapper& aRequestMapper);
       
    71 
       
    72         /**
       
    73          * C++ Destructor.
       
    74          */
       
    75         virtual ~CVIMPSTEngineContactMgmtExtention();
       
    76         
       
    77    	
       
    78     private:
       
    79 		
       
    80         /**
       
    81          * default constructor
       
    82          * @param aPresContext: presence context
       
    83          * @param aPresGroup - Presentity Group
       
    84          * @param aRequestMapper: event observer to get the notifications of the events.
       
    85          */
       
    86         CVIMPSTEngineContactMgmtExtention(
       
    87         					MXIMPContext& aPresenceCtx,
       
    88         					MPresentityGroups& aPresGroup,
       
    89 							CVIMPSTEngineRequestMapper& aRequestMapper);
       
    90         
       
    91         
       
    92 	 	/**
       
    93 	     * CreateIdentityLC 
       
    94 	     * create the identity for given param
       
    95 	     * @ aparam  aListId, to create
       
    96 	     * @ return pointer to MPrFwIdentity
       
    97 	     */
       
    98 	 	MXIMPIdentity* CreateIdentityLC(const TDesC& aListId) ;
       
    99 	 	
       
   100 	 
       
   101     public: // See MVIMPSTEngineContactMgmtExtention   	
       
   102 		
       
   103         /**
       
   104 	     * See MVIMPSTEngineContactMgmtExtention	     
       
   105 		 */
       
   106          TInt AddServerContactL(const TDesC& aContactList, 
       
   107          						const TDesC& aUserId,const TDesC& aNickname,
       
   108          						TBool aWaitToComplete = ETrue ) ;
       
   109         
       
   110         
       
   111          /**
       
   112 	     * See MVIMPSTEngineContactMgmtExtention	     
       
   113 		 */
       
   114          TInt DeleteServerContactL( const TDesC& aContactListId, const TDesC& aUserId ) ;
       
   115 		
       
   116 	
       
   117 	private:
       
   118 		/**
       
   119 		 * See MVIMPSTEngineSessionCntxtObserver		 
       
   120 		 */ 
       
   121 		void HandleSessionContextEventL( const MXIMPContext& aContext, 
       
   122                                           const MXIMPBase& aEvent,
       
   123                                           TXimpOperation aXimpOperation = EVIMPSTXimpOperationNoOperation);	                       
       
   124 
       
   125 	public: // From MVIMPSTEngineExtentionFeatures
       
   126 	
       
   127 		/**
       
   128 		* See MVIMPSTEngineExtentionFeatures
       
   129 		*/
       
   130 		TVIMPSTEnums::FeatureSupport IsSupported() const;
       
   131 		
       
   132 		
       
   133 		/**
       
   134 		* See MVIMPSTEngineExtentionFeatures
       
   135 		*/
       
   136 		TVIMPSTEnums::ExtentionType Type() const;
       
   137 		
       
   138 		/**
       
   139          * See MVIMPSTEngineExtentionFeatures
       
   140          */
       
   141         void  SetSupported(TVIMPSTEnums::FeatureSupport aSupported) ;
       
   142 
       
   143     		
       
   144     private:   	
       
   145     	
       
   146     	// not own 
       
   147     	MXIMPContext& 		iPresenceCtx;
       
   148     	
       
   149     	// not deletable
       
   150     	MPresentityGroups& 		iPresGroup; 	
       
   151     	 
       
   152     	
       
   153        //doesnt own
       
   154         CVIMPSTEngineRequestMapper& iRequestMapper;         
       
   155        
       
   156     	//Whether the extention Feature Supported or not
       
   157     	TVIMPSTEnums::FeatureSupport 	iSupported; 
       
   158     	    	
       
   159     	//Result code from waited request
       
   160 	    TInt    iReqResult;
       
   161 	    
       
   162     };
       
   163     
       
   164 #endif      //__CVIMPSTENGINECONTACTMGMTEXTENTION_H
       
   165 
       
   166 // End of File