multimediacommsengine/tsrc/MMCTestDriver/MCETester/inc/TCmdCreateSession.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:    See class definition below.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __TCmdCreateSession_H__
       
    21 #define __TCmdCreateSession_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include "TTcMceCommandBase.h"
       
    25 #include "CSessionHelper.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CMceOutSession;
       
    29 
       
    30 // CLASS DEFINITION
       
    31 /**
       
    32  * Command class responsible for "Establish" functionality.
       
    33  */
       
    34 class TCmdCreateSession
       
    35 	: public TTcMceCommandBase
       
    36 	{
       
    37 	public:
       
    38 	
       
    39 	enum TStreamType
       
    40 		{
       
    41 		EStreamAudio = 0,
       
    42 		EStreamVideo
       
    43 		};
       
    44 	
       
    45 	public:	// Constructors and destructor
       
    46 
       
    47 		/**
       
    48 		 * Constructor.
       
    49 		 *
       
    50 		 * @param aContext SIP Test case context
       
    51 		 */
       
    52 		TCmdCreateSession( MTcTestContext& aContext )
       
    53 							  : TTcMceCommandBase( aContext ) {};
       
    54 
       
    55 	public: 
       
    56 
       
    57 		void ExecuteL();
       
    58 		
       
    59 	public: // New methods
       
    60 
       
    61 		/**
       
    62 		 * Static function for matching the name of this command to
       
    63 		 * a function identifier.
       
    64 		 *
       
    65 		 * @param aId An initialized identifier containing a function name.
       
    66 		 * @return ETrue if this command matches the specified name.
       
    67 		 */
       
    68 		static TBool Match( const TTcIdentifier& aId );
       
    69 
       
    70 		/**
       
    71 		 * Static fuction for creating an instance of this class
       
    72 		 *
       
    73 		 * @param aContext MCE Test case context
       
    74 		 * @return An initialized instance of this class.
       
    75 		 */
       
    76 		static TTcCommandBase* CreateL( MTcTestContext& aContext );
       
    77 		
       
    78 	protected:
       
    79 		
       
    80 		void CreateOutSessionL();
       
    81 											 
       
    82 		virtual CMceSession* CreateSessionL( CMceManager& aManager,
       
    83                         					 CSIPProfile& aProfile,
       
    84                         					 const TDesC8& aRecipient,
       
    85 											 HBufC8* aOriginator  );
       
    86 											 
       
    87 		virtual CMceSession* CreateSessionL( CMceEvent& aEvent );
       
    88 		virtual CMceSession* CreateSessionL( CMceRefer& aRefer );
       
    89 		
       
    90 		/**
       
    91 		 * Removes codecs in the given order. 
       
    92 		 * Adds codecs priorities according to the given order in the list 
       
    93 		 * @param aStreamOut
       
    94 		 * @param aStreamIn
       
    95 		 * @param aCodecsList
       
    96 		 * @param aType type of the stream EStreamAudio || EStreamAudio
       
    97 		 */
       
    98 		TInt RemoveMediaCodecsL(CMceMediaStream* aStreamOut, CMceMediaStream* aStreamIn,
       
    99 				CDesC8Array* aCodecsList, TStreamType aType);
       
   100 
       
   101 	private:
       
   102 		CSessionHelper iSessionHelper;
       
   103 
       
   104 	};
       
   105 
       
   106 #endif // __TCmdCreateSession_H__