multimediacommscontroller/tsrc/stubs/inc/mccgenericdatasink_STUB.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCCGENERICDATASINK_H
       
    22 #define MCCGENERICDATASINK_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include "mccdatasink.h"
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // DATA TYPES
       
    32 
       
    33 // FUNCTION PROTOTYPES
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 *
       
    41 */
       
    42 class CMccGenericDataSink : 
       
    43     public CMccDataSink 
       
    44     {
       
    45     public:
       
    46     
       
    47         CMccGenericDataSink ( TUid aType ) :
       
    48             CMccDataSink( aType ),
       
    49             iCanCreateSinkBuffer( ETrue ),
       
    50             iFourCC( KMccFourCCIdH263 ),
       
    51             iSinkBuffer( NULL )
       
    52             { };
       
    53     
       
    54         virtual ~CMccGenericDataSink() { }
       
    55         
       
    56     public: // From MDataSink
       
    57     
       
    58         /**
       
    59         * From MDataSink pure virtual function that must be implemented.
       
    60         *                 Returns the data type as a fourCC code of the data sink.
       
    61         * @since Series 60 3.0
       
    62         * @param "aMediaId" This identifies the type of media eg audio and the stream id.
       
    63         *                    This parameter is required in cases where the sink can accept data
       
    64         *                    of more than one media type.
       
    65         * @return the datatype code ( codec ).
       
    66         */
       
    67         TFourCC SinkDataTypeCode( TMediaId /*aMediaId*/ ) { return iFourCC; };
       
    68 
       
    69         /**
       
    70         * From MDataSink. Pure virtual function that must be implemented.
       
    71         *                  Out of usage. Leave KErrNotSupported.
       
    72         * @since Series 60 3.0
       
    73         * @param "aBuffer" Out of usage
       
    74         * @param "aSupplier" Out of usage
       
    75         * @param "aMediaId" Out of usage
       
    76         * @return void
       
    77         */
       
    78         void EmptyBufferL( CMMFBuffer* /*aBuffer*/, 
       
    79                            MDataSource* /*aSupplier*/, 
       
    80                            TMediaId /*aMediaId*/ ) { };
       
    81 
       
    82         /**
       
    83         * From MDataSink pure virtual function that must be implemented. 
       
    84         *                 Out of usage. Function leaves with KErrNotSupported.  
       
    85         * @since    Series 60 3.0
       
    86         * @param    "aCodec" Out of usage
       
    87         * @param    aMedia    Out of usage
       
    88         * @return    void
       
    89         */
       
    90         void BufferFilledL( CMMFBuffer* /*aBuffer*/ ) { };
       
    91 
       
    92         /**
       
    93         * From MDataSink pure virtual function that must be implemented.
       
    94         * Method to indicate whether the data sink can create a buffer.
       
    95         * @deprecated
       
    96         *
       
    97         * @since Series 60 3.0
       
    98         * @param "aBuffer" Out of usage
       
    99         * @return False
       
   100         */
       
   101         TBool CanCreateSinkBuffer()
       
   102           { return iCanCreateSinkBuffer; };
       
   103 
       
   104         /**
       
   105         * From MDataSink pure virtual function that must be implemented.
       
   106         * Out of usage. Function leaves with KErrNotSupported.
       
   107         * @deprecated
       
   108         *
       
   109         * @since Series 60 3.0
       
   110         * @param "aMediaId" Out of usage.
       
   111         * @param "aReference" Out of useage.
       
   112         * @return 
       
   113         */
       
   114         CMMFBuffer* CreateSinkBufferL( TMediaId /*aMediaId*/, 
       
   115                                        TBool& /*aReference*/ )
       
   116             { return iSinkBuffer; };
       
   117                                   
       
   118         /**
       
   119         * Method to perform any sink construction dependant on the sink construction
       
   120         * initialisation data aInitData
       
   121         *
       
   122         * This is a pure virtual function that a derrived data sink must implement
       
   123         *
       
   124         * @param    "aInitData"
       
   125         *            Sink specific initialisation data required for sink construction
       
   126         */
       
   127         void ConstructSinkL( const TDesC8& /*aInitData*/ ) { };
       
   128         
       
   129     public: // From MMccDataSink
       
   130     
       
   131         virtual void GetParameterL( TUint32 aParam, TDes8& aVal )
       
   132             {
       
   133             if ( aParam == iParam )
       
   134                 {
       
   135                 aVal = iVal;
       
   136                 }
       
   137             }
       
   138         
       
   139         virtual void SetParameterL( TUint32 aParam, const TDesC8& aVal )
       
   140             {
       
   141             iParam = aParam;
       
   142             iVal = aVal;
       
   143             }
       
   144         
       
   145     protected:
       
   146     
       
   147         TUint32 iParam;
       
   148         
       
   149         TBuf8<100> iVal;
       
   150     
       
   151         TBool iCanCreateSinkBuffer;
       
   152         
       
   153         TFourCC iFourCC;
       
   154 
       
   155         CMMFBuffer* iSinkBuffer;
       
   156     };
       
   157     
       
   158 
       
   159 #endif      // MCCGENERICDATASINK_H   
       
   160             
       
   161 // End of File