multimediacommscontroller/mmccinterface/tsrc/ut_interface/src/UT_CMCCCodecInformation.cpp
changeset 0 1bce908db942
child 32 f2ed1fc4c163
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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 //  CLASS HEADER
       
    22 #include "UT_CMccCodecInformation.h"
       
    23 
       
    24 //  EXTERNAL INCLUDES
       
    25 #include <digia/eunit/EUnitMacros.h>
       
    26 #include <digia/eunit/CEunitAllocTestCaseDecorator.h>
       
    27 
       
    28 
       
    29 //  INTERNAL INCLUDES
       
    30 #include "MmccCodecInformation.h"
       
    31 #include "MmccCodecAMR.h"
       
    32 #include "mmcccodecinformationfactory.h"
       
    33 #include "mccinternalcodecs.h"
       
    34 
       
    35 // CONSTRUCTION
       
    36 UT_CMccCodecInformation* UT_CMccCodecInformation::NewL()
       
    37     {
       
    38     UT_CMccCodecInformation* self = UT_CMccCodecInformation::NewLC(); 
       
    39     CleanupStack::Pop();
       
    40 
       
    41     return self;
       
    42     }
       
    43 
       
    44 UT_CMccCodecInformation* UT_CMccCodecInformation::NewLC()
       
    45     {
       
    46     UT_CMccCodecInformation* self = new( ELeave ) UT_CMccCodecInformation();
       
    47     CleanupStack::PushL( self );
       
    48 
       
    49     self->ConstructL(); 
       
    50 
       
    51     return self;
       
    52     }
       
    53 
       
    54 // Destructor (virtual by CBase)
       
    55 UT_CMccCodecInformation::~UT_CMccCodecInformation()
       
    56     {
       
    57     }
       
    58 
       
    59 // Default constructor
       
    60 UT_CMccCodecInformation::UT_CMccCodecInformation()
       
    61     {
       
    62     }
       
    63 
       
    64 // Second phase construct
       
    65 void UT_CMccCodecInformation::ConstructL()
       
    66     {
       
    67     // The ConstructL from the base class CEUnitTestSuiteClass must be called.
       
    68     // It generates the test case table.
       
    69     CEUnitTestSuiteClass::ConstructL();
       
    70     }
       
    71 
       
    72 //Callback functions (not used)
       
    73 void UT_CMccCodecInformation::MccEventReceived( const TMccEvent& /*aEvent*/ ){}
       
    74 void UT_CMccCodecInformation::MccMediaStarted( TUint32 /*aSessionId*/,
       
    75                             TUint32 /*aLinkId*/,     
       
    76                             TUint32 /*aStreamId*/,
       
    77                             TUint32 /*aSinkSourceId*/ ){}
       
    78                             
       
    79 void UT_CMccCodecInformation::MccMediaStopped( TUint32 /*aSessionId*/,
       
    80                             TUint32 /*aLinkId*/,
       
    81                             TUint32 /*aStreamId*/,
       
    82                             TUint32 /*aSinkSourceId*/ ){}
       
    83                             
       
    84 void UT_CMccCodecInformation::MccMediaPaused( TUint32 /*aSessionId*/,
       
    85                            TUint32 /*aLinkId*/,
       
    86                             TUint32 /*aStreamId*/,
       
    87                             TUint32 /*aSinkSourceId*/ ){}
       
    88                            
       
    89 void UT_CMccCodecInformation::MccMediaResumed( TUint32 /*aSessionId*/,
       
    90                             TUint32 /*aLinkId*/,
       
    91                             TUint32 /*aStreamId*/,
       
    92                             TUint32 /*aSinkSourceId*/ ){}
       
    93                             
       
    94 void UT_CMccCodecInformation::MccMediaPrepared( TUint32 /*aSessionId*/,
       
    95                              TUint32 /*aLinkId*/,
       
    96                             TUint32 /*aStreamId*/,
       
    97                             TUint32 /*aSinkSourceId*/ ){}
       
    98                              
       
    99 void UT_CMccCodecInformation::MccMediaInactive( TUint32 /*aSessionId*/,
       
   100                              TUint32 /*aLinkId*/,
       
   101                             TUint32 /*aStreamId*/,
       
   102                             TUint32 /*aSinkSourceId*/ ){}
       
   103                              
       
   104 void UT_CMccCodecInformation::MccMediaActive( TUint32 /*aSessionId*/,
       
   105                              TUint32 /*aLinkId*/,
       
   106                             TUint32 /*aStreamId*/,
       
   107                             TUint32 /*aSinkSourceId*/ ){}
       
   108                              
       
   109 void UT_CMccCodecInformation::MccCtrlError( TInt /*aError*/ ){}
       
   110 
       
   111 void UT_CMccCodecInformation::MccCtrlError( TInt /*aError*/,
       
   112                            TUint32 /*aSessionId*/,
       
   113                            TUint32 /*aLinkId*/,
       
   114                             TUint32 /*aStreamId*/,
       
   115                             TUint32 /*aSinkSourceId*/ ){}
       
   116 
       
   117 //  METHODS
       
   118 void UT_CMccCodecInformation::SetupL()
       
   119     {
       
   120     iInterface = CMccInterface::NewL( *this );    
       
   121     GetCapabilitiesL( iCodecArray );
       
   122     iCount = iCodecArray.Count();
       
   123     } 
       
   124 
       
   125 void UT_CMccCodecInformation::Teardown()
       
   126     {
       
   127  
       
   128     if( iInterface )
       
   129         {
       
   130         delete iInterface;
       
   131         iInterface = NULL;
       
   132         }
       
   133         
       
   134     iCodecArray.ResetAndDestroy();
       
   135     iCodecArray.Close();    
       
   136     }
       
   137 
       
   138 
       
   139 void UT_CMccCodecInformation::UT_CMccCodecInformation_CloneDefaultsLL()
       
   140     {
       
   141     RPointerArray< CMccCodecInformation > codecArray1;
       
   142     RPointerArray< CMccCodecInformation > codecArray2;
       
   143     CleanupResetAndDestroy< RPointerArray< CMccCodecInformation > >::PushL( codecArray1 );
       
   144     CleanupResetAndDestroy< RPointerArray< CMccCodecInformation > >::PushL( codecArray2 );
       
   145    
       
   146     GetCapabilitiesL( codecArray1 );
       
   147     
       
   148     TInt count = codecArray1.Count();
       
   149     CMccCodecInformation* temp = NULL;
       
   150     
       
   151     EUNIT_ASSERT( count > 0 );
       
   152 
       
   153     for( TInt k = 0; k < count; k++ )
       
   154         {
       
   155         //Clone defaults
       
   156         temp = codecArray1[k]->CloneDefaultsL();
       
   157         CleanupStack::PushL( temp );
       
   158         User::LeaveIfError( codecArray2.Append( temp ) );
       
   159         CleanupStack::Pop( temp );
       
   160         temp = NULL;
       
   161         
       
   162         EUNIT_ASSERT( codecArray2[k] != NULL );
       
   163         }
       
   164     
       
   165     CleanupStack::Pop(2); // array1 & array2        
       
   166     codecArray1.ResetAndDestroy();
       
   167     codecArray1.Close();
       
   168     
       
   169     codecArray2.ResetAndDestroy();
       
   170     codecArray2.Close();
       
   171     }
       
   172 
       
   173 void UT_CMccCodecInformation::UT_CMccCodecInformation_CloneDetailedLL()
       
   174     {
       
   175     RPointerArray<CMccCodecInformation> codecArray1;
       
   176     RPointerArray<CMccCodecInformation> codecArray2;
       
   177     CleanupResetAndDestroy< RPointerArray<CMccCodecInformation> >::PushL( codecArray1 );
       
   178     CleanupResetAndDestroy< RPointerArray<CMccCodecInformation> >::PushL( codecArray2 );
       
   179     
       
   180     GetCapabilitiesL( codecArray1 );
       
   181      
       
   182     TInt count = codecArray1.Count();
       
   183     CMccCodecInformation* temp = NULL;
       
   184     
       
   185     //Check that the arrary is not empty
       
   186     EUNIT_ASSERT( count > 0 );
       
   187 
       
   188     for( TInt k = 0; k < count; k++ )
       
   189         {
       
   190         //Clone detailed
       
   191         temp = codecArray1[k]->CloneDetailedL();
       
   192         CleanupStack::PushL( temp );
       
   193         User::LeaveIfError( codecArray2.Append( temp ) );
       
   194         CleanupStack::Pop( temp );
       
   195         temp = NULL;
       
   196         
       
   197         EUNIT_ASSERT( codecArray2[k] != NULL );
       
   198         }
       
   199     
       
   200     CleanupStack::Pop(2); // array1 & array2
       
   201     codecArray1.ResetAndDestroy();
       
   202     codecArray1.Close();
       
   203     
       
   204     codecArray2.ResetAndDestroy();
       
   205     codecArray2.Close();
       
   206     }
       
   207 
       
   208 void UT_CMccCodecInformation::UT_CMccCodecInformation_RequireSignallingL()
       
   209     {        
       
   210     // Test base class
       
   211     EUNIT_ASSERT( !iCodecArray[ 0 ]->CMccCodecInformation::RequireSignalling( *iCodecArray[ 0 ] ) );
       
   212     
       
   213     // Test not changing
       
   214     for ( TInt i = 0; i < iCodecArray.Count(); i++ )
       
   215         {
       
   216         EUNIT_ASSERT( !iCodecArray[ i ]->RequireSignalling( *iCodecArray[ i ] ) );
       
   217         }
       
   218         
       
   219     // Test changing
       
   220     for ( TInt j = 0; j < iCodecArray.Count(); j++ )
       
   221         {
       
   222         CMccCodecInformation* codec = iCodecArray[ j ]->CloneDetailedL();
       
   223         CleanupStack::PushL( codec );
       
   224         
       
   225         codec->SetPTime( 100 );
       
   226         codec->SetMaxPTime( 100 );
       
   227         codec->SetPayloadType( 99 );
       
   228         codec->SetCodecMode( EOctetAligned );
       
   229         codec->SetAllowedBitrates( 0 );
       
   230         codec->SetMaxBitrate( 63000 );
       
   231         codec->SetFramerate( 13 );
       
   232         codec->SetFrameHeight( 100 );
       
   233         codec->SetFrameWidth( 100 );
       
   234         
       
   235         EUNIT_ASSERT( iCodecArray[ j ]->RequireSignalling( *codec ) );
       
   236         
       
   237         CleanupStack::PopAndDestroy( codec );
       
   238         }
       
   239     }
       
   240 
       
   241 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetValuesL()
       
   242     {
       
   243     for( TInt k = 1; k < iCount; k++ )
       
   244         {      
       
   245         TMccCodecInfo codecInfo;
       
   246         iCodecArray[k]->SetValues(codecInfo);
       
   247         }    
       
   248     }
       
   249 
       
   250 void UT_CMccCodecInformation::UT_CMccCodecInformation_GetValuesL()
       
   251     {
       
   252     TMccCodecInfo codecinfo;
       
   253 
       
   254     for( TInt k = 1; k < iCount; k++ )
       
   255         {      
       
   256         TMccCodecInfo codecinfo;
       
   257 
       
   258         iCodecArray[k]->GetValues(codecinfo);
       
   259         }
       
   260     }
       
   261 
       
   262 void UT_CMccCodecInformation::UT_CMccCodecInformation_TypeL(  )
       
   263     {
       
   264     TMccCodecInfo codecinfo;
       
   265 
       
   266     for( TInt k = 1; k < iCount; k++ )
       
   267         {      
       
   268         TMccCodecInfo codecinfo;
       
   269         TUid uidi = iCodecArray[k]->Type();
       
   270         }
       
   271     }
       
   272 
       
   273 void UT_CMccCodecInformation::UT_CMccCodecInformation_EnableVADL()
       
   274     {  
       
   275     //Confirm that the arrary is not empty
       
   276     EUNIT_ASSERT( iCount > 0 );
       
   277     
       
   278     TInt error( KErrNone );
       
   279      
       
   280     for( TInt k = 0; k < iCount; k++ )
       
   281         {
       
   282         //If AMR
       
   283         if ( iCodecArray[k]->SdpName().Compare( KAMRSdpName ) == 0 )
       
   284             {
       
   285             error = iCodecArray[k]->EnableVAD( EFalse );
       
   286             EUNIT_ASSERT_EQUALS( error, KErrNone );
       
   287         
       
   288             error = iCodecArray[k]->EnableVAD( ETrue );
       
   289             EUNIT_ASSERT_EQUALS( error, KErrNone );
       
   290             }
       
   291         
       
   292         else
       
   293             {
       
   294             error = iCodecArray[k]->EnableVAD( EFalse );
       
   295             //EUNIT_ASSERT_EQUALS( error, KErrNotSupported );
       
   296         
       
   297             error = iCodecArray[k]->EnableVAD( ETrue );
       
   298             //EUNIT_ASSERT_EQUALS( error, KErrNotSupported );
       
   299             }
       
   300         }
       
   301     }
       
   302 
       
   303 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetBitrateL()
       
   304     {  
       
   305     //Confirm that the arrary is not empty
       
   306     EUNIT_ASSERT( iCount > 0 );
       
   307     
       
   308     CMccCodecInformation* codecAMR = NULL;
       
   309     
       
   310     TInt bitrate( 0 );
       
   311     
       
   312     // Find the AMR codec
       
   313     for ( TInt i = 0; i < iCount; i++ )
       
   314         {
       
   315         //If amr
       
   316         if ( iCodecArray[i]->SdpName().Compare( KAMRSdpName ) == 0 )
       
   317             {
       
   318             EUNIT_ASSERT_EQUALS( KErrNotSupported, iCodecArray[i]->SetBitrate( bitrate ) );
       
   319             }
       
   320         else
       
   321             {
       
   322             iCodecArray[i]->SetBitrate( bitrate );
       
   323             }
       
   324         }  
       
   325     }
       
   326 
       
   327 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetSamplingFreqL()
       
   328     {    
       
   329     //Confirm that the arrary is not empty
       
   330     EUNIT_ASSERT( iCount > 0 );
       
   331     
       
   332     TInt error( KErrNone );
       
   333     
       
   334     //Call parent class method
       
   335     //Currently no other sampling frequencies than 8000Hz are supported
       
   336     error = iCodecArray[0]->SetSamplingFreq( 5 );
       
   337     EUNIT_ASSERT_EQUALS( error, KErrNotSupported );
       
   338     
       
   339     // Real codecs may support also other freqs
       
   340     for( TInt k = 0; k < iCount; k++ )
       
   341         {
       
   342         error = iCodecArray[k]->SetSamplingFreq( 0 );
       
   343         //EUNIT_ASSERT_EQUALS( error, KErrNone );
       
   344         }
       
   345     }
       
   346 
       
   347 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetSdpNameL(  )
       
   348     {
       
   349     // test implemented in inhereted classes.
       
   350     EUNIT_ASSERT( ETrue );
       
   351     }
       
   352 
       
   353 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetPayloadTypeL(  )
       
   354     {
       
   355     // test implemented in inhereted classes.
       
   356     EUNIT_ASSERT( ETrue );
       
   357     }
       
   358 
       
   359 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetCodecModeL(  )
       
   360     {
       
   361     // test implemented in inhereted classes.
       
   362     EUNIT_ASSERT( ETrue );
       
   363     }
       
   364 
       
   365 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetAllowedBitratesL(  )
       
   366     {        
       
   367     TInt error( KErrNone );
       
   368     TUint bitrateMask;
       
   369     TInt bitrate;    
       
   370     HBufC* fmtp16 = NULL;
       
   371     
       
   372     for( TInt k = 0; k < iCount; k++ )
       
   373         {
       
   374         /*
       
   375         const TUint KMccAllowedAmrNbBitrate475 = 0x0001;
       
   376         const TUint KMccAllowedAmrNbBitrate515 = 0x0002;
       
   377         const TUint KMccAllowedAmrNbBitrate590 = 0x0004;
       
   378         const TUint KMccAllowedAmrNbBitrate670 = 0x0008;
       
   379         const TUint KMccAllowedAmrNbBitrate740 = 0x0010;
       
   380         const TUint KMccAllowedAmrNbBitrate795 = 0x0020;
       
   381         const TUint KMccAllowedAmrNbBitrate102 = 0x0040;
       
   382         const TUint KMccAllowedAmrNbBitrate122 = 0x0080;
       
   383         const TUint KMccAllowedAmrNbBitrateAll = 0x00FF;
       
   384         */
       
   385         
       
   386         //If AMR
       
   387         if ( iCodecArray[k]->SdpName().Compare( KAMRSdpName ) == 0 )
       
   388             {
       
   389             _LIT( KTxtFmtp2, "TestSetAllowedBitratesL, Fmtp : %s" );
       
   390             
       
   391             TUint bitrateNotAllowed = 0xFFFF;
       
   392             bitrateMask = KMccAllowedAmrNbBitrateAll;
       
   393             
       
   394             bitrate = iCodecArray[k]->Bitrate();
       
   395             
       
   396             if( bitrate == 12200 )
       
   397                 {
       
   398                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 12200 == %d"), bitrate );
       
   399                 }
       
   400             else
       
   401                 {
       
   402                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 12200 == %d"), bitrate );
       
   403                 User::Leave( KErrGeneral  );
       
   404                 }
       
   405             
       
   406             EUNIT_ASSERT_NO_LEAVE( iCodecArray[k]->CMccCodecInformation::SetAllowedBitrates( 5 ) );
       
   407             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   408             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   409            
       
   410             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   411             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   412             
       
   413             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   414             CleanupStack::PopAndDestroy( fmtp16 );
       
   415             
       
   416             //////////////// new test
       
   417             bitrateMask = KMccAllowedAmrNbBitrate475;
       
   418             
       
   419             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   420             
       
   421             bitrate = iCodecArray[k]->Bitrate();
       
   422             
       
   423             if( bitrate == 4750 )
       
   424                 {
       
   425                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 4750 == %d"), bitrate );
       
   426                 }
       
   427             else
       
   428                 {
       
   429                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 4750 == %d"), bitrate );
       
   430                 User::Leave( KErrGeneral  );
       
   431                 }
       
   432                 
       
   433             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ));
       
   434            
       
   435             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   436             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   437             
       
   438             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   439             CleanupStack::PopAndDestroy( fmtp16 );
       
   440             
       
   441             //////////////// new test
       
   442             bitrateMask = KMccAllowedAmrNbBitrate515;
       
   443             
       
   444             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   445             
       
   446             bitrate = iCodecArray[k]->Bitrate();
       
   447             
       
   448             if( bitrate == 5150 )
       
   449                 {
       
   450                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 5150 == %d"), bitrate );
       
   451                 }
       
   452             else
       
   453                 {
       
   454                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 5150 == %d"), bitrate );
       
   455                 User::Leave( KErrGeneral  );
       
   456                 }
       
   457                 
       
   458             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   459            
       
   460             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   461             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   462             
       
   463             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   464             CleanupStack::PopAndDestroy( fmtp16 );
       
   465             
       
   466             //////////////// new test
       
   467             bitrateMask = KMccAllowedAmrNbBitrate590;
       
   468             
       
   469             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   470             
       
   471             bitrate = iCodecArray[k]->Bitrate();
       
   472             
       
   473             if( bitrate == 5900 )
       
   474                 {
       
   475                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 5900 == %d"), bitrate );
       
   476                 }
       
   477             else
       
   478                 {
       
   479                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 5900 == %d"), bitrate );
       
   480                 User::Leave( KErrGeneral  );
       
   481                 }
       
   482             
       
   483             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   484            
       
   485             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   486             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   487             
       
   488             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   489             CleanupStack::PopAndDestroy( fmtp16 );
       
   490             
       
   491             //////////////// new test
       
   492             bitrateMask = KMccAllowedAmrNbBitrate670;
       
   493             
       
   494             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   495             
       
   496             bitrate = iCodecArray[k]->Bitrate();
       
   497             
       
   498             if( bitrate == 6700 )
       
   499                 {
       
   500                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 6700 == %d"), bitrate );
       
   501                 }
       
   502             else
       
   503                 {
       
   504                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 6700 == %d"), bitrate );
       
   505                 User::Leave( KErrGeneral  );
       
   506                 }
       
   507                 
       
   508             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   509            
       
   510             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   511             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   512             
       
   513             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   514             CleanupStack::PopAndDestroy( fmtp16 );
       
   515             
       
   516             //////////////// new test
       
   517             bitrateMask = KMccAllowedAmrNbBitrate740;
       
   518             
       
   519             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   520             
       
   521             bitrate = iCodecArray[k]->Bitrate();
       
   522             
       
   523             if( bitrate == 7400 )
       
   524                 {
       
   525                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 7400 == %d"), bitrate );
       
   526                 }
       
   527             else
       
   528                 {
       
   529                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 7400 == %d"), bitrate );
       
   530                 User::Leave( KErrGeneral  );
       
   531                 }
       
   532                 
       
   533             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   534            
       
   535             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   536             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   537             
       
   538             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   539             CleanupStack::PopAndDestroy( fmtp16 );
       
   540             
       
   541             //////////////// new test
       
   542             bitrateMask = KMccAllowedAmrNbBitrate795;
       
   543             
       
   544             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   545             
       
   546             bitrate = iCodecArray[k]->Bitrate();
       
   547             
       
   548             if( bitrate == 7950 )
       
   549                 {
       
   550                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 7950 == %d"), bitrate );
       
   551                 }
       
   552             else
       
   553                 {
       
   554                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 7950 == %d"), bitrate );
       
   555                 User::Leave( KErrGeneral  );
       
   556                 }
       
   557                 
       
   558             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   559            
       
   560             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   561             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   562             
       
   563             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   564             CleanupStack::PopAndDestroy( fmtp16 );
       
   565             
       
   566              //////////////// new test
       
   567             bitrateMask = KMccAllowedAmrNbBitrate102;
       
   568             
       
   569             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   570             
       
   571             bitrate = iCodecArray[k]->Bitrate();
       
   572             
       
   573             if( bitrate == 10200 )
       
   574                 {
       
   575                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 10200 == %d"), bitrate );
       
   576                 }
       
   577             else
       
   578                 {
       
   579                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 10200 == %d"), bitrate );
       
   580                 User::Leave( KErrGeneral  );
       
   581                 }
       
   582                 
       
   583             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   584            
       
   585             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   586             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   587             
       
   588             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   589             CleanupStack::PopAndDestroy( fmtp16 );
       
   590             
       
   591              //////////////// new test
       
   592             bitrateMask = KMccAllowedAmrNbBitrate122;
       
   593             
       
   594             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   595             
       
   596             bitrate = iCodecArray[k]->Bitrate();
       
   597             
       
   598             if( bitrate == 12200 )
       
   599                 {
       
   600                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 12200 == %d"), bitrate );
       
   601                 }
       
   602             else
       
   603                 {
       
   604                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 12200 == %d"), bitrate );
       
   605                 User::Leave( KErrGeneral  );
       
   606                 }
       
   607                 
       
   608             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   609            
       
   610             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   611             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   612             
       
   613             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   614             CleanupStack::PopAndDestroy( fmtp16 );
       
   615             
       
   616              //////////////// new test
       
   617             bitrateMask = KMccAllowedAmrNbBitrate740 | KMccAllowedAmrNbBitrate102;
       
   618             
       
   619             User::LeaveIfError( iCodecArray[k]->SetAllowedBitrates( bitrateMask ) );
       
   620             bitrate = iCodecArray[k]->Bitrate();
       
   621             
       
   622             if( bitrate == 10200 )
       
   623                 {
       
   624                 RDebug::Print( _L("TestSetAllowedBitratesL - CORRECT - bitrate 10200 == %d"), bitrate );
       
   625                 }
       
   626             else
       
   627                 {
       
   628                 RDebug::Print( _L("TestSetAllowedBitratesL - ERROR - bitrate 10200 == %d"), bitrate );
       
   629                 User::Leave( KErrGeneral  );
       
   630                 }
       
   631             
       
   632             User::LeaveIfError( iCodecArray[k]->SetCodecMode( EOctetAligned ) );
       
   633            
       
   634             fmtp16 = HBufC::NewLC( iCodecArray[k]->GetFmtpL().Length() + 1 );
       
   635             fmtp16->Des().Copy( iCodecArray[k]->GetFmtpL() );
       
   636             
       
   637             RDebug::Print( KTxtFmtp2, fmtp16->Des().PtrZ() );
       
   638             CleanupStack::PopAndDestroy( fmtp16 );
       
   639             }
       
   640         
       
   641         else
       
   642             {
       
   643             }
       
   644         }
       
   645     }
       
   646 
       
   647 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetPTimeL(  )
       
   648     {
       
   649     // test implemented in inhereted classes.
       
   650     EUNIT_ASSERT( ETrue );
       
   651     }
       
   652 
       
   653 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetMaxPTimeL(  )
       
   654     {
       
   655     // test implemented in inhereted classes.
       
   656     EUNIT_ASSERT( ETrue );
       
   657     }
       
   658 
       
   659 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetJitterBufBufferLengthL(  )
       
   660     {
       
   661     for( TInt k = 0; k < iCount; k++ )
       
   662         {
       
   663         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetJitterBufBufferLength( 4 ), KErrUnderflow );
       
   664         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetJitterBufBufferLength( 5 ), KErrNone );
       
   665         }
       
   666     }
       
   667 
       
   668 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetJitterBufThresholdL(  )
       
   669     {
       
   670     for( TInt k = 0; k < iCount; k++ )
       
   671         {
       
   672         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetJitterBufThreshold( 5 ), KErrNone );
       
   673         }
       
   674     }
       
   675 
       
   676 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetJitterBufInactivityTimeOutL(  )
       
   677     {
       
   678     for( TInt k = 0; k < iCount; k++ )
       
   679         {
       
   680         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetJitterBufInactivityTimeOut( 5 ), KErrNone );
       
   681         }
       
   682     }
       
   683 
       
   684 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetMaxBitrateL(  )
       
   685     {
       
   686     for( TInt k = 0; k < iCount; k++ )
       
   687         {
       
   688         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetMaxBitrate( 128000 ), KErrNone );
       
   689         }
       
   690     }
       
   691 
       
   692 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetAverageBitrateL(  )
       
   693     {
       
   694     for( TInt k = 0; k < iCount; k++ )
       
   695         {
       
   696         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetAverageBitrate( 12200 ), KErrNone );
       
   697         }
       
   698     }
       
   699 
       
   700 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetFramerateL(  )
       
   701     {
       
   702     for( TInt k = 0; k < iCount; k++ )
       
   703         {
       
   704         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetFramerate( 100 ), KErrNone );
       
   705         }
       
   706     }
       
   707 
       
   708 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetFrameHeightL(  )
       
   709     {
       
   710     for( TInt k = 0; k < iCount; k++ )
       
   711         {
       
   712         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetFrameHeight( 100 ), KErrNone );
       
   713         }
       
   714     }
       
   715 
       
   716 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetFrameWidthL(  )
       
   717     {
       
   718     for( TInt k = 0; k < iCount; k++ )
       
   719         {
       
   720         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetFrameWidth( 100 ), KErrNone );
       
   721         }
       
   722     }
       
   723 
       
   724 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetAlgoL()
       
   725     {
       
   726     TInt error( KErrNone );
       
   727     
       
   728     //Confirm that the arrary is not empty
       
   729     EUNIT_ASSERT( iCount > 0 );
       
   730     
       
   731     //Call parent class method
       
   732     TAlgoUsed algo;
       
   733     
       
   734     error = iCodecArray[0]->CMccCodecInformation::SetAlgo( ENoAlgoUsed );
       
   735     EUNIT_ASSERT_EQUALS( KErrNone, error );
       
   736     
       
   737     algo = iCodecArray[0]->CMccCodecInformation::Algo();
       
   738     EUNIT_ASSERT_EQUALS( ENoAlgoUsed, algo );
       
   739     
       
   740     for( TInt k = 0; k < iCount; k++ )
       
   741         {
       
   742         error = iCodecArray[k]->SetAlgo( ENoAlgoUsed );
       
   743         EUNIT_ASSERT_EQUALS( KErrNone, error );
       
   744         
       
   745         algo = iCodecArray[k]->Algo();
       
   746         EUNIT_ASSERT_EQUALS( ENoAlgoUsed, algo );
       
   747         }
       
   748     }
       
   749 
       
   750 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetRedCountL(  )
       
   751     {
       
   752     for( TInt k = 0; k < iCount; k++ )
       
   753         {
       
   754         if (k != 0 )// other codecs
       
   755             {
       
   756             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 0 ), KErrNone );
       
   757             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 1 ), KErrNone );
       
   758             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 2 ), KErrArgument );
       
   759             }
       
   760         else // AMR
       
   761             {
       
   762             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 0 ), KErrNone );
       
   763             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 1 ), KErrNone );
       
   764             iCodecArray[k]->iMaxRed = 1;
       
   765             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 0 ), KErrNone );
       
   766             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRedCount( 1 ), KErrNone );
       
   767             }
       
   768         }
       
   769     }
       
   770 
       
   771 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetRedundancyPTL()
       
   772     {    
       
   773     EUNIT_ASSERT( iCount > 0 );
       
   774     TInt error( KErrNone );
       
   775     TInt redundancy( 0 );
       
   776 
       
   777      //Call parent class method
       
   778     error = iCodecArray[0]->CMccCodecInformation::SetRedundancyPT( redundancy );
       
   779     EUNIT_ASSERT_EQUALS( KErrNone, error );
       
   780     
       
   781     redundancy = iCodecArray[0]->CMccCodecInformation::RedundancyPT();
       
   782     EUNIT_ASSERT_EQUALS( 0, redundancy );
       
   783     
       
   784     for( TInt k = 0; k < iCount; k++ )
       
   785         {
       
   786         error = iCodecArray[k]->SetRedundancyPT( 0 );
       
   787         EUNIT_ASSERT_EQUALS( KErrNone, error );
       
   788         
       
   789         redundancy = iCodecArray[k]->RedundancyPT();
       
   790         EUNIT_ASSERT_EQUALS( 0, redundancy );
       
   791         } 
       
   792     }
       
   793 
       
   794 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetPriorityL(  )
       
   795     {
       
   796     for( TInt k = 0; k < iCount; k++ )
       
   797         {
       
   798         iCodecArray[k]->SetPriority( 1 );
       
   799         }
       
   800     }
       
   801 
       
   802 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetPriorityPreferenceL(  )
       
   803     {
       
   804     for( TInt k = 0; k < iCount; k++ )
       
   805         {
       
   806         iCodecArray[k]->SetPriorityPreference( 1 );
       
   807         }
       
   808     }
       
   809 
       
   810 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetKeepAliveTimerL(  )
       
   811     {
       
   812     for( TInt k = 0; k < iCount; k++ )
       
   813         {
       
   814         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetKeepAliveTimer( 25 ), KErrNone );
       
   815         }
       
   816     }
       
   817 
       
   818 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetKeepAlivePTL(  )
       
   819     {
       
   820     for( TInt k = 0; k < iCount; k++ )
       
   821         {
       
   822         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetKeepAlivePT( iCodecArray[k]->iPayloadType ), KErrNone );
       
   823         }
       
   824     }
       
   825 
       
   826 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetKeepAliveDataL(  )
       
   827     {
       
   828     for( TInt k = 0; k < iCount; k++ )
       
   829         {
       
   830         const TUint8 KG711KAPayloadSize = 160;
       
   831         const TUint8 KG711KeepAlivePayload[KG711KAPayloadSize] = 
       
   832             { 
       
   833             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   834             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   835             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   836             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   837             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   838             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   839             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   840             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   841             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   842             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   843             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   844             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   845             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   846             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   847             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
       
   848             0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
       
   849             };
       
   850         TBuf8<KG711KAPayloadSize> payload;
       
   851         payload.Append( KG711KeepAlivePayload[KG711KAPayloadSize] ); 
       
   852         TPtrC8 ptr( payload ); 
       
   853         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetKeepAliveData( ptr ), KErrNone );
       
   854         /*TBuf8<320> payload2;
       
   855         payload2.Append( KG711KeepAlivePayload[KG711KAPayloadSize] );
       
   856         payload2.Append( KG711KeepAlivePayload[KG711KAPayloadSize] );
       
   857         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetKeepAliveData( payload2 ), KErrArgument );*/
       
   858         }
       
   859     }
       
   860 
       
   861 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetComfortNoiseGenerationL(  )
       
   862     {
       
   863     for( TInt k = 0; k < iCount; k++ )
       
   864         {
       
   865         if ( iCodecArray[k]->SdpName() == KPCMUSdpName || 
       
   866              iCodecArray[k]->SdpName() == KPCMASdpName || 
       
   867              iCodecArray[k]->SdpName() == KILBCSdpName )
       
   868             {
       
   869             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetComfortNoiseGeneration( 13 ), KErrNone );
       
   870             }
       
   871         else
       
   872             {
       
   873             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetComfortNoiseGeneration( 13 ), KErrNotSupported );
       
   874             }        
       
   875         }
       
   876     }
       
   877 
       
   878 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetChannelsL()
       
   879     {
       
   880 #if 0 // Removed temporarily because code does not work
       
   881     //TBuf8<5> noChannels;
       
   882     //noChannels.Format( KNullDesC8 );
       
   883     
       
   884     TBuf8<5> someChannels;
       
   885     someChannels.Format( _L8( "1 2" ) );
       
   886 
       
   887     for( TInt k = 0; k < iCount; k++ )
       
   888         {
       
   889         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetChannels( KNullDesC8 ), KErrNone );
       
   890         RDebug::Print( _L( "UT_CMccCodecInformation_SetChannelsL NULL %d OK" ), k );
       
   891         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetChannels( someChannels ), KErrNone );
       
   892         RDebug::Print( _L( "UT_CMccCodecInformation_SetChannelsL %d OK" ), k );
       
   893         }
       
   894 #endif
       
   895     }
       
   896 
       
   897 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetMaxRedL(  )
       
   898     {
       
   899     for( TInt k = 0; k < iCount; k++ )
       
   900         {
       
   901         if ( !iCodecArray[k]->SdpName().CompareF( KAMRSdpName ) ||
       
   902              !iCodecArray[k]->SdpName().CompareF( KAMRWbSdpName ) )
       
   903             {
       
   904             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetMaxRed( 40 ), KErrNone );
       
   905             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetMaxRed( 3 ), KErrArgument );
       
   906             }
       
   907         else
       
   908             {
       
   909             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetMaxRed( 5 ), KErrNotSupported );
       
   910             }        
       
   911         }
       
   912     }
       
   913     
       
   914 
       
   915 void UT_CMccCodecInformation::UT_CMccCodecInformation_VADL(  )
       
   916     {
       
   917     for( TInt k = 0; k < iCount; k++ )
       
   918         {
       
   919         EUNIT_ASSERT_EQUALS( iCodecArray[k]->VAD(), iCodecArray[k]->iEnableVAD ) ;
       
   920         }
       
   921     }
       
   922 
       
   923 void UT_CMccCodecInformation::UT_CMccCodecInformation_BitrateL(  )
       
   924     {
       
   925     for( TInt k = 0; k < iCount; k++ )
       
   926         {
       
   927         EUNIT_ASSERT_EQUALS( iCodecArray[k]->Bitrate(), iCodecArray[k]->iBitrate );
       
   928         }
       
   929     }
       
   930 
       
   931 void UT_CMccCodecInformation::UT_CMccCodecInformation_AllowedBitratesL(  )
       
   932     {
       
   933     for( TInt k = 0; k < iCount; k++ )
       
   934         {
       
   935         EUNIT_ASSERT_EQUALS( iCodecArray[k]->AllowedBitrates(), iCodecArray[k]->iBitrateMask );
       
   936         }
       
   937     }
       
   938 
       
   939 void UT_CMccCodecInformation::UT_CMccCodecInformation_SamplingFreqL(  )
       
   940     {
       
   941     for( TInt k = 0; k < iCount; k++ )
       
   942         {
       
   943         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SamplingFreq(), iCodecArray[k]->iSamplingFreq );
       
   944         }
       
   945     }
       
   946 
       
   947 void UT_CMccCodecInformation::UT_CMccCodecInformation_SdpNameL(  )
       
   948     {
       
   949     for( TInt k = 0; k < iCount; k++ )
       
   950         {
       
   951         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SdpName(), iCodecArray[k]->iSdpName );
       
   952         }
       
   953     }
       
   954 
       
   955 void UT_CMccCodecInformation::UT_CMccCodecInformation_PayloadTypeL(  )
       
   956     {
       
   957     for( TInt k = 0; k < iCount; k++ )
       
   958         {
       
   959         EUNIT_ASSERT_EQUALS( iCodecArray[k]->PayloadType(), iCodecArray[k]->iPayloadType );
       
   960         }
       
   961     }
       
   962 
       
   963 void UT_CMccCodecInformation::UT_CMccCodecInformation_CodecModeL(  )
       
   964     {
       
   965     for( TInt k = 0; k < iCount; k++ )
       
   966         {
       
   967         EUNIT_ASSERT_EQUALS( iCodecArray[k]->CodecMode(), iCodecArray[k]->iCodecMode );
       
   968         }
       
   969     }
       
   970 
       
   971 void UT_CMccCodecInformation::UT_CMccCodecInformation_PTimeL(  )
       
   972     {
       
   973     for( TInt k = 0; k < iCount; k++ )
       
   974         {
       
   975         EUNIT_ASSERT_EQUALS( iCodecArray[k]->PTime(), iCodecArray[k]->iPTime );
       
   976         }
       
   977     }
       
   978 
       
   979 void UT_CMccCodecInformation::UT_CMccCodecInformation_MaxPTimeL(  )
       
   980     {
       
   981     for( TInt k = 0; k < iCount; k++ )
       
   982         {
       
   983         EUNIT_ASSERT_EQUALS( iCodecArray[k]->MaxPTime(), iCodecArray[k]->iMaxPTime );
       
   984         }
       
   985     }
       
   986 
       
   987 void UT_CMccCodecInformation::UT_CMccCodecInformation_GetFmtpLL()
       
   988     {
       
   989     TDesC8* fmtp;
       
   990 
       
   991     for( TInt k = 0; k < iCount; k++ )
       
   992         {
       
   993         fmtp = &( iCodecArray[k]->GetFmtpL() );
       
   994         RDebug::Print( _L( "UT_CMccCodecInformation_GetFmtpLL %d OK" ), k );
       
   995         }
       
   996     }
       
   997 
       
   998 void UT_CMccCodecInformation::UT_CMccCodecInformation_FourCCL(  )
       
   999     {
       
  1000     for( TInt k = 0; k < iCount; k++ )
       
  1001         {
       
  1002         EUNIT_ASSERT_EQUALS( iCodecArray[k]->FourCC(), iCodecArray[k]->iFourCC );
       
  1003         }
       
  1004     }
       
  1005 
       
  1006 void UT_CMccCodecInformation::UT_CMccCodecInformation_FrameTimeL()
       
  1007     {
       
  1008     TInt error( KErrNone );
       
  1009     
       
  1010     //Confirm that the arrary is not empty
       
  1011     EUNIT_ASSERT( iCount > 0 );
       
  1012     
       
  1013     //Call parent class method
       
  1014     TInt frameTime( 0 );
       
  1015     frameTime = iCodecArray[0]->CMccCodecInformation::FrameTime();
       
  1016     EUNIT_ASSERT( frameTime >= 0 );
       
  1017     
       
  1018     for( TInt k = 0; k < iCount; k++ )
       
  1019         {
       
  1020         frameTime = iCodecArray[k]->FrameTime();
       
  1021         EUNIT_ASSERT( frameTime >= 0 );
       
  1022         }    
       
  1023     }
       
  1024 
       
  1025 void UT_CMccCodecInformation::UT_CMccCodecInformation_FrameSizeL()
       
  1026     {
       
  1027     TInt error( KErrNone );
       
  1028     
       
  1029     //Confirm that the arrary is not empty
       
  1030     EUNIT_ASSERT( iCount > 0 );
       
  1031     
       
  1032     //Call parent class method
       
  1033     TInt frameSize( 0 );
       
  1034     frameSize = iCodecArray[0]->CMccCodecInformation::FrameSize();
       
  1035     EUNIT_ASSERT( frameSize >= 0 );
       
  1036     
       
  1037     for( TInt k = 0; k < iCount; k++ )
       
  1038         {
       
  1039         frameSize = iCodecArray[k]->FrameSize();
       
  1040         EUNIT_ASSERT( frameSize >= 0 );
       
  1041         }
       
  1042     }
       
  1043 
       
  1044 void UT_CMccCodecInformation::UT_CMccCodecInformation_AlgoL()
       
  1045     {   
       
  1046     //Confirm that the arrary is not empty
       
  1047     EUNIT_ASSERT( iCount > 0 );
       
  1048     
       
  1049     TInt error( KErrNone );
       
  1050     TUint redCount( 0 );
       
  1051     
       
  1052     //Call parent class method
       
  1053     error = iCodecArray[0]->CMccCodecInformation::SetRedCount( redCount );
       
  1054     EUNIT_ASSERT_EQUALS( KErrNone, error );
       
  1055     
       
  1056     redCount = iCodecArray[0]->CMccCodecInformation::RedCount();
       
  1057     EUNIT_ASSERT_EQUALS( 0, redCount );
       
  1058     
       
  1059     for( TInt k = 0; k < iCount; k++ )
       
  1060         {
       
  1061         EUNIT_ASSERT_EQUALS( iCodecArray[k]->RedCount(), KErrNone );
       
  1062         }
       
  1063     }
       
  1064 
       
  1065 void UT_CMccCodecInformation::UT_CMccCodecInformation_RedCountL(  )
       
  1066     {
       
  1067     for( TInt k = 0; k < iCount; k++ )
       
  1068         {
       
  1069         EUNIT_ASSERT_EQUALS( iCodecArray[k]->RedCount(), iCodecArray[k]->iRedCount );
       
  1070         }
       
  1071     }
       
  1072 
       
  1073 void UT_CMccCodecInformation::UT_CMccCodecInformation_RedundancyPTL(  )
       
  1074     {
       
  1075     for( TInt k = 0; k < iCount; k++ )
       
  1076         {
       
  1077         EUNIT_ASSERT_EQUALS( iCodecArray[k]->RedundancyPT(), iCodecArray[k]->iRedundancyPT );
       
  1078         }
       
  1079     }
       
  1080 
       
  1081 void UT_CMccCodecInformation::UT_CMccCodecInformation_JitterBufInactivityTimeOutL(  )
       
  1082     {
       
  1083     for( TInt k = 0; k < iCount; k++ )
       
  1084         {
       
  1085         EUNIT_ASSERT_EQUALS( iCodecArray[k]->JitterBufInactivityTimeOut(), 
       
  1086                              iCodecArray[k]->iJitterBufInactivityTimeOut );
       
  1087         }
       
  1088     }
       
  1089 
       
  1090 void UT_CMccCodecInformation::UT_CMccCodecInformation_JitterBufThresholdL(  )
       
  1091     {
       
  1092     for( TInt k = 0; k < iCount; k++ )
       
  1093         {
       
  1094         EUNIT_ASSERT_EQUALS( iCodecArray[k]->JitterBufThreshold(), 
       
  1095                              iCodecArray[k]->iJitterBufThreshold );
       
  1096         }
       
  1097     }
       
  1098 
       
  1099 void UT_CMccCodecInformation::UT_CMccCodecInformation_JitterBufBufferLengthL(  )
       
  1100     {
       
  1101     for( TInt k = 0; k < iCount; k++ )
       
  1102         {
       
  1103         EUNIT_ASSERT_EQUALS( iCodecArray[k]->JitterBufBufferLength(), 
       
  1104                              iCodecArray[k]->iJitterBufBufferLength );
       
  1105         }
       
  1106     }
       
  1107 
       
  1108 void UT_CMccCodecInformation::UT_CMccCodecInformation_MaxBitrateL(  )
       
  1109     {
       
  1110     for( TInt k = 0; k < iCount; k++ )
       
  1111         {
       
  1112         EUNIT_ASSERT_EQUALS( iCodecArray[k]->MaxBitrate(), 
       
  1113                              iCodecArray[k]->iMaxBitrate );
       
  1114         }
       
  1115     }
       
  1116 
       
  1117 void UT_CMccCodecInformation::UT_CMccCodecInformation_AverageBitrateL(  )
       
  1118     {
       
  1119     for( TInt k = 0; k < iCount; k++ )
       
  1120         {
       
  1121         EUNIT_ASSERT_EQUALS( iCodecArray[k]->AverageBitrate(), 
       
  1122                              iCodecArray[k]->iAverageBitrate );
       
  1123         }
       
  1124     }
       
  1125 
       
  1126 void UT_CMccCodecInformation::UT_CMccCodecInformation_FramerateL(  )
       
  1127     {
       
  1128     for( TInt k = 0; k < iCount; k++ )
       
  1129         {
       
  1130         EUNIT_ASSERT_EQUALS( iCodecArray[k]->Framerate(), 
       
  1131                              iCodecArray[k]->iFramerate );
       
  1132         }
       
  1133     }
       
  1134 
       
  1135 void UT_CMccCodecInformation::UT_CMccCodecInformation_FrameHeightL(  )
       
  1136     {
       
  1137     for( TInt k = 0; k < iCount; k++ )
       
  1138         {
       
  1139         EUNIT_ASSERT_EQUALS( iCodecArray[k]->FrameHeight(), 
       
  1140                              iCodecArray[k]->iVideoHeight );
       
  1141         }
       
  1142     }
       
  1143 
       
  1144 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetModeChangePeriodL()
       
  1145     {    
       
  1146     for( TInt k = 1; k < iCount; k++ )// AMR codec tested in it's own test class    
       
  1147         {        
       
  1148         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetModeChangePeriod( 0 ), KErrNotSupported );
       
  1149         RDebug::Print( _L( "UT_CMccCodecInformation_SetModeChangePeriodL %d OK" ), k );
       
  1150         }
       
  1151     }
       
  1152 
       
  1153 void UT_CMccCodecInformation::UT_CMccCodecInformation_ModeChangePeriodL()
       
  1154     {
       
  1155     for( TInt k = 1; k < iCount; k++ )// AMR codec tested in it's own test class
       
  1156         {
       
  1157         EUNIT_ASSERT_EQUALS( iCodecArray[k]->ModeChangePeriod(), KErrNotSupported );
       
  1158         RDebug::Print( _L( "UT_CMccCodecInformation_ModeChangePeriodL %d OK" ), k );
       
  1159         }
       
  1160     }
       
  1161 
       
  1162 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetModeChangeNeighborL()
       
  1163     {
       
  1164     const TBool neighbor( EFalse );
       
  1165 
       
  1166     for( TInt k = 1; k < iCount; k++ )// AMR codec tested in it's own test class
       
  1167         {
       
  1168         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetModeChangeNeighbor( neighbor ), KErrNotSupported );
       
  1169         RDebug::Print( _L( "UT_CMccCodecInformation_SetModeChangeNeighborL %d OK" ), k );
       
  1170         }
       
  1171     }
       
  1172 
       
  1173 void UT_CMccCodecInformation::UT_CMccCodecInformation_ModeChangeNeighborL()
       
  1174     {
       
  1175     for( TInt k = 1; k < iCount; k++ )// AMR codec tested in it's own test class
       
  1176         {
       
  1177         // Always true
       
  1178         EUNIT_ASSERT( iCodecArray[k]->ModeChangeNeighbor() );
       
  1179         RDebug::Print( _L( "UT_CMccCodecInformation_ModeChangeNeighborL %d OK" ), k );
       
  1180         }
       
  1181     }
       
  1182 
       
  1183 void UT_CMccCodecInformation::UT_CMccCodecInformation_FrameWidthL(  )
       
  1184     {
       
  1185     for( TInt k = 0; k < iCount; k++ )
       
  1186         {
       
  1187         EUNIT_ASSERT_EQUALS( iCodecArray[k]->FrameWidth(), 
       
  1188                              iCodecArray[k]->iVideoWidth );
       
  1189         }
       
  1190     }
       
  1191 
       
  1192 void UT_CMccCodecInformation::UT_CMccCodecInformation_PriorityL(  )
       
  1193     {
       
  1194     for( TInt k = 0; k < iCount; k++ )
       
  1195         {
       
  1196         EUNIT_ASSERT_EQUALS( iCodecArray[k]->Priority(), 
       
  1197                              iCodecArray[k]->iPriority );
       
  1198         }
       
  1199     }
       
  1200 
       
  1201 void UT_CMccCodecInformation::UT_CMccCodecInformation_PriorityPreferenceL(  )
       
  1202     {
       
  1203     for( TInt k = 0; k < iCount; k++ )
       
  1204         {
       
  1205         EUNIT_ASSERT_EQUALS( iCodecArray[k]->PriorityPreference(), 
       
  1206                              iCodecArray[k]->iPriorityPreference );
       
  1207         }
       
  1208     }
       
  1209 
       
  1210 void UT_CMccCodecInformation::UT_CMccCodecInformation_KeepAliveTimerL(  )
       
  1211     {
       
  1212     for( TInt k = 0; k < iCount; k++ )
       
  1213         {
       
  1214         EUNIT_ASSERT_EQUALS( iCodecArray[k]->KeepAliveTimer(), 
       
  1215                              iCodecArray[k]->iKeepAliveTimer );
       
  1216         }
       
  1217     }
       
  1218 
       
  1219 void UT_CMccCodecInformation::UT_CMccCodecInformation_KeepAlivePTL(  )
       
  1220     {
       
  1221     for( TInt k = 0; k < iCount; k++ )
       
  1222         {
       
  1223         EUNIT_ASSERT_EQUALS( iCodecArray[k]->KeepAlivePT(), 
       
  1224                              iCodecArray[k]->iKeepAlivePT );
       
  1225         }
       
  1226     }
       
  1227 
       
  1228 void UT_CMccCodecInformation::UT_CMccCodecInformation_KeepAliveDataL(  )
       
  1229     {
       
  1230     for( TInt k = 0; k < iCount; k++ )
       
  1231         {
       
  1232         EUNIT_ASSERT_EQUALS( iCodecArray[k]->KeepAliveData(), 
       
  1233                              iCodecArray[k]->iKeepAliveData );
       
  1234         }
       
  1235     }
       
  1236 
       
  1237 void UT_CMccCodecInformation::UT_CMccCodecInformation_ComfortNoiseGenerationL(  )
       
  1238     {
       
  1239     for( TInt k = 0; k < iCount; k++ )
       
  1240         {
       
  1241         EUNIT_ASSERT_EQUALS( iCodecArray[k]->ComfortNoiseGeneration(), 
       
  1242                              iCodecArray[k]->iComfortNoiseGenerationPt );
       
  1243         }
       
  1244     }
       
  1245 
       
  1246 void UT_CMccCodecInformation::UT_CMccCodecInformation_GetChannelsL()
       
  1247     {
       
  1248 #if 0 // Removed temporarily because code does not work
       
  1249     HBufC8* buf = HBufC8::NewL( 150 );
       
  1250     TPtr8 bufRef = buf->Des();
       
  1251 
       
  1252     for( TInt k = 0; k < 1/*iCount*/; k++ )
       
  1253         {
       
  1254         EUNIT_ASSERT_EQUALS( iCodecArray[k]->GetChannels( bufRef ), KErrNone );
       
  1255         RDebug::Print( _L( "UT_CMccCodecInformation_GetChannelsL %d OK" ), k );
       
  1256         }
       
  1257 #endif
       
  1258     }
       
  1259 
       
  1260 void UT_CMccCodecInformation::UT_CMccCodecInformation_MaxRedL(  )
       
  1261     {
       
  1262     for( TInt k = 0; k < iCount; k++ )
       
  1263         {
       
  1264         EUNIT_ASSERT_EQUALS( iCodecArray[k]->MaxRed(), 
       
  1265                              iCodecArray[k]->iMaxRed );
       
  1266         }
       
  1267     }
       
  1268 
       
  1269 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetFmtpAttrLL()
       
  1270     {    
       
  1271     TBuf8<5> buf;
       
  1272     buf.Format( _L8( "foo42" ) );
       
  1273 
       
  1274     for( TInt k = 0; k < iCount; k++ )
       
  1275         {
       
  1276         iCodecArray[k]->SetFmtpAttrL( buf, EFalse );
       
  1277         }   
       
  1278     }
       
  1279 
       
  1280 void UT_CMccCodecInformation::UT_CMccCodecInformation_ParseFmtpAttrLL()
       
  1281     {    
       
  1282     //Confirm that the arrary is not empty
       
  1283     EUNIT_ASSERT( iCount > 0 );
       
  1284     
       
  1285     _LIT8( KAMRName, "AMR" );
       
  1286     CMccCodecInformation* codecAMR = NULL;
       
  1287 
       
  1288     // Find the AMR codec
       
  1289     for ( TInt i = 0; i < iCount; i++ )
       
  1290         {
       
  1291         if ( iCodecArray[i]->SdpName().Compare( KAMRName ) == 0 )
       
  1292             {
       
  1293             TInt error( KErrNone );
       
  1294     
       
  1295             codecAMR = iCodecArray[i];
       
  1296             
       
  1297             EUNIT_ASSERT_EQUALS( KErrNotSupported, codecAMR->SetCodecMode( EPCMU ) );
       
  1298             EUNIT_ASSERT_EQUALS( KErrNone , codecAMR->SetCodecMode( EBandwidthEfficient ) );
       
  1299             
       
  1300             //Create fmtp string
       
  1301             _LIT8( KTxtOctetAlign1ModeSet, "octet-align=1; mode-set=0,1,3,6," );
       
  1302             
       
  1303             //Create a buffer to hold the fmtp string
       
  1304             HBufC8* fmtpBuf = HBufC8::NewLC( KTxtOctetAlign1ModeSet().Length() );
       
  1305             fmtpBuf->Des().Copy( KTxtOctetAlign1ModeSet() );
       
  1306             TPtr8 bufPtr( fmtpBuf->Des() );
       
  1307             
       
  1308             //Array for bitrates
       
  1309             RArray<TUint> bitrates;
       
  1310             CleanupClosePushL( bitrates );
       
  1311             
       
  1312             //codecAMR->CMccCodecInformation::CreateFmtpModeSet( bufPtr, bitrates );
       
  1313             //codecAMR->CreateFmtpModeSet( bufPtr, bitrates );
       
  1314             codecAMR->CMccCodecInformation::CreateFmtpAttrListL();
       
  1315             codecAMR->CreateFmtpAttrListL( bitrates );
       
  1316             codecAMR->ParseFmtpAttrL( fmtpBuf->Des() );
       
  1317             
       
  1318             CleanupStack::PopAndDestroy(); //pop and close bitrates
       
  1319             CleanupStack::PopAndDestroy( fmtpBuf ); //pop and destroy fmtpBuf
       
  1320             
       
  1321             break; //jump out of the loop
       
  1322             }
       
  1323         }
       
  1324     }
       
  1325 
       
  1326 void UT_CMccCodecInformation::UT_CMccCodecInformation_CreateFmtpAttrListLL(  )
       
  1327     {
       
  1328     for( TInt k = 0; k < iCount; k++ )
       
  1329         {
       
  1330         iCodecArray[k]->CreateFmtpAttrListL();    
       
  1331         }   
       
  1332     }
       
  1333 
       
  1334 void UT_CMccCodecInformation::UT_CMccCodecInformation_CreateFmtpAttrListL_1L(  )
       
  1335     {
       
  1336     for( TInt k = 0; k < iCount; k++ )
       
  1337         {
       
  1338         iCodecArray[k]->CreateFmtpAttrListL();
       
  1339         } 
       
  1340     }
       
  1341 
       
  1342 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetCrcL()
       
  1343     {
       
  1344     for( TInt k = 0; k < iCount; k++ )
       
  1345         {
       
  1346         if ( !iCodecArray[k]->SdpName().CompareF( KAMRSdpName ) ||
       
  1347              !iCodecArray[k]->SdpName().CompareF( KAMRWbSdpName ) )
       
  1348             {
       
  1349             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetCrc( EFalse ), KErrNone );
       
  1350             }
       
  1351         else
       
  1352             {
       
  1353             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetCrc( EFalse ), KErrNotSupported );
       
  1354             }        
       
  1355         }
       
  1356 
       
  1357     for( TInt k = 0; k < iCount; k++ )
       
  1358         {
       
  1359         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetCrc( ETrue ), KErrNotSupported );
       
  1360         }
       
  1361 
       
  1362     for( TInt k = 0; k < iCount; k++ )
       
  1363         {
       
  1364         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetCrc( -1 ), KErrNotSupported );
       
  1365         }
       
  1366  
       
  1367      for( TInt k = 0; k < iCount; k++ )
       
  1368         {
       
  1369         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetCrc( 2 ), KErrNotSupported );
       
  1370         }
       
  1371     }
       
  1372 
       
  1373 void UT_CMccCodecInformation::UT_CMccCodecInformation_GetCrcL()
       
  1374     {
       
  1375     for( TInt k = 1; k < iCount; k++ )
       
  1376         {
       
  1377         // Always false
       
  1378         EUNIT_ASSERT( !iCodecArray[k]->GetCrc() );
       
  1379         RDebug::Print( _L( "UT_CMccCodecInformation_GetCrcL %d OK" ), k );
       
  1380         }
       
  1381     }
       
  1382 
       
  1383 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetRobustSortingL()
       
  1384     {
       
  1385     for( TInt k = 0; k < iCount; k++ )
       
  1386         {
       
  1387         if ( !iCodecArray[k]->SdpName().CompareF( KAMRSdpName ) ||
       
  1388              !iCodecArray[k]->SdpName().CompareF( KAMRWbSdpName ) )
       
  1389             {
       
  1390             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRobustSorting( EFalse ), KErrNone );
       
  1391             }
       
  1392         else
       
  1393             {
       
  1394             EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRobustSorting( EFalse ), KErrNotSupported );
       
  1395             }        
       
  1396         }
       
  1397 
       
  1398     for( TInt k = 0; k < iCount; k++ )
       
  1399         {
       
  1400         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRobustSorting( ETrue ), KErrNotSupported );
       
  1401         }
       
  1402 
       
  1403     for( TInt k = 0; k < iCount; k++ )
       
  1404         {
       
  1405         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRobustSorting( -1 ), KErrNotSupported );
       
  1406         }
       
  1407  
       
  1408      for( TInt k = 0; k < iCount; k++ )
       
  1409         {
       
  1410         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetRobustSorting( 2 ), KErrNotSupported );
       
  1411         }
       
  1412     }
       
  1413 
       
  1414 void UT_CMccCodecInformation::UT_CMccCodecInformation_GetRobustSortingL()
       
  1415     {
       
  1416     for( TInt k = 1; k < iCount; k++ )
       
  1417         {
       
  1418         // Always false
       
  1419         EUNIT_ASSERT( !iCodecArray[k]->GetRobustSorting() );
       
  1420         RDebug::Print( _L( "UT_CMccCodecInformation_GetRobustSortingL %d OK" ), k );
       
  1421         }
       
  1422     }
       
  1423 
       
  1424 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetInterleavingL()
       
  1425     {
       
  1426     TInt frameBlockCount( 0 );
       
  1427 
       
  1428     for( TInt k = 1; k < iCount; k++ )
       
  1429         {
       
  1430         EUNIT_ASSERT_EQUALS( iCodecArray[k]->SetInterleaving( frameBlockCount ), KErrNotSupported );
       
  1431         RDebug::Print( _L( "UT_CMccCodecInformation_SetInterleavingL %d OK" ), k );
       
  1432         }
       
  1433     }
       
  1434 
       
  1435 void UT_CMccCodecInformation::UT_CMccCodecInformation_GetInterleavingL()
       
  1436     {
       
  1437     for( TInt k = 1; k < iCount; k++ )
       
  1438         {
       
  1439         if ( !iCodecArray[k]->SdpName().CompareF( KAMRSdpName ) ||
       
  1440              !iCodecArray[k]->SdpName().CompareF( KAMRWbSdpName ) )
       
  1441             {
       
  1442             EUNIT_ASSERT_EQUALS( 
       
  1443                 iCodecArray[k]->GetInterleaving(), iCodecArray[k]->iFrameBlockCount );
       
  1444             }
       
  1445         else
       
  1446             {
       
  1447             EUNIT_ASSERT_EQUALS( iCodecArray[k]->GetInterleaving(), KErrNotSupported );
       
  1448             }
       
  1449         RDebug::Print( _L( "UT_CMccCodecInformation_GetInterleavingL %d OK" ), k );
       
  1450         }
       
  1451     }  
       
  1452 
       
  1453 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetConfigKeyL()
       
  1454     {
       
  1455     for( TInt k = 0; k < iCount; k++ )
       
  1456         {
       
  1457         if ( !iCodecArray[k]->SdpName().CompareF( KAMRSdpName ) )
       
  1458             {
       
  1459             EUNIT_ASSERT_SPECIFIC_LEAVE( iCodecArray[k]->SetConfigKeyL( KNullDesC8 ), KErrNotSupported );
       
  1460             }
       
  1461         }
       
  1462     }
       
  1463     
       
  1464 void UT_CMccCodecInformation::UT_CMccCodecInformation_SetPreferredEncodingDecodingDeviceL(  )
       
  1465     {
       
  1466     for( TInt k = 0; k < iCount; k++ )
       
  1467         {
       
  1468         if ( iCodecArray[k]->SdpName().CompareF( KAVCSdpName ) == 0 )
       
  1469             {      
       
  1470             iCodecArray[k]->SetPreferredEncodingDecodingDevice( TUid::Uid( 0x20001c13 ));
       
  1471             EUNIT_ASSERT(iCodecArray[k]->PreferredEncodingDecodingDevice() == TUid::Uid( 0x20001c13 ));
       
  1472             }
       
  1473         else
       
  1474             {
       
  1475             iCodecArray[k]->SetPreferredEncodingDecodingDevice( TUid::Uid( 0x20001c13 ) );
       
  1476             EUNIT_ASSERT(iCodecArray[k]->PreferredEncodingDecodingDevice() == KNullUid );
       
  1477             }        
       
  1478         }
       
  1479     }        
       
  1480     
       
  1481 void UT_CMccCodecInformation::UT_CMccCodecInformation_ConfigKeyL()
       
  1482     {
       
  1483     for( TInt k = 0; k < iCount; k++ )
       
  1484         {
       
  1485         if ( !iCodecArray[k]->SdpName().CompareF( KAMRSdpName ) )
       
  1486             {
       
  1487             HBufC8* configKey = iCodecArray[k]->ConfigKeyL();
       
  1488             EUNIT_ASSERT( configKey == NULL );
       
  1489             }
       
  1490         }
       
  1491     }
       
  1492     
       
  1493 // HELPERS
       
  1494 void UT_CMccCodecInformation::GetCapabilitiesL( RPointerArray<CMccCodecInformation>& aCodecArray )
       
  1495     {
       
  1496     User::LeaveIfError( iInterface->GetCapabilities( aCodecArray ) );
       
  1497     
       
  1498     // Append also other codecs which are not yet officially supported!
       
  1499     
       
  1500     CMccCodecInformationFactory* codecFactory = CMccCodecInformationFactory::NewL();
       
  1501     CleanupStack::PushL( codecFactory );
       
  1502     
       
  1503     CMccCodecInformation* codec = codecFactory->CreateCodecInformationL( KAVCSdpName );
       
  1504     CleanupStack::PushL( codec );
       
  1505     aCodecArray.AppendL( codec );
       
  1506     CleanupStack::Pop( codec );
       
  1507     
       
  1508     CMccCodecInformation* codec2 = codecFactory->CreateCodecInformationL( KRedSdpName );
       
  1509     CleanupStack::PushL( codec2 );
       
  1510     aCodecArray.AppendL( codec2 );
       
  1511     CleanupStack::Pop( codec2 );
       
  1512     
       
  1513     CMccCodecInformation* codec3 = codecFactory->CreateCodecInformationL( KTelephoneEvent );
       
  1514     CleanupStack::PushL( codec3 );
       
  1515     aCodecArray.AppendL( codec3 );
       
  1516     CleanupStack::Pop( codec3 );
       
  1517     
       
  1518     CMccCodecInformation* codec4 = codecFactory->CreateCodecInformationL( KAMRWbSdpName );
       
  1519     CleanupStack::PushL( codec4 );
       
  1520     aCodecArray.AppendL( codec4 );
       
  1521     CleanupStack::Pop( codec4 );
       
  1522     
       
  1523     CleanupStack::PopAndDestroy( codecFactory );
       
  1524     }
       
  1525 
       
  1526 // EUNIT TEST TABLE
       
  1527 
       
  1528 EUNIT_BEGIN_TEST_TABLE( 
       
  1529     UT_CMccCodecInformation,
       
  1530     "CMccCodecInformation test",
       
  1531     "UNIT" )
       
  1532 
       
  1533 
       
  1534 EUNIT_TEST(
       
  1535     "CloneDefaultsL - test ",
       
  1536     "CMccCodecInformation",
       
  1537     "CloneDefaultsL",
       
  1538     "FUNCTIONALITY",
       
  1539     SetupL, UT_CMccCodecInformation_CloneDefaultsLL, Teardown)
       
  1540 
       
  1541 EUNIT_TEST(
       
  1542     "CloneDetailedL - test ",
       
  1543     "CMccCodecInformation",
       
  1544     "CloneDetailedL",
       
  1545     "FUNCTIONALITY",
       
  1546     SetupL, UT_CMccCodecInformation_CloneDetailedLL, Teardown)
       
  1547 
       
  1548 EUNIT_TEST(
       
  1549     "RequireSignalling - test ",
       
  1550     "CMccCodecInformation",
       
  1551     "RequireSignalling",
       
  1552     "FUNCTIONALITY",
       
  1553     SetupL, UT_CMccCodecInformation_RequireSignallingL, Teardown)
       
  1554 
       
  1555 EUNIT_TEST(
       
  1556     "SetValues - test ",
       
  1557     "CMccCodecInformation",
       
  1558     "SetValues",
       
  1559     "FUNCTIONALITY",
       
  1560     SetupL, UT_CMccCodecInformation_SetValuesL, Teardown)
       
  1561 
       
  1562 EUNIT_TEST(
       
  1563     "GetValues - test ",
       
  1564     "CMccCodecInformation",
       
  1565     "GetValues",
       
  1566     "FUNCTIONALITY",
       
  1567     SetupL, UT_CMccCodecInformation_GetValuesL, Teardown)
       
  1568 
       
  1569 EUNIT_TEST(
       
  1570     "Type - test ",
       
  1571     "CMccCodecInformation",
       
  1572     "Type",
       
  1573     "FUNCTIONALITY",
       
  1574     SetupL, UT_CMccCodecInformation_TypeL, Teardown)
       
  1575 
       
  1576 EUNIT_TEST(
       
  1577     "EnableVAD - test ",
       
  1578     "CMccCodecInformation",
       
  1579     "EnableVAD",
       
  1580     "FUNCTIONALITY",
       
  1581     SetupL, UT_CMccCodecInformation_EnableVADL, Teardown)
       
  1582 
       
  1583 EUNIT_TEST(
       
  1584     "SetBitrate - test ",
       
  1585     "CMccCodecInformation",
       
  1586     "SetBitrate",
       
  1587     "FUNCTIONALITY",
       
  1588     SetupL, UT_CMccCodecInformation_SetBitrateL, Teardown)
       
  1589 
       
  1590 EUNIT_TEST(
       
  1591     "SetSamplingFreq - test ",
       
  1592     "CMccCodecInformation",
       
  1593     "SetSamplingFreq",
       
  1594     "FUNCTIONALITY",
       
  1595     SetupL, UT_CMccCodecInformation_SetSamplingFreqL, Teardown)
       
  1596 
       
  1597 EUNIT_TEST(
       
  1598     "SetSdpName - test ",
       
  1599     "CMccCodecInformation",
       
  1600     "SetSdpName",
       
  1601     "FUNCTIONALITY",
       
  1602     SetupL, UT_CMccCodecInformation_SetSdpNameL, Teardown)
       
  1603 
       
  1604 EUNIT_TEST(
       
  1605     "SetPayloadType - test ",
       
  1606     "CMccCodecInformation",
       
  1607     "SetPayloadType",
       
  1608     "FUNCTIONALITY",
       
  1609     SetupL, UT_CMccCodecInformation_SetPayloadTypeL, Teardown)
       
  1610 
       
  1611 EUNIT_TEST(
       
  1612     "SetCodecMode - test ",
       
  1613     "CMccCodecInformation",
       
  1614     "SetCodecMode",
       
  1615     "FUNCTIONALITY",
       
  1616     SetupL, UT_CMccCodecInformation_SetCodecModeL, Teardown)
       
  1617 
       
  1618 EUNIT_TEST(
       
  1619     "SetAllowedBitrates - test ",
       
  1620     "CMccCodecInformation",
       
  1621     "SetAllowedBitrates",
       
  1622     "FUNCTIONALITY",
       
  1623     SetupL, UT_CMccCodecInformation_SetAllowedBitratesL, Teardown)
       
  1624 
       
  1625 EUNIT_TEST(
       
  1626     "SetPTime - test ",
       
  1627     "CMccCodecInformation",
       
  1628     "SetPTime",
       
  1629     "FUNCTIONALITY",
       
  1630     SetupL, UT_CMccCodecInformation_SetPTimeL, Teardown)
       
  1631 
       
  1632 EUNIT_TEST(
       
  1633     "SetMaxPTime - test ",
       
  1634     "CMccCodecInformation",
       
  1635     "SetMaxPTime",
       
  1636     "FUNCTIONALITY",
       
  1637     SetupL, UT_CMccCodecInformation_SetMaxPTimeL, Teardown)
       
  1638 
       
  1639 EUNIT_TEST(
       
  1640     "SetJitterBufBufferLength - test ",
       
  1641     "CMccCodecInformation",
       
  1642     "SetJitterBufBufferLength",
       
  1643     "FUNCTIONALITY",
       
  1644     SetupL, UT_CMccCodecInformation_SetJitterBufBufferLengthL, Teardown)
       
  1645 
       
  1646 EUNIT_TEST(
       
  1647     "SetJitterBufThreshold - test ",
       
  1648     "CMccCodecInformation",
       
  1649     "SetJitterBufThreshold",
       
  1650     "FUNCTIONALITY",
       
  1651     SetupL, UT_CMccCodecInformation_SetJitterBufThresholdL, Teardown)
       
  1652 
       
  1653 EUNIT_TEST(
       
  1654     "SetJitterBufInactivityTimeOut - test ",
       
  1655     "CMccCodecInformation",
       
  1656     "SetJitterBufInactivityTimeOut",
       
  1657     "FUNCTIONALITY",
       
  1658     SetupL, UT_CMccCodecInformation_SetJitterBufInactivityTimeOutL, Teardown)
       
  1659 
       
  1660 EUNIT_TEST(
       
  1661     "SetMaxBitrate - test ",
       
  1662     "CMccCodecInformation",
       
  1663     "SetMaxBitrate",
       
  1664     "FUNCTIONALITY",
       
  1665     SetupL, UT_CMccCodecInformation_SetMaxBitrateL, Teardown)
       
  1666 
       
  1667 EUNIT_TEST(
       
  1668     "SetAverageBitrate - test ",
       
  1669     "CMccCodecInformation",
       
  1670     "SetAverageBitrate",
       
  1671     "FUNCTIONALITY",
       
  1672     SetupL, UT_CMccCodecInformation_SetAverageBitrateL, Teardown)
       
  1673 
       
  1674 EUNIT_TEST(
       
  1675     "SetFramerate - test ",
       
  1676     "CMccCodecInformation",
       
  1677     "SetFramerate",
       
  1678     "FUNCTIONALITY",
       
  1679     SetupL, UT_CMccCodecInformation_SetFramerateL, Teardown)
       
  1680 
       
  1681 EUNIT_TEST(
       
  1682     "SetFrameHeight - test ",
       
  1683     "CMccCodecInformation",
       
  1684     "SetFrameHeight",
       
  1685     "FUNCTIONALITY",
       
  1686     SetupL, UT_CMccCodecInformation_SetFrameHeightL, Teardown)
       
  1687 
       
  1688 EUNIT_TEST(
       
  1689     "SetFrameWidth - test ",
       
  1690     "CMccCodecInformation",
       
  1691     "SetFrameWidth",
       
  1692     "FUNCTIONALITY",
       
  1693     SetupL, UT_CMccCodecInformation_SetFrameWidthL, Teardown)
       
  1694 
       
  1695 EUNIT_TEST(
       
  1696     "SetAlgo - test ",
       
  1697     "CMccCodecInformation",
       
  1698     "SetAlgo",
       
  1699     "FUNCTIONALITY",
       
  1700     SetupL, UT_CMccCodecInformation_SetAlgoL, Teardown)
       
  1701 
       
  1702 EUNIT_TEST(
       
  1703     "SetRedCount - test ",
       
  1704     "CMccCodecInformation",
       
  1705     "SetRedCount",
       
  1706     "FUNCTIONALITY",
       
  1707     SetupL, UT_CMccCodecInformation_SetRedCountL, Teardown)
       
  1708 
       
  1709 EUNIT_TEST(
       
  1710     "SetRedundancyPT - test ",
       
  1711     "CMccCodecInformation",
       
  1712     "SetRedundancyPT",
       
  1713     "FUNCTIONALITY",
       
  1714     SetupL, UT_CMccCodecInformation_SetRedundancyPTL, Teardown)
       
  1715 
       
  1716 EUNIT_TEST(
       
  1717     "SetPriority - test ",
       
  1718     "CMccCodecInformation",
       
  1719     "SetPriority",
       
  1720     "FUNCTIONALITY",
       
  1721     SetupL, UT_CMccCodecInformation_SetPriorityL, Teardown)
       
  1722 
       
  1723 EUNIT_TEST(
       
  1724     "SetPriorityPreference - test ",
       
  1725     "CMccCodecInformation",
       
  1726     "SetPriorityPreference",
       
  1727     "FUNCTIONALITY",
       
  1728     SetupL, UT_CMccCodecInformation_SetPriorityPreferenceL, Teardown)
       
  1729 
       
  1730 EUNIT_TEST(
       
  1731     "SetKeepAliveTimer - test ",
       
  1732     "CMccCodecInformation",
       
  1733     "SetKeepAliveTimer",
       
  1734     "FUNCTIONALITY",
       
  1735     SetupL, UT_CMccCodecInformation_SetKeepAliveTimerL, Teardown)
       
  1736 
       
  1737 EUNIT_TEST(
       
  1738     "SetKeepAlivePT - test ",
       
  1739     "CMccCodecInformation",
       
  1740     "SetKeepAlivePT",
       
  1741     "FUNCTIONALITY",
       
  1742     SetupL, UT_CMccCodecInformation_SetKeepAlivePTL, Teardown)
       
  1743 
       
  1744 EUNIT_TEST(
       
  1745     "SetKeepAliveData - test ",
       
  1746     "CMccCodecInformation",
       
  1747     "SetKeepAliveData",
       
  1748     "FUNCTIONALITY",
       
  1749     SetupL, UT_CMccCodecInformation_SetKeepAliveDataL, Teardown)
       
  1750 
       
  1751 EUNIT_TEST(
       
  1752     "SetComfortNoiseGeneration - test ",
       
  1753     "CMccCodecInformation",
       
  1754     "SetComfortNoiseGeneration",
       
  1755     "FUNCTIONALITY",
       
  1756     SetupL, UT_CMccCodecInformation_SetComfortNoiseGenerationL, Teardown)
       
  1757 
       
  1758 EUNIT_TEST(
       
  1759     "SetChannels - test ",
       
  1760     "CMccCodecInformation",
       
  1761     "SetChannels",
       
  1762     "FUNCTIONALITY",
       
  1763     SetupL, UT_CMccCodecInformation_SetChannelsL, Teardown)
       
  1764 
       
  1765 EUNIT_TEST(
       
  1766     "SetMaxRed - test ",
       
  1767     "CMccCodecInformation",
       
  1768     "SetMaxRed",
       
  1769     "FUNCTIONALITY",
       
  1770     SetupL, UT_CMccCodecInformation_SetMaxRedL, Teardown)
       
  1771 
       
  1772 EUNIT_TEST(
       
  1773     "VAD - test ",
       
  1774     "CMccCodecInformation",
       
  1775     "VAD",
       
  1776     "FUNCTIONALITY",
       
  1777     SetupL, UT_CMccCodecInformation_VADL, Teardown)
       
  1778 
       
  1779 EUNIT_TEST(
       
  1780     "Bitrate - test ",
       
  1781     "CMccCodecInformation",
       
  1782     "Bitrate",
       
  1783     "FUNCTIONALITY",
       
  1784     SetupL, UT_CMccCodecInformation_BitrateL, Teardown)
       
  1785 
       
  1786 EUNIT_TEST(
       
  1787     "AllowedBitrates - test ",
       
  1788     "CMccCodecInformation",
       
  1789     "AllowedBitrates",
       
  1790     "FUNCTIONALITY",
       
  1791     SetupL, UT_CMccCodecInformation_AllowedBitratesL, Teardown)
       
  1792 
       
  1793 EUNIT_TEST(
       
  1794     "SamplingFreq - test ",
       
  1795     "CMccCodecInformation",
       
  1796     "SamplingFreq",
       
  1797     "FUNCTIONALITY",
       
  1798     SetupL, UT_CMccCodecInformation_SamplingFreqL, Teardown)
       
  1799 
       
  1800 EUNIT_TEST(
       
  1801     "SdpName - test ",
       
  1802     "CMccCodecInformation",
       
  1803     "SdpName",
       
  1804     "FUNCTIONALITY",
       
  1805     SetupL, UT_CMccCodecInformation_SdpNameL, Teardown)
       
  1806 
       
  1807 EUNIT_TEST(
       
  1808     "PayloadType - test ",
       
  1809     "CMccCodecInformation",
       
  1810     "PayloadType",
       
  1811     "FUNCTIONALITY",
       
  1812     SetupL, UT_CMccCodecInformation_PayloadTypeL, Teardown)
       
  1813 
       
  1814 EUNIT_TEST(
       
  1815     "CodecMode - test ",
       
  1816     "CMccCodecInformation",
       
  1817     "CodecMode",
       
  1818     "FUNCTIONALITY",
       
  1819     SetupL, UT_CMccCodecInformation_CodecModeL, Teardown)
       
  1820 
       
  1821 EUNIT_TEST(
       
  1822     "PTime - test ",
       
  1823     "CMccCodecInformation",
       
  1824     "PTime",
       
  1825     "FUNCTIONALITY",
       
  1826     SetupL, UT_CMccCodecInformation_PTimeL, Teardown)
       
  1827 
       
  1828 EUNIT_TEST(
       
  1829     "MaxPTime - test ",
       
  1830     "CMccCodecInformation",
       
  1831     "MaxPTime",
       
  1832     "FUNCTIONALITY",
       
  1833     SetupL, UT_CMccCodecInformation_MaxPTimeL, Teardown)
       
  1834 
       
  1835 EUNIT_TEST(
       
  1836     "GetFmtpL - test ",
       
  1837     "CMccCodecInformation",
       
  1838     "GetFmtpL",
       
  1839     "FUNCTIONALITY",
       
  1840     SetupL, UT_CMccCodecInformation_GetFmtpLL, Teardown)
       
  1841 
       
  1842 EUNIT_TEST(
       
  1843     "FourCC - test ",
       
  1844     "CMccCodecInformation",
       
  1845     "FourCC",
       
  1846     "FUNCTIONALITY",
       
  1847     SetupL, UT_CMccCodecInformation_FourCCL, Teardown)
       
  1848 
       
  1849 EUNIT_TEST(
       
  1850     "FrameTime - test ",
       
  1851     "CMccCodecInformation",
       
  1852     "FrameTime",
       
  1853     "FUNCTIONALITY",
       
  1854     SetupL, UT_CMccCodecInformation_FrameTimeL, Teardown)
       
  1855 
       
  1856 EUNIT_TEST(
       
  1857     "FrameSize - test ",
       
  1858     "CMccCodecInformation",
       
  1859     "FrameSize",
       
  1860     "FUNCTIONALITY",
       
  1861     SetupL, UT_CMccCodecInformation_FrameSizeL, Teardown)
       
  1862 
       
  1863 EUNIT_TEST(
       
  1864     "Algo - test ",
       
  1865     "CMccCodecInformation",
       
  1866     "Algo",
       
  1867     "FUNCTIONALITY",
       
  1868     SetupL, UT_CMccCodecInformation_AlgoL, Teardown)
       
  1869 
       
  1870 EUNIT_TEST(
       
  1871     "RedCount - test ",
       
  1872     "CMccCodecInformation",
       
  1873     "RedCount",
       
  1874     "FUNCTIONALITY",
       
  1875     SetupL, UT_CMccCodecInformation_RedCountL, Teardown)
       
  1876 
       
  1877 EUNIT_TEST(
       
  1878     "RedundancyPT - test ",
       
  1879     "CMccCodecInformation",
       
  1880     "RedundancyPT",
       
  1881     "FUNCTIONALITY",
       
  1882     SetupL, UT_CMccCodecInformation_RedundancyPTL, Teardown)
       
  1883 
       
  1884 EUNIT_TEST(
       
  1885     "JitterBufInactivityTimeOut - test ",
       
  1886     "CMccCodecInformation",
       
  1887     "JitterBufInactivityTimeOut",
       
  1888     "FUNCTIONALITY",
       
  1889     SetupL, UT_CMccCodecInformation_JitterBufInactivityTimeOutL, Teardown)
       
  1890 
       
  1891 EUNIT_TEST(
       
  1892     "JitterBufThreshold - test ",
       
  1893     "CMccCodecInformation",
       
  1894     "JitterBufThreshold",
       
  1895     "FUNCTIONALITY",
       
  1896     SetupL, UT_CMccCodecInformation_JitterBufThresholdL, Teardown)
       
  1897 
       
  1898 EUNIT_TEST(
       
  1899     "JitterBufBufferLength - test ",
       
  1900     "CMccCodecInformation",
       
  1901     "JitterBufBufferLength",
       
  1902     "FUNCTIONALITY",
       
  1903     SetupL, UT_CMccCodecInformation_JitterBufBufferLengthL, Teardown)
       
  1904 
       
  1905 EUNIT_TEST(
       
  1906     "MaxBitrate - test ",
       
  1907     "CMccCodecInformation",
       
  1908     "MaxBitrate",
       
  1909     "FUNCTIONALITY",
       
  1910     SetupL, UT_CMccCodecInformation_MaxBitrateL, Teardown)
       
  1911 
       
  1912 EUNIT_TEST(
       
  1913     "AverageBitrate - test ",
       
  1914     "CMccCodecInformation",
       
  1915     "AverageBitrate",
       
  1916     "FUNCTIONALITY",
       
  1917     SetupL, UT_CMccCodecInformation_AverageBitrateL, Teardown)
       
  1918 
       
  1919 EUNIT_TEST(
       
  1920     "Framerate - test ",
       
  1921     "CMccCodecInformation",
       
  1922     "Framerate",
       
  1923     "FUNCTIONALITY",
       
  1924     SetupL, UT_CMccCodecInformation_FramerateL, Teardown)
       
  1925 
       
  1926 EUNIT_TEST(
       
  1927     "FrameHeight - test ",
       
  1928     "CMccCodecInformation",
       
  1929     "FrameHeight",
       
  1930     "FUNCTIONALITY",
       
  1931     SetupL, UT_CMccCodecInformation_FrameHeightL, Teardown)
       
  1932 
       
  1933 EUNIT_TEST(
       
  1934     "FrameWidth - test ",
       
  1935     "CMccCodecInformation",
       
  1936     "FrameWidth",
       
  1937     "FUNCTIONALITY",
       
  1938     SetupL, UT_CMccCodecInformation_FrameWidthL, Teardown)
       
  1939 
       
  1940 EUNIT_TEST(
       
  1941     "Priority - test ",
       
  1942     "CMccCodecInformation",
       
  1943     "Priority",
       
  1944     "FUNCTIONALITY",
       
  1945     SetupL, UT_CMccCodecInformation_PriorityL, Teardown)
       
  1946 
       
  1947 EUNIT_TEST(
       
  1948     "PriorityPreference - test ",
       
  1949     "CMccCodecInformation",
       
  1950     "PriorityPreference",
       
  1951     "FUNCTIONALITY",
       
  1952     SetupL, UT_CMccCodecInformation_PriorityPreferenceL, Teardown)
       
  1953 
       
  1954 EUNIT_TEST(
       
  1955     "KeepAliveTimer - test ",
       
  1956     "CMccCodecInformation",
       
  1957     "KeepAliveTimer",
       
  1958     "FUNCTIONALITY",
       
  1959     SetupL, UT_CMccCodecInformation_KeepAliveTimerL, Teardown)
       
  1960 
       
  1961 EUNIT_TEST(
       
  1962     "KeepAlivePT - test ",
       
  1963     "CMccCodecInformation",
       
  1964     "KeepAlivePT",
       
  1965     "FUNCTIONALITY",
       
  1966     SetupL, UT_CMccCodecInformation_KeepAlivePTL, Teardown)
       
  1967 
       
  1968 EUNIT_TEST(
       
  1969     "KeepAliveData - test ",
       
  1970     "CMccCodecInformation",
       
  1971     "KeepAliveData",
       
  1972     "FUNCTIONALITY",
       
  1973     SetupL, UT_CMccCodecInformation_KeepAliveDataL, Teardown)
       
  1974 
       
  1975 EUNIT_TEST(
       
  1976     "ComfortNoiseGeneration - test ",
       
  1977     "CMccCodecInformation",
       
  1978     "ComfortNoiseGeneration",
       
  1979     "FUNCTIONALITY",
       
  1980     SetupL, UT_CMccCodecInformation_ComfortNoiseGenerationL, Teardown)
       
  1981 
       
  1982 EUNIT_TEST(
       
  1983     "GetChannels - test ",
       
  1984     "CMccCodecInformation",
       
  1985     "GetChannels",
       
  1986     "FUNCTIONALITY",
       
  1987     SetupL, UT_CMccCodecInformation_GetChannelsL, Teardown)
       
  1988 
       
  1989 EUNIT_TEST(
       
  1990     "MaxRed - test ",
       
  1991     "CMccCodecInformation",
       
  1992     "MaxRed",
       
  1993     "FUNCTIONALITY",
       
  1994     SetupL, UT_CMccCodecInformation_MaxRedL, Teardown)
       
  1995 
       
  1996 EUNIT_TEST(
       
  1997     "SetFmtpAttrL - test ",
       
  1998     "CMccCodecInformation",
       
  1999     "SetFmtpAttrL",
       
  2000     "FUNCTIONALITY",
       
  2001     SetupL, UT_CMccCodecInformation_SetFmtpAttrLL, Teardown)
       
  2002 
       
  2003 EUNIT_TEST(
       
  2004     "ParseFmtpAttrL - test ",
       
  2005     "CMccCodecInformation",
       
  2006     "ParseFmtpAttrL",
       
  2007     "FUNCTIONALITY",
       
  2008     SetupL, UT_CMccCodecInformation_ParseFmtpAttrLL, Teardown)
       
  2009 
       
  2010 EUNIT_TEST(
       
  2011     "CreateFmtpAttrListL - test ",
       
  2012     "CMccCodecInformation",
       
  2013     "CreateFmtpAttrListL",
       
  2014     "FUNCTIONALITY",
       
  2015     SetupL, UT_CMccCodecInformation_CreateFmtpAttrListLL, Teardown)
       
  2016 
       
  2017 EUNIT_TEST(
       
  2018     "CreateFmtpAttrListL - test ",
       
  2019     "CMccCodecInformation",
       
  2020     "CreateFmtpAttrListL",
       
  2021     "FUNCTIONALITY",
       
  2022     SetupL, UT_CMccCodecInformation_CreateFmtpAttrListL_1L, Teardown)
       
  2023 
       
  2024 EUNIT_TEST(
       
  2025     "SetCrc - test ",
       
  2026     "CMccCodecInformation",
       
  2027     "SetCrc",
       
  2028     "FUNCTIONALITY",
       
  2029     SetupL, UT_CMccCodecInformation_SetCrcL, Teardown)
       
  2030 
       
  2031 EUNIT_TEST(
       
  2032     "GetCrc - test ",
       
  2033     "CMccCodecInformation",
       
  2034     "GetCrc",
       
  2035     "FUNCTIONALITY",
       
  2036     SetupL, UT_CMccCodecInformation_GetCrcL, Teardown)
       
  2037 
       
  2038 EUNIT_TEST(
       
  2039     "SetRobustSorting - test ",
       
  2040     "CMccCodecInformation",
       
  2041     "SetRobustSorting",
       
  2042     "FUNCTIONALITY",
       
  2043     SetupL, UT_CMccCodecInformation_SetRobustSortingL, Teardown)
       
  2044 
       
  2045 EUNIT_TEST(
       
  2046     "GetRobustSorting - test ",
       
  2047     "CMccCodecInformation",
       
  2048     "GetRobustSorting",
       
  2049     "FUNCTIONALITY",
       
  2050     SetupL, UT_CMccCodecInformation_GetRobustSortingL, Teardown)
       
  2051 
       
  2052 EUNIT_TEST(
       
  2053     "SetInterleaving - test ",
       
  2054     "CMccCodecInformation",
       
  2055     "SetInterleaving",
       
  2056     "FUNCTIONALITY",
       
  2057     SetupL, UT_CMccCodecInformation_SetInterleavingL, Teardown)
       
  2058 
       
  2059 EUNIT_TEST(
       
  2060     "GetInterleaving - test ",
       
  2061     "CMccCodecInformation",
       
  2062     "GetInterleaving",
       
  2063     "FUNCTIONALITY",
       
  2064     SetupL, UT_CMccCodecInformation_GetInterleavingL, Teardown)
       
  2065 
       
  2066 EUNIT_TEST(
       
  2067     "SetChannels - test ",
       
  2068     "CMccCodecInformation",
       
  2069     "SetChannels",
       
  2070     "FUNCTIONALITY",
       
  2071     SetupL, UT_CMccCodecInformation_SetChannelsL, Teardown)
       
  2072 
       
  2073 EUNIT_TEST(
       
  2074     "GetChannels - test ",
       
  2075     "CMccCodecInformation",
       
  2076     "GetChannels",
       
  2077     "FUNCTIONALITY",
       
  2078     SetupL, UT_CMccCodecInformation_GetChannelsL, Teardown)
       
  2079 
       
  2080 EUNIT_TEST(
       
  2081     "RequireSignalling - test ",
       
  2082     "CMccCodecInformation",
       
  2083     "RequireSignalling",
       
  2084     "FUNCTIONALITY",
       
  2085     SetupL, UT_CMccCodecInformation_RequireSignallingL, Teardown)
       
  2086     
       
  2087 EUNIT_TEST(
       
  2088     "SetValuesL - test ",
       
  2089     "CMccCodecInformation",
       
  2090     "SetValuesL",
       
  2091     "FUNCTIONALITY",
       
  2092     SetupL, UT_CMccCodecInformation_SetValuesL, Teardown)
       
  2093     
       
  2094 EUNIT_TEST(
       
  2095     "GetValuesL - test ",
       
  2096     "CMccCodecInformation",
       
  2097     "GetValuesL",
       
  2098     "FUNCTIONALITY",
       
  2099     SetupL, UT_CMccCodecInformation_GetValuesL, Teardown)
       
  2100 
       
  2101 EUNIT_TEST(
       
  2102     "SetConfigKeyL - test ",
       
  2103     "CMccCodecInformation",
       
  2104     "SetConfigKeyL",
       
  2105     "FUNCTIONALITY",
       
  2106     SetupL, UT_CMccCodecInformation_SetConfigKeyL, Teardown)
       
  2107     
       
  2108 EUNIT_TEST(
       
  2109     "SetPreferredEncodingDecodingDeviceL - test ",
       
  2110     "CMccCodecInformation",
       
  2111     "SetPreferredEncodingDecodingDeviceL",
       
  2112     "FUNCTIONALITY",
       
  2113     SetupL, UT_CMccCodecInformation_SetPreferredEncodingDecodingDeviceL, Teardown)    
       
  2114 
       
  2115 EUNIT_TEST(
       
  2116     "ConfigKeyL - test ",
       
  2117     "CMccCodecInformation",
       
  2118     "ConfigKeyL",
       
  2119     "FUNCTIONALITY",
       
  2120     SetupL, UT_CMccCodecInformation_ConfigKeyL, Teardown)
       
  2121             
       
  2122 EUNIT_END_TEST_TABLE
       
  2123 
       
  2124 //  END OF FILE