multimediacommsengine/tsrc/MCETestUI/MCETestUIEngine/inc/CMCETestUIEngineOutSession.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 __CMCETESTUIENGINEOUTSESSION_H__
       
    22 #define __CMCETESTUIENGINEOUTSESSION_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32base.h>
       
    26 #include "cmcetestuiengine.h"
       
    27 #include "CMCETestUIEngineSession.h"
       
    28 #include <mcerefer.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 
       
    32 class CMceOutSession;
       
    33 class CMCETestUIEngine;
       
    34 class CMCETestUIEngineCmdBase;
       
    35 class CMceVideoStream;
       
    36 class CMceVideoCodec;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40 * 
       
    41 * CMCETestUIEngineOutSession provides a wrapper for CMCEOutSession.
       
    42 * Class is not the traditional wrapper in a sense that it would 
       
    43 * conform to interface provided by CMCEOutSession. Instead class
       
    44 * implements interface MMCETestUIEngineCmdProvider to provide
       
    45 * same kind of functionality in controlled way on different levels 
       
    46 * of abstraction.
       
    47 *
       
    48 */
       
    49 
       
    50 class CMCETestUIEngineOutSession : public CMCETestUIEngineSession
       
    51     {
       
    52         
       
    53     public: // Constructors and destructors
       
    54 
       
    55         /**
       
    56         * Two-phased constructor. Not imported.
       
    57         */
       
    58         static CMCETestUIEngineOutSession* NewL(
       
    59             CMCETestUIEngine& aEngine, 
       
    60             CMCETestUIEngineProfile& aProfile,
       
    61             TDirection aDirection,
       
    62             TVideoDirection aVideoDirection,
       
    63             TSessionType aSessionType );
       
    64         
       
    65          /**
       
    66         * Two-phased constructor. Not imported.
       
    67         */
       
    68         static CMCETestUIEngineOutSession* NewL(
       
    69             CMCETestUIEngine& aEngine, 
       
    70             TUint32 aIAPId,
       
    71             TDirection aDirection,
       
    72             TVideoDirection aVideoDirection,
       
    73             TSessionType aSessionType );
       
    74             
       
    75          /**
       
    76         * Two-phased constructor. Not imported.
       
    77         */
       
    78         static CMCETestUIEngineOutSession* NewL(
       
    79             CMCETestUIEngine& aEngine, 
       
    80             CMceRefer &aRefer,
       
    81             TDirection aDirection,
       
    82             TVideoDirection aVideoDirection,
       
    83             TSessionType aSessionType);
       
    84 	    /**
       
    85 	    * Two-phased constructor.
       
    86 	    * @param aEvent, reference to existing event that is associated
       
    87 	    *        with this session.
       
    88 	    */
       
    89         //static CMCETestUIEngineOutSession* NewL(
       
    90         //    CMCETestUIEngine& aEngine, TDirection aDirection );
       
    91 
       
    92 
       
    93 	    /**
       
    94 	    * Two-phased constructor.
       
    95 	    * @param aRefer, reference to existing refer that is associated
       
    96 	    *        with this session.
       
    97 	    */
       
    98         //static CMCETestUIEngineOutSession* NewL(
       
    99         //    CMCETestUIEngine& aEngine, TDirection aDirection );
       
   100 
       
   101             
       
   102     	/**
       
   103     	* Destructor.
       
   104     	*/
       
   105     	IMPORT_C virtual ~CMCETestUIEngineOutSession();
       
   106 
       
   107     public: // From MMCETestUICommandProvider
       
   108 
       
   109        /**
       
   110         * Gets the commands applicaple to this outsession object.
       
   111         *
       
   112         * @return reference to array of commands
       
   113         */
       
   114         IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& 
       
   115                     GetCommandsL();
       
   116 
       
   117 
       
   118     public: // From base class 
       
   119 
       
   120         /**
       
   121         * @return Id of this particular outsession object
       
   122         */        
       
   123         IMPORT_C TInt Id() const;
       
   124 	    
       
   125     public: // New functions, internal
       
   126 
       
   127         /**
       
   128         * Gets wrapped MCEOutSession object
       
   129         * 
       
   130         * @return wrapped MCEOutSession
       
   131         */    	    
       
   132 	    CMceOutSession& OutSession();	
       
   133 	    
       
   134 	    TBool SessionParamsL(TSessionParams &aSessionParams, TSessionType aSessionType);
       
   135 
       
   136     public:
       
   137      	TSessionParams iSessionParams;
       
   138      	 
       
   139      	TSessionType iSessionType;
       
   140 
       
   141     private:  // private constructors
       
   142 	    
       
   143         /**
       
   144         * C++ default constructor.
       
   145         */
       
   146         CMCETestUIEngineOutSession();	
       
   147 
       
   148         /**
       
   149         * C++ first phase constructor.
       
   150         */
       
   151         CMCETestUIEngineOutSession( 
       
   152                 CMCETestUIEngine& aEngine,
       
   153                 CMCETestUIEngineProfile& aProfile,
       
   154                 TDirection aDirection ,
       
   155                 TVideoDirection aVideoDirection ,
       
   156                 TSessionType aSessionType);
       
   157         
       
   158          /**
       
   159         * C++ first phase constructor.
       
   160         */
       
   161         CMCETestUIEngineOutSession( 
       
   162                 CMCETestUIEngine& aEngine,
       
   163                 TUint32 aIAPId,
       
   164                 TDirection aDirection ,
       
   165                 TVideoDirection aVideoDirection ,
       
   166                 TSessionType aSessionType);
       
   167 
       
   168 		/**
       
   169         * C++ first phase constructor.
       
   170         */
       
   171         CMCETestUIEngineOutSession( 
       
   172                 CMCETestUIEngine& aEngine,
       
   173                 CMceRefer &aRefer,
       
   174                 TDirection aDirection ,
       
   175                 TVideoDirection aVideoDirection ,
       
   176                 TSessionType aSessionType);
       
   177 
       
   178        	/**
       
   179         * Symbian second-phase constructor
       
   180         */
       
   181         void ConstructL();	   
       
   182         
       
   183         void ConstructL(CMceRefer& aRefer);
       
   184         // to fill poc session related data
       
   185         void FillPoCSessionData(CMceOutSession* aSession);
       
   186         
       
   187         // to fill voip session related data
       
   188         void FillVoIPSessionData(CMceOutSession* aSession);
       
   189         // to fill custom session related data
       
   190         void FillCustomSessionData(CMceOutSession* aSession);
       
   191         
       
   192         //to fill profile registrar in the recipent 
       
   193         
       
   194         void FillProfileRegistrar();
       
   195         
       
   196         void FillPoCOrigAddress();
       
   197         
       
   198         void Fill2WayVideoSessionDataL(CMceOutSession* aOutSession);
       
   199         
       
   200         CMceVideoCodec* GetVideoCodec( 
       
   201             CMceVideoStream& aStream, const TDesC8& aSdpName );
       
   202         
       
   203         
       
   204     private:  // owned data
       
   205     
       
   206         // Wrapped CMCEOutSession object
       
   207         CMceOutSession* iOutSession;
       
   208  
       
   209     private:  // not owned data
       
   210         
       
   211         // Profile to be used in session creation
       
   212         CMCETestUIEngineProfile* iProfile;
       
   213         
       
   214         CMceRefer* iRefer;
       
   215         
       
   216         TInt iId;
       
   217         
       
   218         TUint32 iIapId;
       
   219        
       
   220         
       
   221         
       
   222         //MCE_UNIT_TEST_DEFS;
       
   223         
       
   224     };
       
   225 
       
   226 #endif