multimediacommscontroller/mmccinterface/inc/mmcccodeccn.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 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:    Class is used for configuring comfornt noise codec.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MCC_CODEC_CN_H__
       
    22 #define __MCC_CODEC_CN_H__
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32cmn.h>
       
    26 #include "mmcccodecinformation.h"
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 const TInt KCnPTime = 20;
       
    31 const TInt KCnMaxPTime = 200;
       
    32 const TUint KCnSamplingFreq = 8000;
       
    33 
       
    34 // MACROS
       
    35 
       
    36 // DATA TYPES
       
    37 
       
    38 // FUNCTION PROTOTYPES
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 
       
    42 // CLASS DECLARATION
       
    43 /**
       
    44 *  Container class for the codec information.
       
    45 *
       
    46 *  @lib mmccinterface.dll
       
    47 *  
       
    48 */
       
    49 NONSHARABLE_CLASS( CMccCodecCn ) : public CMccCodecInformation
       
    50     {
       
    51     public:  // Constructors and destructor
       
    52 
       
    53         /**
       
    54         * Two-phased constructor.
       
    55         */
       
    56         static CMccCodecCn* NewL();
       
    57         
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         virtual ~CMccCodecCn();
       
    62         
       
    63     public: // New functions
       
    64     
       
    65     public: // From CMccCodecInformation
       
    66     
       
    67         /**
       
    68         * From CMccCodecInformation
       
    69         */
       
    70         TBool RequireSignalling( const CMccCodecInformation& aCandidate ) const;     
       
    71         
       
    72         /**
       
    73         * From CMccCodecInformation
       
    74         */
       
    75         CMccCodecInformation* CloneDefaultsL();
       
    76         
       
    77         /**
       
    78         * From CMccCodecInformation
       
    79         */
       
    80         CMccCodecInformation* CloneDetailedL();
       
    81         
       
    82         /**
       
    83         * From CMccCodecInformation. Enable / Disable Voice Activity Detection.
       
    84         * @since    Series 60 3.0
       
    85         * @param    aEnableVAD    Boolean indicating whether to enable Voice Activity Detection
       
    86         * @return   KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
       
    87         */
       
    88         TInt EnableVAD( TBool aEnableVAD );
       
    89      
       
    90         /**
       
    91         * From CMccCodecInformation. Sets bitrate used with codec.
       
    92         * @since     Series 60 3.0
       
    93         * @param     aBitrate     New bitrate value
       
    94         * @return    KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
       
    95         */
       
    96         TInt SetBitrate( TUint aBitrate );
       
    97         
       
    98         /**
       
    99         * From CMccCodecInformation. Sets the sampling frequency.
       
   100         * @since    Series 60 3.0
       
   101         * @param    aSamplingFreq   Sampling frequency to be used
       
   102         * @return   KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
       
   103         */
       
   104         TInt SetSamplingFreq( TUint32 aSamplingFreq );
       
   105 
       
   106         /**
       
   107         * From CMccCodecInformation. Sets the packet rate.
       
   108         * @since     Series 60 3.0
       
   109         * @param     aPacketrate        New packetrate
       
   110         * @return    KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
   111         */
       
   112         TInt SetPTime( TUint aPTime );
       
   113         
       
   114         /**
       
   115         * From CMccCodecInformation. Sets the packet rate.
       
   116         * @since     Series 60 3.0
       
   117         * @param     aPacketrate        New packetrate
       
   118         * @return    KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
       
   119         */
       
   120         TInt SetMaxPTime( TUint aMaxPTime );
       
   121         
       
   122         /**
       
   123         * From CMccCodecInformation. Sets the sdp name.
       
   124         * @since Series 60 3.0
       
   125         * @param aRtpId - [input] RTP session ID
       
   126         * @return One of the standard system-wide error codes.
       
   127         */
       
   128         TInt SetSdpName( const TDesC8& aSdpName );
       
   129         
       
   130         /**
       
   131         * From CMccCodecInformation. Sets the payload type.
       
   132         * @since Series 60 3.0
       
   133         * @param aRtpId - [input] RTP session ID
       
   134         * @return One of the standard system-wide error codes.
       
   135         */
       
   136         TInt SetPayloadType( TUint8 aPayloadType );
       
   137 
       
   138         /**
       
   139         * From CMccCodecInformation. Sets the codec mode.
       
   140         * @since         Series 60 3.0
       
   141         * @param aMode   Codec mode ( e.g. ULAW/ALAW, Bandwidth efficient / octet aligned )
       
   142         * @return        KErrNotSupported if codec doesnt' support codec mode value issued; otherwise KErrNone.
       
   143         */
       
   144         TInt SetCodecMode( TCodecMode aCodecMode ); 
       
   145         
       
   146         /**
       
   147         * Set Allowed BitRate
       
   148         * @since    Series 60 3.0
       
   149         * @param    aBitRateMask
       
   150         *                       
       
   151         * @return   Etrue, if Mask is valid
       
   152         */
       
   153         TInt SetAllowedBitrates( TUint aBitrateMask );
       
   154 
       
   155            
       
   156     private:
       
   157         /**
       
   158         * C++ default constructor.
       
   159         */
       
   160         CMccCodecCn();
       
   161 
       
   162         /**
       
   163         * By default Symbian 2nd phase constructor is private.
       
   164         */
       
   165         void ConstructL();        
       
   166     private:
       
   167         #ifdef TEST_EUNIT
       
   168             friend class UT_CMccCodecCn;
       
   169         #endif     
       
   170     };
       
   171 
       
   172 
       
   173 #endif      // __MCC_CODEC_CN_H__
       
   174 
       
   175 // End of File