multimediacommscontroller/mmccjitterbuffer/tsrc/ut_jitterbuffer/inc/mccdatasource_stub.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2008 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:    MCC data source stub for unit tests
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MCCDATASOURCESTUB_H
       
    21 #define MCCDATASOURCESTUB_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <mmf/server/mmfdatasource.h>
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28 *  Unit test stub for MDataSource
       
    29 */
       
    30 class CMccDataSourceStub : public CBase, public MDataSource
       
    31     {
       
    32     public:  // Constructors and destructor
       
    33 
       
    34         CMccDataSourceStub( TUid aType );
       
    35         ~CMccDataSourceStub();         
       
    36 
       
    37     public: // From MDataSource
       
    38 
       
    39         TFourCC SourceDataTypeCode(TMediaId aMediaId);
       
    40 
       
    41         void FillBufferL(
       
    42             CMMFBuffer* aBuffer,
       
    43             MDataSink* aConsumer,
       
    44             TMediaId aMediaId);
       
    45 
       
    46         void BufferEmptiedL(CMMFBuffer* aBuffer);
       
    47 
       
    48         TBool CanCreateSourceBuffer();
       
    49 
       
    50         CMMFBuffer* CreateSourceBufferL(
       
    51             TMediaId aMediaId,
       
    52             TBool &aReference);
       
    53 
       
    54         void ConstructSourceL(const TDesC8& aInitData);
       
    55     
       
    56         TInt SetSourceDataTypeCode(TFourCC aSourceFourCC, TMediaId aMediaId);
       
    57     
       
    58     private: // New functions
       
    59     
       
    60         void ReserveSomeMemoryForOomSimulationL();
       
    61         
       
    62     private: // Data
       
    63         
       
    64         CMMFBuffer* iBuffer;
       
    65     };
       
    66 
       
    67 #endif // MCCDATASOURCESTUB_H   
       
    68             
       
    69 // End of File