multimediacommsengine/tsrc/MCETestUI/MCETestUIEngine/inc/CMCETestUIEngineOutRefer.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __CMCETESTUIENGINEOUTREFER_H__
       
    22 #define __CMCETESTUIENGINEOUTREFER_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include "CMCETestUIEngineRefer.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 class CMceOutRefer;
       
    31 class CMCETestUIEngine;
       
    32 class CMCETestUIEngineCmdBase;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36 * 
       
    37 * CMCETestUIEngineOutSession provides a wrapper for CMCEOutSession.
       
    38 * Class is not the traditional wrapper in a sense that it would 
       
    39 * conform to interface provided by CMCEOutSession. Instead class
       
    40 * implements interface MMCETestUIEngineCmdProvider to provide
       
    41 * same kind of functionality in controlled way on different levels 
       
    42 * of abstraction.
       
    43 *
       
    44 */
       
    45 
       
    46 class TReferParams
       
    47 		{
       
    48 		public:
       
    49 		 TBuf<200>	iRecipentAddress;
       
    50 		 TBuf<200>	iReferTo;
       
    51 		 TInt type;
       
    52 		 TBuf<100> originator;
       
    53 		};
       
    54 
       
    55 class CMCETestUIEngineOutRefer : public CMCETestUIEngineRefer
       
    56     {
       
    57         
       
    58     public: // Constructors and destructors
       
    59 
       
    60 	     
       
    61         /**
       
    62         * Two-phased constructor. Not imported.
       
    63         */
       
    64         static CMCETestUIEngineOutRefer* NewL(
       
    65             CMCETestUIEngine& aEngine, 
       
    66             CMCETestUIEngineProfile& aProfile );
       
    67 
       
    68 		static CMCETestUIEngineOutRefer* NewL(
       
    69             CMCETestUIEngine& aEngine, 
       
    70             CMCETestUIEngineSession& aSession );
       
    71 
       
    72 		static CMCETestUIEngineOutRefer* NewL(
       
    73             CMCETestUIEngine& aEngine, 
       
    74             CMCETestUIEngineEvent& aEvent );
       
    75 
       
    76 	                
       
    77     	/**
       
    78     	* Destructor.
       
    79     	*/
       
    80     	IMPORT_C virtual ~CMCETestUIEngineOutRefer();
       
    81 
       
    82     public: // From MMCETestUICommandProvider
       
    83 
       
    84        /**
       
    85         * Gets the commands applicaple to this outsession object.
       
    86         *
       
    87         * @return reference to array of commands
       
    88         */
       
    89         IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& 
       
    90                     GetCommandsL();
       
    91 
       
    92 
       
    93     public: // From base class 
       
    94 
       
    95         /**
       
    96         * @return Id of this particular outsession object
       
    97         */        
       
    98         IMPORT_C TInt Id() const;
       
    99 	    
       
   100     public: // New functions, internal
       
   101 
       
   102         /**
       
   103         * Gets wrapped MCEOutSession object
       
   104         * 
       
   105         * @return wrapped MCEOutSession
       
   106         */    	    
       
   107 	    CMceOutRefer& OutRefer();	
       
   108 	    
       
   109 	    TBool ReferParamsL(TReferParams &aReferParams);
       
   110 	    
       
   111 	    TBool ReferToParamsL(TReferParams &aReferParams);
       
   112 
       
   113     public:
       
   114      	TReferParams iReferParams;
       
   115      	 
       
   116 
       
   117     private:  // private constructors
       
   118 	    
       
   119         /**
       
   120         * C++ default constructor.
       
   121         */
       
   122         CMCETestUIEngineOutRefer();	
       
   123 
       
   124         /**
       
   125         * C++ first phase constructor.
       
   126         */
       
   127         CMCETestUIEngineOutRefer( 
       
   128                 CMCETestUIEngine& aEngine,
       
   129                 CMCETestUIEngineProfile& aProfile);
       
   130                 
       
   131 		CMCETestUIEngineOutRefer( 
       
   132                 CMCETestUIEngine& aEngine,
       
   133                 CMCETestUIEngineSession& aSession);
       
   134         CMCETestUIEngineOutRefer( 
       
   135                 CMCETestUIEngine& aEngine,
       
   136                 CMCETestUIEngineEvent& aEvent);
       
   137        	/**
       
   138         * Symbian second-phase constructor
       
   139         */
       
   140         void ConstructL(CMCETestUIEngineProfile& aProfile);	
       
   141         
       
   142         void ConstructL(CMCETestUIEngineSession& aSession);	
       
   143         
       
   144         void ConstructL(CMCETestUIEngineEvent& aEvent);	
       
   145         
       
   146         
       
   147         // to fill profile registrar in the recipent
       
   148         
       
   149         void FillProfileRegistrar();   
       
   150         
       
   151         
       
   152     private:  // owned data
       
   153     
       
   154         // Wrapped CMCEOutSession object
       
   155         CMceOutRefer* iOutRefer;
       
   156  
       
   157     private:  // not owned data
       
   158         
       
   159         // Profile to be used in session creation
       
   160         CMCETestUIEngineProfile* iProfile;
       
   161         
       
   162         CMCETestUIEngineSession* iSession;
       
   163         
       
   164         CMCETestUIEngineEvent* iEvent;
       
   165         
       
   166         TInt iId;
       
   167                 
       
   168         
       
   169         //MCE_UNIT_TEST_DEFS;
       
   170         
       
   171     };
       
   172 
       
   173 #endif