multimediacommsengine/tsrc/MCETestUI/MCETestUIEngine/inc/CMCETestUIEngineVideoStream.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 __CMCETESTUIENGINEVIDEOSTREAM_H__
       
    22 #define __CMCETESTUIENGINEVIDEOSTREAM_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <MCEVideoCodec.h>
       
    26 #include <MCEMediaSource.h>
       
    27 #include <MCEMediaSink.h>
       
    28 
       
    29 #include "MMCETestUIEngineCmdProvider.h"
       
    30 #include <e32base.h>
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 
       
    34 class CMCETestUIEngine;
       
    35 class CMceVideoStream;
       
    36 class CMCETestUIEngineVideoSink;
       
    37 class CMCETestUIEngineVideoSource;
       
    38 class CMCETestUIEngineVideoCodec;
       
    39 
       
    40 
       
    41 // CLASS DECLARATION
       
    42 /**
       
    43 * 
       
    44 * CMCETestUIEngineAudioStream provides a wrapper for CMCEAudioStream.
       
    45 * Class is not the traditional wrapper in a sense that it would 
       
    46 * conform to interface provided by CMCESession. Instead class
       
    47 * implements interface MMCETestUIEngineCmdProvider to provide
       
    48 * same kind of functionality in controlled way on different levels 
       
    49 * of abstraction.
       
    50 *
       
    51 */
       
    52 class CMCETestUIEngineVideoStream : public CBase,
       
    53                                     public MMCETestUIEngineCmdProvider
       
    54     {
       
    55 
       
    56     public: // public enumerations
       
    57     
       
    58         enum TVideoDirection
       
    59             {
       
    60             EUpLink = 0,
       
    61             EDownLink,
       
    62             ENotSpesified            
       
    63             };
       
    64         
       
    65     public: // Constructors and destructors
       
    66             
       
    67     	/**
       
    68     	* Destructor.
       
    69     	*/
       
    70     	IMPORT_C virtual ~CMCETestUIEngineVideoStream();
       
    71 
       
    72        /**
       
    73         * Two-phased constructor. Not imported.
       
    74         */
       
    75         static CMCETestUIEngineVideoStream* NewL(
       
    76             CMCETestUIEngine& aEngine, 
       
    77             CMceVideoStream& aVideoStream );
       
    78             
       
    79     public: // From MMCETestUICommandProvider
       
    80 
       
    81         /**
       
    82         * Gets the commands applicaple to this session object.
       
    83         *
       
    84         * @return reference to array of commands
       
    85         */
       
    86         IMPORT_C const RPointerArray<TMCETestUIEngineCmdBase>& 
       
    87                     GetCommandsL();
       
    88 
       
    89     public: // New functions
       
    90 	    
       
    91 	     /**
       
    92         * @return Textual representation of the state of the wrapped MCEStream
       
    93         */
       
    94 	    IMPORT_C const TDesC16& StreamState() ;
       
    95 	    /**
       
    96 	    * @return Direction of the session
       
    97 	    */
       
    98 	    IMPORT_C CMCETestUIEngineVideoStream::TVideoDirection VideoDirection() const;
       
    99 	    
       
   100 	    /**
       
   101 	    * @return Textual representation of session's direction
       
   102 	    */
       
   103 	    IMPORT_C const TDesC16& TextualVideoDirection() const;
       
   104 
       
   105 	    /**
       
   106 	    * Gets the state of the stream
       
   107 	    * @return Textual representation of streams state
       
   108 	    */
       
   109         IMPORT_C const TDesC16& State() const;
       
   110         
       
   111         
       
   112         IMPORT_C const RPointerArray<CMCETestUIEngineVideoSource>& SourcesL();
       
   113         
       
   114         IMPORT_C const RPointerArray<CMCETestUIEngineVideoSink>& SinksL();
       
   115         
       
   116         IMPORT_C RPointerArray<CMCETestUIEngineVideoCodec>& CodecsL(); 
       
   117         
       
   118         IMPORT_C RPointerArray<CMCETestUIEngineVideoCodec>& CurrentCodecs();       
       
   119         
       
   120         	    
       
   121     public: // New functions, internal
       
   122 
       
   123         /**
       
   124         * Gets wrapped MCEAudioStream object
       
   125         * 
       
   126         * @return wrapped MCEMCEAudioStream
       
   127         */
       
   128         CMceVideoStream& VideoStream();		
       
   129         
       
   130         /**
       
   131         *
       
   132         * Solves and sets the direction of session based on streams and
       
   133         * their properties.
       
   134         *
       
   135         * @return the newly set direction of session
       
   136         */
       
   137         
       
   138         CMCETestUIEngineVideoStream::TVideoDirection SolveVideoDirection();
       
   139         
       
   140         TInt iOneTimeRTCPFlag;
       
   141         
       
   142         
       
   143     private:  // private constructors
       
   144 	    
       
   145         /**
       
   146         * C++ default constructor. Not implemented.
       
   147         */
       
   148         CMCETestUIEngineVideoStream();	
       
   149     
       
   150     protected:
       
   151     
       
   152         /**
       
   153         * C++ first phase constructor.
       
   154         */
       
   155         CMCETestUIEngineVideoStream( 
       
   156                     CMCETestUIEngine& aEngine,
       
   157                     CMceVideoStream& aVideoStream );
       
   158 
       
   159        	/**
       
   160         * Symbian second-phase constructor
       
   161         */
       
   162         void ConstructL();	   
       
   163         
       
   164     protected:  // owned data  
       
   165     
       
   166         // Commands applicable to an audiostream. Owned.
       
   167                
       
   168        RPointerArray<TMCETestUIEngineCmdBase> iCommands;
       
   169        
       
   170        RPointerArray<CMCETestUIEngineVideoSource> iSources;
       
   171        RPointerArray<CMCETestUIEngineVideoSink> iSinks;
       
   172        RPointerArray<CMCETestUIEngineVideoCodec> iCodecs;
       
   173 	    
       
   174  
       
   175     protected:  // not owned data
       
   176         
       
   177        CMCETestUIEngine& iEngine;       
       
   178     
       
   179        // Reference to wrapped MCEAudioStream
       
   180        CMceVideoStream& iVideoStream;
       
   181 
       
   182        // Indicator of direction
       
   183        CMCETestUIEngineVideoStream::TVideoDirection iVideoDirection;
       
   184         
       
   185     };
       
   186 
       
   187 #endif