richcallsettingsengine/rcse2/inc/crcseaudiocodecentry.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2002-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:  Single audio codec entry, which is stored to RCSE
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CRCSEAUDIOCODECENTRY_H
       
    21 #define CRCSEAUDIOCODECENTRY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 #include <crcseprofileentry.h>
       
    27 
       
    28 // CONSTANTS
       
    29 const TInt KMaxMediaTypeNameLenght = 64;
       
    30 const TInt KMaxCodecNameLength = 32;
       
    31 
       
    32 // Literals that are used to SetDefaultCodecValueSet for different
       
    33 // codecs (aCodecType).
       
    34 _LIT( KAudioCodecAMR,      "AMR"         );
       
    35 _LIT( KAudioCodeciLBC,     "iLBC"        );
       
    36 _LIT( KAudioCodecVMRWB,    "VMR-WB"      );
       
    37 _LIT( KAudioCodecPCMA,     "PCMA"        );
       
    38 _LIT( KAudioCodecPCMU,     "PCMU"        );
       
    39 _LIT( KAudioCodecG726_40,  "G726-40"     );
       
    40 _LIT( KAudioCodecG726_32,  "G726-32"     );
       
    41 _LIT( KAudioCodecG726_24,  "G726-24"     );
       
    42 _LIT( KAudioCodecG726_16,  "G726-16"     );
       
    43 _LIT( KAudioCodecCN,       "CN"          );
       
    44 _LIT( KAudioCodecG729,     "G729"        );
       
    45 _LIT( KAudioCodecAMRWB,    "AMR-WB"      );
       
    46 _LIT( KAudioCodecGSMEFR,   "GSM-EFR"     );
       
    47 _LIT( KAudioCodecGSMFR,    "GSM-FR"      );
       
    48 _LIT( KAudioCodecEVRC,     "EVRC"        );
       
    49 _LIT( KAudioCodecEVRC0,    "EVRC0"       );
       
    50 _LIT( KAudioCodecSMV,      "SMV"         );
       
    51 _LIT( KAudioCodecSMV0,     "SMV0"        );
       
    52 
       
    53 
       
    54 // CLASS DECLARATION
       
    55 
       
    56 /**
       
    57 *  Audio Codec entry, which is stored to RCSE.
       
    58 *
       
    59 *  @lib RCSE.lib
       
    60 *  @since Series 60 3.0
       
    61 */
       
    62 class CRCSEAudioCodecEntry : public CBase
       
    63     {
       
    64     public: // Enums
       
    65     
       
    66     enum TOnOff
       
    67         {
       
    68         EOONotSet = KNotSet,
       
    69         EOff = 0,
       
    70         EOn = 1
       
    71         };
       
    72 
       
    73     public: // Constructors and destructor
       
    74         
       
    75         /**
       
    76         * Two-phased constructor.
       
    77         */
       
    78         IMPORT_C static CRCSEAudioCodecEntry* NewL();
       
    79 
       
    80         /**
       
    81         * Two-phased constructor.
       
    82         */
       
    83         IMPORT_C static CRCSEAudioCodecEntry* NewLC();
       
    84 
       
    85         /**
       
    86         * Destructor.
       
    87         */
       
    88         IMPORT_C virtual ~CRCSEAudioCodecEntry();
       
    89         
       
    90     public: // New methods
       
    91       
       
    92         /**
       
    93         * Resets entry to default values.
       
    94         * @since Series 60 3.0
       
    95         */
       
    96         void ResetDefaultCodecValues();
       
    97         
       
    98         /**
       
    99         * Sets defeault values for different codecs.
       
   100         * @param aCodecType defines codec specific parameter default values.
       
   101         * @since Series 60 3.0
       
   102         */      
       
   103         IMPORT_C void SetDefaultCodecValueSet( TPtrC aCodecType );
       
   104         
       
   105     private:
       
   106     
       
   107         /**
       
   108         * C++ default constructor.
       
   109         * Initialises values to ENotSet.
       
   110         */
       
   111         CRCSEAudioCodecEntry();
       
   112 
       
   113 	    /**
       
   114     	* By default Symbian 2nd phase constructor is private.
       
   115     	*/
       
   116     	void ConstructL();
       
   117         
       
   118     public: // Data
       
   119     
       
   120         // Identifier of audio codec.
       
   121         TUint32 iCodecId;
       
   122         
       
   123         // Identifier of used for define Media type name.
       
   124         TBuf<KMaxMediaTypeNameLenght> iMediaTypeName;
       
   125             
       
   126         // Identifier of used for define media subtype name. This values is set by CRCSEAudioCodec, when
       
   127         // audio codec entry is got from CRCSEAudioCodec.
       
   128         TBuf<KMaxCodecNameLength> iMediaSubTypeName;
       
   129         
       
   130         // Jitter buffer size.        
       
   131         TInt32 iJitterBufferSize;
       
   132         
       
   133         // Octet-align.
       
   134         TOnOff iOctetAlign;
       
   135         
       
   136         // Mode-set.
       
   137         RArray<TUint32> iModeSet;
       
   138                 
       
   139         // Mode-change-period.
       
   140         TInt32 iModeChangePeriod;
       
   141         
       
   142         // Mode-change-neighbor.
       
   143         TOnOff iModeChangeNeighbor;
       
   144                 
       
   145         // Ptime.
       
   146         TInt32 iPtime;
       
   147         
       
   148         // Maxptime.
       
   149         TInt32 iMaxptime;
       
   150         
       
   151         // Crc.
       
   152         TOnOff iCrc;
       
   153         
       
   154         // Robust-sorting.
       
   155         TOnOff iRobustSorting;
       
   156         
       
   157         // Interleaving.
       
   158         TInt32 iInterLeaving;
       
   159         
       
   160         // Channels.
       
   161         RArray<TUint32> iChannels;
       
   162         
       
   163         // Voice Activation Deactivation (VAD).
       
   164         TOnOff iVAD;
       
   165         
       
   166         // Discontinous transmission (DTX).
       
   167         TOnOff iDTX;
       
   168         
       
   169         // Sampling rate.
       
   170         TInt32 iSamplingRate;
       
   171         
       
   172         // Annex b.
       
   173         TOnOff iAnnexb;
       
   174 
       
   175         // Mode change capability.
       
   176         TInt32 iModeChangeCapability;
       
   177 
       
   178         // Max-red.
       
   179         TInt32 iMaxRed;
       
   180     };
       
   181 
       
   182 #endif      // CRCSEAUDIOCODECENTRY_H   
       
   183             
       
   184 // End of File