multimediacommscontroller/mmccsubcontroller/inc/mcculdatapath.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004-2007 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 UL datapath
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCCULDATAPATH_H
       
    22 #define MCCULDATAPATH_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "mccdatapathbase.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MMccResources;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Mcc UL Datapath declaration
       
    34 *
       
    35 *  @lib Mccsubthreads.lib
       
    36 *  @since Series 60 3.0
       
    37 */
       
    38 NONSHARABLE_CLASS( CMccUlDataPath ) : public CMccDataPathBase
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41             
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45         static CMccUlDataPath* NewL( MAsyncEventHandler* aEventHandler, 
       
    46                                      MMccResources* aMccResources,
       
    47                                      TMediaId aMediaId );
       
    48         
       
    49         /**
       
    50         * Destructor.
       
    51         */
       
    52 		virtual ~CMccUlDataPath();
       
    53 
       
    54     public: // New functions
       
    55 
       
    56         /**
       
    57         * Negotiates the source and sink
       
    58         * @since Series 60 3.0
       
    59         * @param aDataSink Sink to be negotiated with
       
    60         * @return void
       
    61         */
       
    62         // Silencing PC-lint warning due to CMccUlDataPath::NegotiateL
       
    63         // hiding MDataSink::NegotiateL.
       
    64         /*lint -e1411 */
       
    65         void NegotiateL( MDataSink& aDataSink );
       
    66         /*lint +e1411 */
       
    67         
       
    68         /**
       
    69         * Loads codec
       
    70         */
       
    71         void LoadL( MDataSink& aDataSink );
       
    72 
       
    73     public: // Functions from baseclasses
       
    74         /**
       
    75         * From MDataSource
       
    76         */
       
    77         void BufferEmptiedL( CMMFBuffer* aBuffer );
       
    78 
       
    79         /**
       
    80         * From MDataSink
       
    81         */
       
    82         void BufferFilledL( CMMFBuffer* aBuffer );
       
    83         
       
    84         /**
       
    85         * From CMccDataPathBase
       
    86         */
       
    87         void PrimeL( TUint32 aEndpointId );
       
    88 
       
    89         /**
       
    90         * From CMccDataPathBase
       
    91         */
       
    92         void PlayL( TUint32 aEndpointId );
       
    93 
       
    94         /**
       
    95         * From CMccDataPathBase
       
    96         */
       
    97         void PauseL( TUint32 aEndpointId );
       
    98         
       
    99         /**
       
   100         * From CMccDataPathBase
       
   101         */
       
   102         void StopL( TUint32 aEndpointId );
       
   103         
       
   104         /**
       
   105         * From CMccDataPathBase
       
   106         */
       
   107         void ResumeL( TUint32 aEndpointId );
       
   108         
       
   109         /**
       
   110         * From CMccDataPathBase
       
   111         */
       
   112         void FillSourceBufferL();
       
   113         
       
   114         /**
       
   115         * From CMccDataPathBase
       
   116         */
       
   117         void EmptySinkBufferL();
       
   118     
       
   119     private:    // Functions from baseclasses
       
   120     
       
   121         /**
       
   122         * From CMccDataPathBase
       
   123         */
       
   124         void DoEndOfDataL();
       
   125 
       
   126     private: // Constructors
       
   127 
       
   128         /**
       
   129         * C++ default constructor.
       
   130         */
       
   131         CMccUlDataPath( MAsyncEventHandler* aEventHandler, 
       
   132                         MMccResources* aMccResources,
       
   133                         TMediaId aMediaId  );
       
   134 
       
   135         /**
       
   136         * By default Symbian 2nd phase constructor is private.
       
   137         */
       
   138         void ConstructL();
       
   139 
       
   140     private:    // New functions
       
   141         
       
   142         void ActivateSinkBuffer();
       
   143         
       
   144     private:    // Friend classes
       
   145         #ifdef TEST_EUNIT
       
   146         friend class UT_CMccUlDataPath;
       
   147         #endif
       
   148         
       
   149     };
       
   150 
       
   151 #endif      // MCCULDATAPATH_H
       
   152             
       
   153 // End of File