multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsink.h
branchrcs
changeset 49 64c62431ac08
child 50 1d8943dd8be6
equal deleted inserted replaced
44:fb024d5e35fa 49:64c62431ac08
       
     1 /*
       
     2 * Copyright (c) 2004-2006 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:    Provides a comfort noise generator class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MCCMSRPSINK_H
       
    20 #define MCCMSRPSINK_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 #include "mccdatasink.h"
       
    25 #include "mmccevents.h"
       
    26 #include "mccmsrpdatasender.h"
       
    27 #include "mccmsrpinterface.h"
       
    28 
       
    29 class CMccMsrpDataSender;
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 
       
    33 /**
       
    34 *  
       
    35 */
       
    36 class CMccMsrpSink : public CMccDataSink, public TMccMsrpSessionParams
       
    37     {
       
    38     public: // Methods called internally or by the controller
       
    39 
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         */
       
    43         static MDataSink* NewSinkL( TUid aImplementationUid, 
       
    44                                         const TDesC8& aInitData );
       
    45                                         
       
    46 		void ConstructSinkL ( const TDesC8& aInitData );
       
    47 
       
    48 		virtual ~CMccMsrpSink();
       
    49 
       
    50     public: // From MDataSink
       
    51 
       
    52         TFourCC SinkDataTypeCode( TMediaId /*aMediaId*/ );
       
    53 
       
    54         TInt SetSinkDataTypeCode( TFourCC aCodec, 
       
    55                                     TMediaId aMedia );
       
    56 
       
    57         void BufferEmptiedL( CMMFBuffer* aBuffer );
       
    58         
       
    59         TBool CanCreateSinkBuffer();
       
    60         
       
    61         CMMFBuffer* CreateSinkBufferL( TMediaId, 
       
    62                                          TBool& aReference );
       
    63         
       
    64         TInt SinkThreadLogon( MAsyncEventHandler& aEventHandler );
       
    65         
       
    66         void SinkThreadLogoff();
       
    67 
       
    68         void SinkPrimeL();
       
    69         
       
    70         void SinkPlayL();
       
    71         
       
    72         void SinkPauseL();
       
    73         
       
    74         void SinkStopL();
       
    75 
       
    76         void EmptyBufferL( CMMFBuffer* aBuffer,
       
    77                           MDataSource* aProvider,
       
    78                           TMediaId aMediaId );
       
    79                           
       
    80         void BufferFilledL( CMMFBuffer* aBuffer );
       
    81         
       
    82         void SetSessionParamsL( const TMccMsrpSessionParams& aParams );
       
    83 
       
    84     private:
       
    85     
       
    86         CMccMsrpSink();
       
    87     
       
    88 		void SendStreamEventToClient( const TMccEventType& aEventType, 
       
    89 		                              TInt aError = KErrNone );
       
    90         
       
    91 
       
    92     private:
       
    93 		
       
    94 	    MAsyncEventHandler* iAsyncEventHandler;
       
    95 	    TBool iPaused;
       
    96 	    TFourCC iFourCC;
       
    97 	    
       
    98 	    CMccMsrpDataSender* iDataSender;
       
    99 
       
   100 	#ifdef EUNIT_TEST
       
   101         friend class UT_CMccMsrpSink;
       
   102     #endif	
       
   103         };
       
   104 
       
   105 
       
   106 #endif 
       
   107 
       
   108 
       
   109 // End of file
       
   110