uiservicetab/vimpstcmdprocess/inc/cvimpstcmdfactory.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:  Creates IM command objects.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVIMPSTCMDFACTORY_H
       
    20 #define CVIMPSTCMDFACTORY_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "mvimpstcmdfactory.h"
       
    25 #include "tvimpstenums.h"
       
    26 #include "mvimpstengineservicestateeventobserver.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MVIMPSTProcessArray;
       
    30 class MVIMPSTEngine;
       
    31 
       
    32 //  CLASS DECLARATION
       
    33 /**
       
    34  * Factory to create IM command objects.
       
    35  *  @lib vimpstcmdprocess.dll
       
    36  *  @since 5.0
       
    37  */
       
    38 NONSHARABLE_CLASS(CVIMPSTCmdFactory) :
       
    39         public CBase,
       
    40         public MVIMPSTCmdFactory,
       
    41         public MVIMPSTEngineServiceStateEventObserver
       
    42     {
       
    43     public: // Constructor and destructor
       
    44         /**
       
    45          * Static constructor.
       
    46          * @param aEngine, reference to engine.
       
    47          * @return A new instance of this class.
       
    48          */
       
    49         static CVIMPSTCmdFactory* NewL(MVIMPSTEngine& aEngine);
       
    50 
       
    51         /**
       
    52          * Destructor.
       
    53          */
       
    54         ~CVIMPSTCmdFactory();
       
    55 
       
    56     public: // From MImCommandFactory
       
    57         /**
       
    58          * See MImCommandFactory
       
    59          */
       
    60 		MVIMPSTCmd* CreateCommandForIdL(
       
    61 		        TImCommandId aCommandId,TAny* aData = NULL) ;
       
    62 
       
    63         /**
       
    64          * See MImCommandFactory
       
    65          */
       
    66 		void AddObserverL(MVIMPSTCmdObserver* aObserver) ;    
       
    67 
       
    68 		/**
       
    69          * See MImCommandFactory
       
    70          */
       
    71 		void RemoveObserver(MVIMPSTCmdObserver* aObserver);
       
    72 
       
    73 		/**
       
    74 		 * @returns reference to process interface.
       
    75 		 */
       
    76 		MVIMPSTProcessArray& GetProcessInterface() ;    
       
    77     
       
    78     private:// form MVIMPSTEngineServiceStateEventObserver
       
    79         
       
    80        /**
       
    81 	    * Observer Event for Service State changes
       
    82 	    * @param aState - Indicates the service state
       
    83 	    * @parma aServiceError, error if any.
       
    84 	    */       
       
    85 	 	void HandleServiceEventL
       
    86 	    			( TVIMPSTEnums::TVIMPSTRegistrationState aState, TInt aServiceError ) ;
       
    87             
       
    88     private: // Implementation
       
    89         /**
       
    90          * symbian default constructor.
       
    91          * @param aEngine, reference to engine.
       
    92          */
       
    93         CVIMPSTCmdFactory(MVIMPSTEngine& aEngine);
       
    94         
       
    95         /**
       
    96          * Second phase constructor.
       
    97          */
       
    98         void ConstructL();
       
    99 
       
   100     private: // Data
       
   101         // owned ,pointer to CIMArrayProcess
       
   102     	MVIMPSTProcessArray* iArrayProcess;
       
   103         
       
   104         //not owned        
       
   105         RPointerArray<MVIMPSTCmdObserver> iObservers;
       
   106         
       
   107         //Ref to the engine item for current service
       
   108         MVIMPSTEngine& iEngine;
       
   109         
       
   110     };
       
   111 
       
   112 #endif // CVIMPSTCMDFACTORY_H
       
   113 
       
   114 // End of File