camerasrv_plat/imaging_configuration_manager_api/tsrc/src/ICMSTIF.cpp
changeset 0 9b3e960ffc8a
child 42 605672cc2a86
equal deleted inserted replaced
-1:000000000000 0:9b3e960ffc8a
       
     1 /*
       
     2 * Copyright (c) 2002 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:  ICMSTIF class member functions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <e32cmn.h>
       
    22 #include <StifTestInterface.h>
       
    23 #include "ICMSTIF.h"
       
    24 
       
    25 #include <e32debug.h>
       
    26 
       
    27 // EXTERNAL DATA STRUCTURES
       
    28 //extern  ?external_data;
       
    29 
       
    30 // EXTERNAL FUNCTION PROTOTYPES  
       
    31 //extern ?external_function( ?arg_type,?arg_type );
       
    32 
       
    33 // CONSTANTS
       
    34 //const ?type ?constant_var = ?constant;
       
    35 
       
    36 // MACROS
       
    37 //#define ?macro ?macro_def
       
    38 
       
    39 // LOCAL CONSTANTS AND MACROS
       
    40 //const ?type ?constant_var = ?constant;
       
    41 //#define ?macro_name ?macro_def
       
    42 
       
    43 // MODULE DATA STRUCTURES
       
    44 //enum ?declaration
       
    45 //typedef ?declaration
       
    46 
       
    47 // LOCAL FUNCTION PROTOTYPES
       
    48 //?type ?function_name( ?arg_type, ?arg_type );
       
    49 
       
    50 // FORWARD DECLARATIONS
       
    51 //class ?FORWARD_CLASSNAME;
       
    52 
       
    53 // ============================= LOCAL FUNCTIONS ===============================
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // ?function_name ?description.
       
    57 // ?description
       
    58 // Returns: ?value_1: ?description
       
    59 //          ?value_n: ?description_line1
       
    60 //                    ?description_line2
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 /*
       
    64 ?type ?function_name(
       
    65     ?arg_type arg,  // ?description
       
    66     ?arg_type arg)  // ?description
       
    67     {
       
    68 
       
    69     ?code  // ?comment
       
    70 
       
    71     // ?comment
       
    72     ?code
       
    73     }
       
    74 */
       
    75 
       
    76 // ============================ MEMBER FUNCTIONS ===============================
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // CICMSTIF::CICMSTIF
       
    80 // C++ default constructor can NOT contain any code, that
       
    81 // might leave.
       
    82 // -----------------------------------------------------------------------------
       
    83 //
       
    84 CICMSTIF::CICMSTIF()
       
    85     {
       
    86 
       
    87     }
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // CICMSTIF::ConstructL
       
    91 // Symbian 2nd phase constructor can leave.
       
    92 // Note: If OOM test case uses STIF Logger, then STIF Logger must be created
       
    93 // with static buffer size parameter (aStaticBufferSize). Otherwise Logger 
       
    94 // allocates memory from heap and therefore causes error situations with OOM 
       
    95 // testing. For more information about STIF Logger construction, see STIF Users 
       
    96 // Guide.
       
    97 // -----------------------------------------------------------------------------
       
    98 //
       
    99 void CICMSTIF::ConstructL()
       
   100     {
       
   101     iLog = CStifLogger::NewL( KICMSTIFLogPath, 
       
   102                           KICMSTIFLogFile);
       
   103 /*    // SetAllocFailureSimulation( RHeap::EDeterministic, 0 ); // Enable OOM test loop
       
   104     SetAllocFailureSimulation( RHeap::ENone, 0 ); // Disable OOM test loop
       
   105     iMemTestEnabled = ETrue;*/
       
   106     }
       
   107 
       
   108 // -----------------------------------------------------------------------------
       
   109 // CICMSTIF::NewL
       
   110 // Two-phased constructor.
       
   111 // -----------------------------------------------------------------------------
       
   112 //
       
   113 CICMSTIF* CICMSTIF::NewL()
       
   114     {
       
   115     CICMSTIF* self = new (ELeave) CICMSTIF;
       
   116 
       
   117     CleanupStack::PushL( self );
       
   118     self->ConstructL();
       
   119     CleanupStack::Pop();
       
   120 
       
   121     return self;
       
   122 
       
   123     }
       
   124 
       
   125 // Destructor
       
   126 CICMSTIF::~CICMSTIF()
       
   127     { 
       
   128     delete iLog;
       
   129     }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // CICMSTIF::InitL
       
   133 // InitL is used to initialize the Test Module.
       
   134 // -----------------------------------------------------------------------------
       
   135 //
       
   136 TInt CICMSTIF::InitL( 
       
   137     TFileName& /*aIniFile*/, 
       
   138     TBool /*aFirstTime*/ )
       
   139     {
       
   140     return KErrNone;
       
   141 
       
   142     }
       
   143 
       
   144 
       
   145 
       
   146 // -----------------------------------------------------------------------------
       
   147 // CICMSTIF::Case
       
   148 // Returns a test case by number.
       
   149 //
       
   150 // This function contains an array of all available test cases 
       
   151 // i.e pair of case name and test function. If case specified by parameter
       
   152 // aCaseNumber is found from array, then that item is returned.
       
   153 // 
       
   154 // The reason for this rather complicated function is to specify all the
       
   155 // test cases only in one place. It is not necessary to understand how
       
   156 // function pointers to class member functions works when adding new test
       
   157 // cases. See function body for instructions how to add new test case.
       
   158 // -----------------------------------------------------------------------------
       
   159 //
       
   160 const TCaseInfo CICMSTIF::Case ( 
       
   161     const TInt aCaseNumber ) const 
       
   162      {
       
   163     /**
       
   164     * To add new test cases, implement new test case function and add new 
       
   165     * line to KCases array specify the name of the case and the function 
       
   166     * doing the test case
       
   167     * In practice, do following
       
   168     * 1) Make copy of existing test case function and change its name
       
   169     *    and functionality. Note that the function must be added to 
       
   170     *    ICMSTIF.cpp file and to ICMSTIF.h 
       
   171     *    header file.
       
   172     * 2) Add entry to following KCases array either by using FUNCENTRY or 
       
   173     *    ENTRY macro. 
       
   174     * ENTRY macro takes two parameters: test case name and test case 
       
   175     * function name.
       
   176     * FUNCENTRY macro takes only test case function name as a parameter and uses
       
   177     * that as a test case name and test case function name.
       
   178     */
       
   179     
       
   180     static TCaseInfoInternal const KCases[] =
       
   181         {
       
   182         // To add new test cases, add new items to this array
       
   183 		ENTRY( "TestCase001", TestCase_001L ),
       
   184 		ENTRY( "TestCase002", TestCase_002L ),
       
   185         ENTRY( "TestCase003", TestCase_003L ),
       
   186         ENTRY( "TestCase004", TestCase_004L ),
       
   187         ENTRY( "TestCase005", TestCase_005L ),
       
   188         ENTRY( "TestCase006", TestCase_006L ),
       
   189         ENTRY( "TestCase007", TestCase_007L ),
       
   190         ENTRY( "TestCase008", TestCase_008L ),
       
   191         ENTRY( "TestCase009", TestCase_009L ),
       
   192         ENTRY( "TestCase010", TestCase_010L ),
       
   193         ENTRY( "TestOOM", TestCase_OOML )
       
   194         };
       
   195 
       
   196     // Verify that case number is valid
       
   197     if( (TUint) aCaseNumber >= sizeof( KCases ) / 
       
   198                                sizeof( TCaseInfoInternal ) )
       
   199         {
       
   200         // Invalid case, construct empty object
       
   201         TCaseInfo null( (const TText*) L"" );
       
   202         null.iMethod = NULL;
       
   203         return null;
       
   204         }
       
   205 
       
   206     // Construct TCaseInfo object and return it
       
   207     TCaseInfo tmp ( KCases[ aCaseNumber ].iCaseName );
       
   208     tmp.iMethod = KCases[ aCaseNumber ].iMethod;
       
   209     return tmp;
       
   210      
       
   211     }
       
   212     
       
   213 // -----------------------------------------------------------------------------
       
   214 // CICMSTIF::TestCase_001L
       
   215 //
       
   216 // <INSERT DESCRIPTION HERE>
       
   217 //
       
   218 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   219 // -----------------------------------------------------------------------------
       
   220 //     
       
   221 TInt CICMSTIF::TestCase_001L( TTestResult& aResult )
       
   222 	{
       
   223 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   224 	delete icm;
       
   225 	CImagingConfigManager* icm2 = CImagingConfigManager::NewLC();
       
   226 	CleanupStack::Pop( icm2 );
       
   227     aResult.iResult = KErrNone;
       
   228     aResult.iResultDes = _L("CImagingConfigManager creations with NewL and NewLC succeeded both.");
       
   229 
       
   230     return KErrNone;
       
   231 	}
       
   232 
       
   233 // -----------------------------------------------------------------------------
       
   234 // CICMSTIF::TestCase_002L
       
   235 //
       
   236 // <INSERT DESCRIPTION HERE>
       
   237 //
       
   238 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   239 // -----------------------------------------------------------------------------
       
   240 //    
       
   241 TInt CICMSTIF::TestCase_002L( TTestResult& aResult )
       
   242 	{
       
   243 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   244     if(icm->NumberOfVideoQualityLevels() < 1 || icm->NumberOfVideoQualityLevels() > 100)
       
   245         {
       
   246         aResult.iResult = KErrGeneral;
       
   247 		aResult.iResultDes = _L("NumberOfVideoQualityLevels() didn't return value between 1-100.");
       
   248         }
       
   249     else
       
   250         {
       
   251         aResult.iResult = KErrNone;
       
   252 		aResult.iResultDes = _L("NumberOfVideoQualityLevels() OK.");
       
   253         }
       
   254 	delete icm;
       
   255     return KErrNone;
       
   256 	}
       
   257 
       
   258 
       
   259 // -----------------------------------------------------------------------------
       
   260 // CICMSTIF::TestCase_003L
       
   261 //
       
   262 // <INSERT DESCRIPTION HERE>
       
   263 //
       
   264 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   265 // -----------------------------------------------------------------------------
       
   266 //    
       
   267 TInt CICMSTIF::TestCase_003L( TTestResult& aResult )
       
   268 	{
       
   269 	_LIT8(KFileMime, "video/3gpp");
       
   270 	_LIT8(KVideoCodecMimeType, "video/H263-2000");
       
   271 	_LIT8(KPreferredSupplier, "Nokia");
       
   272 	const TUint32 KAudioFourCCType = 0x524D4120;
       
   273 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   274     CArrayFixFlat<TUint>* levels = new( ELeave ) CArrayFixFlat< TUint >( 1 );
       
   275     TVideoQualitySet videoset;
       
   276     icm->GetVideoQualityLevelsL(*levels);
       
   277     
       
   278     if(levels->Count() != 10 || levels->At(0) != 98
       
   279                              || levels->At(1) != 99 || levels->At(2) != 200
       
   280                              || levels->At(3) != 201 || levels->At(4) != 202 || levels->At(5) != 203
       
   281                              || levels->At(6) != 301 || levels->At(7) != 302 || levels->At(8) != 303
       
   282                              || levels->At(9) != 304 )
       
   283         {
       
   284         aResult.iResult = KErrGeneral;
       
   285 		aResult.iResultDes = _L("GetVideoQualityLevelsL()->At didn't return the expected values.");
       
   286         }
       
   287     else
       
   288         {
       
   289         icm->GetVideoQualitySet( videoset, /*100*/levels->At(1) );
       
   290         TInt length1 = KMaxStringLength;
       
   291         TInt length2 = KMaxStringLength;
       
   292         TInt length3 = KMaxStringLength;
       
   293         for( TInt i=0; i<KMaxStringLength; i++)
       
   294             {
       
   295             if(videoset.iVideoFileMimeType[i] == '\0')
       
   296                 {
       
   297                 length1 = i;
       
   298                 break;
       
   299                 }
       
   300             }
       
   301         for( TInt i=0; i<KMaxStringLength; i++)
       
   302             {
       
   303             if(videoset.iVideoCodecMimeType[i] == '\0')
       
   304                 {
       
   305                 length2 = i;
       
   306                 break;
       
   307                 }
       
   308             }
       
   309         for( TInt i=0; i<KMaxStringLength; i++)
       
   310             {
       
   311             if(videoset.iPreferredSupplier[i] == '\0')
       
   312                 {
       
   313                 length3 = i;
       
   314                 break;
       
   315                 }
       
   316             }
       
   317         if( videoset.iVideoQualitySetLevel != 99 ||
       
   318             memcompare(videoset.iVideoFileMimeType, length1, KFileMime().Ptr(), KFileMime().Length()) ||
       
   319             memcompare(videoset.iVideoCodecMimeType, length2, KVideoCodecMimeType().Ptr(), KVideoCodecMimeType().Length()) ||
       
   320             videoset.iVideoWidth != 176 ||
       
   321             videoset.iVideoHeight != 144 ||
       
   322             videoset.iVideoFrameRate != 15.0 ||
       
   323             videoset.iVideoBitRate != 60000 ||
       
   324             videoset.iVideoEncoderUID.iUid != 0 ||
       
   325             videoset.iRandomAccessRate != 0.2 ||
       
   326             videoset.iVideoPixelAspectRatioNum != 12 ||
       
   327             videoset.iVideoPixelAspectRatioDenom != 11 ||
       
   328             memcompare(videoset.iPreferredSupplier, length3, KPreferredSupplier().Ptr(), KPreferredSupplier().Length()) ||
       
   329             videoset.iAudioFourCCType.FourCC() != KAudioFourCCType ||
       
   330             videoset.iAudioBitRate != 12200 ||
       
   331             videoset.iAudioSamplingRate != 8000 ||
       
   332             videoset.iAudioChannels != 1 ||
       
   333             videoset.iAudioEncoderUID.iUid != 0 ||
       
   334             videoset.iAVSyncStartDelay != -200 ||
       
   335             videoset.iAVSyncResumeDelay != 0 ||
       
   336             videoset.iCameraDisplayId != 2 ||
       
   337             videoset.iCamcorderVisible != 100)
       
   338             {
       
   339             aResult.iResult = KErrGeneral;
       
   340 		    aResult.iResultDes = _L("GetVideoQualitySetL() didn't return expected values.");
       
   341             }
       
   342         else
       
   343             {
       
   344             aResult.iResult = KErrNone;
       
   345     		aResult.iResultDes = _L("GetVideoQualitySetL() OK.");
       
   346             }
       
   347         }
       
   348     delete levels;
       
   349 	delete icm;
       
   350     return KErrNone;
       
   351 	}
       
   352 
       
   353 
       
   354 // -----------------------------------------------------------------------------
       
   355 // CICMSTIF::TestCase_004L
       
   356 //
       
   357 // <INSERT DESCRIPTION HERE>
       
   358 //
       
   359 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   360 // -----------------------------------------------------------------------------
       
   361 //    
       
   362 TInt CICMSTIF::TestCase_004L( TTestResult& aResult )
       
   363 	{
       
   364 	_LIT8(KFileMime, "video/3gpp");
       
   365 	_LIT8(KVideoCodecMimeType, "video/H263-2000");
       
   366 	_LIT8(KPreferredSupplier, "Nokia");
       
   367 	const TUint32 KAudioFourCCType = 0x524D4120;
       
   368 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   369     TVideoQualitySet videoset;
       
   370     TSize resolution(176,144);
       
   371     icm->GetVideoQualitySet(videoset, resolution, KVideoCodecMimeType(), 0, 0, TFourCC(KAudioFourCCType));
       
   372     
       
   373     if(videoset.iVideoHeight != resolution.iHeight ||
       
   374        videoset.iVideoWidth != resolution.iWidth ||
       
   375        videoset.iVideoQualitySetLevel != 99)
       
   376         {
       
   377         aResult.iResult = KErrGeneral;
       
   378 		aResult.iResultDes = _L("GetVideoQualitySetL() didn't return expected value.");
       
   379         }
       
   380     else
       
   381         {
       
   382         TInt length1 = KMaxStringLength;
       
   383         TInt length2 = KMaxStringLength;
       
   384         TInt length3 = KMaxStringLength;
       
   385         for( TInt i=0; i<KMaxStringLength; i++)
       
   386             {
       
   387             if(videoset.iVideoFileMimeType[i] == '\0')
       
   388                 {
       
   389                 length1 = i;
       
   390                 break;
       
   391                 }
       
   392             }
       
   393         for( TInt i=0; i<KMaxStringLength; i++)
       
   394             {
       
   395             if(videoset.iVideoCodecMimeType[i] == '\0')
       
   396                 {
       
   397                 length2 = i;
       
   398                 break;
       
   399                 }
       
   400             }
       
   401         for( TInt i=0; i<KMaxStringLength; i++)
       
   402             {
       
   403             if(videoset.iPreferredSupplier[i] == '\0')
       
   404                 {
       
   405                 length3 = i;
       
   406                 break;
       
   407                 }
       
   408             }
       
   409         if( memcompare(videoset.iVideoFileMimeType, length1, KFileMime().Ptr(), KFileMime().Length()) ||
       
   410             memcompare(videoset.iVideoCodecMimeType, length2, KVideoCodecMimeType().Ptr(), KVideoCodecMimeType().Length()) ||
       
   411             videoset.iVideoWidth != 176 ||
       
   412             videoset.iVideoHeight != 144 ||
       
   413             videoset.iVideoFrameRate != 15.0 ||
       
   414             videoset.iVideoBitRate != 60000 ||
       
   415             videoset.iVideoEncoderUID.iUid != 0 ||
       
   416             videoset.iRandomAccessRate != 0.2 ||
       
   417             videoset.iVideoPixelAspectRatioNum != 12 ||
       
   418             videoset.iVideoPixelAspectRatioDenom != 11 ||
       
   419             memcompare(videoset.iPreferredSupplier, length3, KPreferredSupplier().Ptr(), KPreferredSupplier().Length()) ||
       
   420             videoset.iAudioFourCCType.FourCC() != KAudioFourCCType ||
       
   421             videoset.iAudioBitRate != 12200 ||
       
   422             videoset.iAudioSamplingRate != 8000 ||
       
   423             videoset.iAudioChannels != 1 ||
       
   424             videoset.iAudioEncoderUID.iUid != 0 ||
       
   425             videoset.iAVSyncStartDelay != -200 ||
       
   426             videoset.iAVSyncResumeDelay != 0 ||
       
   427             videoset.iCameraDisplayId != 2 ||
       
   428             videoset.iCamcorderVisible != 100)
       
   429             {
       
   430             aResult.iResult = KErrGeneral;
       
   431 		    aResult.iResultDes = _L("GetVideoQualitySetL() didn't return expected values.");
       
   432             }
       
   433         else
       
   434             {
       
   435             aResult.iResult = KErrNone;
       
   436     		aResult.iResultDes = _L("GetVideoQualitySetL() OK.");
       
   437             }
       
   438         }
       
   439 	delete icm;
       
   440     return KErrNone;
       
   441 	}
       
   442 
       
   443 
       
   444 // -----------------------------------------------------------------------------
       
   445 // CICMSTIF::TestCase_005L
       
   446 //
       
   447 // <INSERT DESCRIPTION HERE>
       
   448 //
       
   449 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   450 // -----------------------------------------------------------------------------
       
   451 //    
       
   452 TInt CICMSTIF::TestCase_005L( TTestResult& aResult )
       
   453 	{
       
   454 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   455     TCamcorderMMFPluginSettings ccorSettings;
       
   456     icm->GetCamcorderMMFPluginSettings(ccorSettings);
       
   457     
       
   458     if(ccorSettings.iVideoNightFrameRate != 5.00 ||
       
   459        ccorSettings.iCMRAvgVideoBitRateScaler != 0.9 ||
       
   460        ccorSettings.iVideoComplexitySetting != 1 ||
       
   461        ccorSettings.iCMRLatencyQualityTradeoff != 1.0 ||
       
   462        ccorSettings.iCMRPictureQuality != 50 ||
       
   463        ccorSettings.iCMRQualityTemporalTradeoff != 0.8 ||
       
   464        ccorSettings.iCMRNumCameraBuffers != 2 ||
       
   465        ccorSettings.iCMRNumCameraBuffersARM != 1 ||
       
   466        ccorSettings.iCMRMinNumOutputBuffers != 4)
       
   467         {
       
   468         aResult.iResult = KErrGeneral;
       
   469 		aResult.iResultDes = _L("GetCamcorderMMFPluginSettingsL() didn't return expected value.");
       
   470         }
       
   471     else
       
   472         {
       
   473         aResult.iResult = KErrNone;
       
   474     	aResult.iResultDes = _L("GetCamcorderMMFPluginSettingsL() OK.");
       
   475         }
       
   476 	delete icm;
       
   477     return KErrNone;
       
   478 	}
       
   479 
       
   480 
       
   481 // -----------------------------------------------------------------------------
       
   482 // CICMSTIF::TestCase_006L
       
   483 //
       
   484 // <INSERT DESCRIPTION HERE>
       
   485 //
       
   486 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   487 // -----------------------------------------------------------------------------
       
   488 //    
       
   489 TInt CICMSTIF::TestCase_006L( TTestResult& aResult )
       
   490 	{
       
   491 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   492     if(icm->NumberOfImageQualityLevels() != 27)
       
   493         {
       
   494         aResult.iResult = KErrGeneral;
       
   495 		aResult.iResultDes = _L("NumberOfImageQualityLevels() didn't return 27 as expected.");
       
   496         }
       
   497     else
       
   498         {
       
   499         aResult.iResult = KErrNone;
       
   500 		aResult.iResultDes = _L("NumberOfImageQualityLevels() OK.");
       
   501         }
       
   502 	delete icm;
       
   503     return KErrNone;
       
   504 	}
       
   505 
       
   506 
       
   507 // -----------------------------------------------------------------------------
       
   508 // CICMSTIF::TestCase_007L
       
   509 //
       
   510 // <INSERT DESCRIPTION HERE>
       
   511 //
       
   512 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   513 // -----------------------------------------------------------------------------
       
   514 //    
       
   515 TInt CICMSTIF::TestCase_007L( TTestResult& aResult )
       
   516 	{
       
   517 	_LIT8(KImageFileMimeType, "image/jpeg");
       
   518 	_LIT8(KImageFileExtension, ".jpg");
       
   519 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   520     CArrayFixFlat<TUint>* levels = new( ELeave ) CArrayFixFlat< TUint >( 1 );
       
   521     TImageQualitySet imageset;
       
   522     icm->GetImageQualityLevelsL(*levels, 2);
       
   523     
       
   524     if(levels->Count() != 24 || levels->At(0) != 99 || levels->At(1) != 100 || levels->At(2) != 101
       
   525                            || levels->At(3) != 102 || levels->At(4) != 103 || levels->At(5) != 104
       
   526                            || levels->At(6) != 105 || levels->At(7) != 106 || levels->At(8) != 199
       
   527                            || levels->At(9) != 200 || levels->At(10) != 201 || levels->At(11) != 202
       
   528                            || levels->At(12) != 203 || levels->At(13) != 204 || levels->At(14) != 205
       
   529                            || levels->At(15) != 206 || levels->At(16) != 299 || levels->At(17) != 300
       
   530                            || levels->At(18) != 301 || levels->At(19) != 302 || levels->At(20) != 303
       
   531                            || levels->At(21) != 304 || levels->At(22) != 305 || levels->At(23) != 306)
       
   532         {
       
   533         aResult.iResult = KErrGeneral;
       
   534 		aResult.iResultDes = _L("GetImageQualityLevelsL()->At didn't return expected value.");
       
   535         }
       
   536     else
       
   537         {
       
   538         icm->GetImageQualitySet( imageset, levels->At(1) );
       
   539         TInt length1 = KMaxStringLength;
       
   540         TInt length2 = KMaxStringLength;
       
   541         for( TInt i=0; i<KMaxStringLength; i++)
       
   542             {
       
   543             if(imageset.iImageFileMimeType[i] == '\0')
       
   544                 {
       
   545                 length1 = i;
       
   546                 break;
       
   547                 }
       
   548             }
       
   549         for( TInt i=0; i<KMaxStringLength; i++)
       
   550             {
       
   551             if(imageset.iImageFileExtension[i] == '\0')
       
   552                 {
       
   553                 length2 = i;
       
   554                 break;
       
   555                 }
       
   556             }
       
   557         if( memcompare(imageset.iImageFileMimeType, length1, KImageFileMimeType().Ptr(), KImageFileMimeType().Length()) ||
       
   558             memcompare(imageset.iImageFileExtension, length2, KImageFileExtension().Ptr(), KImageFileExtension().Length()) ||
       
   559             imageset.iImageWidth < 160 ||
       
   560             imageset.iImageWidth > 13333 ||
       
   561             imageset.iImageHeight < 120 ||
       
   562             imageset.iImageHeight > 10000 ||
       
   563             imageset.iCompressionQuality < 10 ||
       
   564             imageset.iCompressionQuality > 100 ||
       
   565             imageset.iEstimatedSize < 1024 ||
       
   566             imageset.iEstimatedSize > 10240000 ||
       
   567             imageset.iCameraDisplayId > 10000 ||
       
   568             imageset.iCamcorderVisible > 10000)
       
   569             {
       
   570             aResult.iResult = KErrGeneral;
       
   571 		    aResult.iResultDes = _L("GetImageQualityLevelsL() didn't return expected values.");
       
   572             }
       
   573         else
       
   574             {
       
   575             aResult.iResult = KErrNone;
       
   576     		aResult.iResultDes = _L("GetImageQualityLevelsL() OK.");
       
   577             }
       
   578         }
       
   579     delete levels;
       
   580 	delete icm;
       
   581     return KErrNone;
       
   582 	}
       
   583 
       
   584 // -----------------------------------------------------------------------------
       
   585 // CICMSTIF::TestCase_008L
       
   586 //
       
   587 // <INSERT DESCRIPTION HERE>
       
   588 //
       
   589 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   590 // -----------------------------------------------------------------------------
       
   591 //    
       
   592 TInt CICMSTIF::TestCase_008L( TTestResult& aResult )
       
   593 	{
       
   594 	_LIT8(KImageFileMimeType, "image/jpeg");
       
   595 	_LIT8(KImageFileExtension, ".jpg");
       
   596 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   597     TImageQualitySet imageset;
       
   598     TSize resolution(1280,960);
       
   599     icm->GetImageQualitySet(imageset, resolution, 2);
       
   600     
       
   601     if(imageset.iImageHeight != resolution.iHeight ||
       
   602        imageset.iImageWidth != resolution.iWidth ||
       
   603        imageset.iImageQualitySetLevel > 10000)
       
   604         {
       
   605         aResult.iResult = KErrGeneral;
       
   606 		aResult.iResultDes = _L("GetImageQualitySetL() resolution didn't return expected value.");
       
   607         }
       
   608     else
       
   609         {
       
   610         TInt length1 = KMaxStringLength;
       
   611         TInt length2 = KMaxStringLength;
       
   612         for( TInt i=0; i<KMaxStringLength; i++)
       
   613             {
       
   614             if(imageset.iImageFileMimeType[i] == '\0')
       
   615                 {
       
   616                 length1 = i;
       
   617                 break;
       
   618                 }
       
   619             }
       
   620         for( TInt i=0; i<KMaxStringLength; i++)
       
   621             {
       
   622             if(imageset.iImageFileExtension[i] == '\0')
       
   623                 {
       
   624                 length2 = i;
       
   625                 break;
       
   626                 }
       
   627             }
       
   628         if( memcompare(imageset.iImageFileMimeType, length1, KImageFileMimeType().Ptr(), KImageFileMimeType().Length()) ||
       
   629             memcompare(imageset.iImageFileExtension, length2, KImageFileExtension().Ptr(), KImageFileExtension().Length()) ||
       
   630             imageset.iCompressionQuality < 10 ||
       
   631             imageset.iCompressionQuality > 100 ||
       
   632             imageset.iEstimatedSize < 1024 ||
       
   633             imageset.iEstimatedSize > 10240000 ||
       
   634             imageset.iCameraDisplayId > 10000 ||
       
   635             imageset.iCamcorderVisible > 10000)
       
   636             {
       
   637             aResult.iResult = KErrGeneral;
       
   638 		    aResult.iResultDes = _L("GetImageQualitySetL() didn't return expected values.");
       
   639             }
       
   640         else
       
   641             {
       
   642             aResult.iResult = KErrNone;
       
   643     		aResult.iResultDes = _L("GetImageQualitySetL() OK.");
       
   644             }
       
   645         }
       
   646 	delete icm;
       
   647     return KErrNone;
       
   648 	}
       
   649 
       
   650 
       
   651 // -----------------------------------------------------------------------------
       
   652 // CICMSTIF::TestCase_009L
       
   653 //
       
   654 // <INSERT DESCRIPTION HERE>
       
   655 //
       
   656 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   657 // -----------------------------------------------------------------------------
       
   658 //    
       
   659 TInt CICMSTIF::TestCase_009L( TTestResult& aResult )
       
   660 	{
       
   661 	_LIT8(KFileMime, "video/3gpp");
       
   662 	_LIT8(KVideoCodecMimeType, "video/H263-2000");
       
   663 	_LIT8(KPreferredSupplier, "Nokia");
       
   664 	const TUint32 KAudioFourCCType = 0x524D4120;
       
   665 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   666     TVideoQualitySet videoset;
       
   667     TSize resolution(176,144);
       
   668     icm->GetVideoQualitySet( videoset, 125 );// This should return video set num 99
       
   669     
       
   670     if(videoset.iVideoHeight != resolution.iHeight ||
       
   671        videoset.iVideoWidth != resolution.iWidth ||
       
   672        videoset.iVideoQualitySetLevel != 99)
       
   673         {
       
   674         aResult.iResult = KErrGeneral;
       
   675 		aResult.iResultDes = _L("GetVideoQualitySetL() didn't return expected value.");
       
   676         }
       
   677     else
       
   678         {
       
   679         TInt length1 = KMaxStringLength;
       
   680         TInt length2 = KMaxStringLength;
       
   681         TInt length3 = KMaxStringLength;
       
   682         for( TInt i=0; i<KMaxStringLength; i++)
       
   683             {
       
   684             if(videoset.iVideoFileMimeType[i] == '\0')
       
   685                 {
       
   686                 length1 = i;
       
   687                 break;
       
   688                 }
       
   689             }
       
   690         for( TInt i=0; i<KMaxStringLength; i++)
       
   691             {
       
   692             if(videoset.iVideoCodecMimeType[i] == '\0')
       
   693                 {
       
   694                 length2 = i;
       
   695                 break;
       
   696                 }
       
   697             }
       
   698         for( TInt i=0; i<KMaxStringLength; i++)
       
   699             {
       
   700             if(videoset.iPreferredSupplier[i] == '\0')
       
   701                 {
       
   702                 length3 = i;
       
   703                 break;
       
   704                 }
       
   705             }
       
   706         if( memcompare(videoset.iVideoFileMimeType, length1, KFileMime().Ptr(), KFileMime().Length()) ||
       
   707             memcompare(videoset.iVideoCodecMimeType, length2, KVideoCodecMimeType().Ptr(), KVideoCodecMimeType().Length()) ||
       
   708             videoset.iVideoWidth != 176 ||
       
   709             videoset.iVideoHeight != 144 ||
       
   710             videoset.iVideoFrameRate != 15.0 ||
       
   711             videoset.iVideoBitRate != 60000 ||
       
   712             videoset.iVideoEncoderUID.iUid != 0 ||
       
   713             videoset.iRandomAccessRate != 0.2 ||
       
   714             videoset.iVideoPixelAspectRatioNum != 12 ||
       
   715             videoset.iVideoPixelAspectRatioDenom != 11 ||
       
   716             memcompare(videoset.iPreferredSupplier, length3, KPreferredSupplier().Ptr(), KPreferredSupplier().Length()) ||
       
   717             videoset.iAudioFourCCType.FourCC() != KAudioFourCCType ||
       
   718             videoset.iAudioBitRate != 12200 ||
       
   719             videoset.iAudioSamplingRate != 8000 ||
       
   720             videoset.iAudioChannels != 1 ||
       
   721             videoset.iAudioEncoderUID.iUid != 0 ||
       
   722             videoset.iAVSyncStartDelay != -200 ||
       
   723             videoset.iAVSyncResumeDelay != 0 ||
       
   724             videoset.iCameraDisplayId != 2 ||
       
   725             videoset.iCamcorderVisible != 100)
       
   726             {
       
   727             aResult.iResult = KErrGeneral;
       
   728 		    aResult.iResultDes = _L("GetVideoQualitySetL() didn't return expected values.");
       
   729             }
       
   730         else
       
   731             {
       
   732             aResult.iResult = KErrNone;
       
   733     		aResult.iResultDes = _L("GetVideoQualitySetL() OK.");
       
   734             }
       
   735         }
       
   736 	delete icm;
       
   737     return KErrNone;
       
   738 	}
       
   739 
       
   740 
       
   741 // -----------------------------------------------------------------------------
       
   742 // CICMSTIF::TestCase_010L
       
   743 //
       
   744 // <INSERT DESCRIPTION HERE>
       
   745 //
       
   746 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   747 // -----------------------------------------------------------------------------
       
   748 //    
       
   749 TInt CICMSTIF::TestCase_010L( TTestResult& aResult )
       
   750 	{
       
   751 	_LIT8(KImageFileMimeType, "image/jpeg");
       
   752 	_LIT8(KImageFileExtension, ".jpg");
       
   753 	CImagingConfigManager* icm = CImagingConfigManager::NewL();
       
   754     TImageQualitySet imageset;
       
   755     
       
   756     icm->GetImageQualitySet( imageset, 305, 2 );
       
   757     TInt length1 = KMaxStringLength;
       
   758     TInt length2 = KMaxStringLength;
       
   759     for( TInt i=0; i<KMaxStringLength; i++)
       
   760         {
       
   761         if(imageset.iImageFileMimeType[i] == '\0')
       
   762             {
       
   763             length1 = i;
       
   764             break;
       
   765             }
       
   766         }
       
   767     for( TInt i=0; i<KMaxStringLength; i++)
       
   768         {
       
   769         if(imageset.iImageFileExtension[i] == '\0')
       
   770             {
       
   771             length2 = i;
       
   772             break;
       
   773             }
       
   774         }
       
   775     if( memcompare(imageset.iImageFileMimeType, length1, KImageFileMimeType().Ptr(), KImageFileMimeType().Length()) ||
       
   776         memcompare(imageset.iImageFileExtension, length2, KImageFileExtension().Ptr(), KImageFileExtension().Length()) ||
       
   777         imageset.iImageWidth < 160 ||
       
   778         imageset.iImageWidth > 13000 ||
       
   779         imageset.iImageHeight < 120 ||
       
   780         imageset.iImageHeight > 10000 ||
       
   781         imageset.iCompressionQuality < 10 ||
       
   782         imageset.iCompressionQuality > 100 ||
       
   783         imageset.iEstimatedSize < 1024 ||
       
   784         imageset.iEstimatedSize > 10240000 ||
       
   785         imageset.iCameraDisplayId > 10000 ||
       
   786         imageset.iCamcorderVisible > 10000)
       
   787         {
       
   788         aResult.iResult = KErrGeneral;
       
   789 	    aResult.iResultDes = _L("GetImageQualityLevelsL() didn't return expected values.");
       
   790         }
       
   791     else
       
   792         {
       
   793         aResult.iResult = KErrNone;
       
   794 		aResult.iResultDes = _L("GetImageQualityLevelsL() OK.");
       
   795         }
       
   796 
       
   797 	delete icm;
       
   798     return KErrNone;
       
   799 	}
       
   800 
       
   801 
       
   802 // -----------------------------------------------------------------------------
       
   803 // CICMSTIF::TestCase_OOML
       
   804 //
       
   805 // <INSERT DESCRIPTION HERE>
       
   806 //
       
   807 // Pre-Condition: <INSERT PRE-CONDITIONS HERE>
       
   808 // -----------------------------------------------------------------------------
       
   809 //    
       
   810 TInt CICMSTIF::TestCase_OOML( TTestResult& aResult )
       
   811     {
       
   812     TInt error = KErrNone;
       
   813     _LIT(KTestCase, "TestCase0??");
       
   814     
       
   815     for( TInt i = 0; Case(i).iMethod != NULL && !error; i++ )
       
   816         {
       
   817         // Get the pointer to test case function
       
   818         TCaseInfo tmp = Case(i);
       
   819         if(KErrNotFound == tmp.iCaseName.Match(KTestCase()))
       
   820             {
       
   821             break;
       
   822             }
       
   823         SetAllocFailureSimulation( RHeap::EDeterministic, 1 ); // Enable OOM test loop
       
   824         aResult.SetResult( KErrNoMemory, _L("") ); // Initial value
       
   825         for (; ( aResult.iResult == KErrNoMemory ) && !error;)
       
   826             {      
       
   827             // Switches on alloc failure simulation if the parameters are set for it
       
   828             AllocFailureSimulation( ETrue ); 
       
   829             RDebug::Print(_L("*** OOM loop : %d ***\n"), iCurrentAllocFailureRate );
       
   830 
       
   831             iMethod = tmp.iMethod;        
       
   832             
       
   833             TRAP( error, ( this->*iMethod )( aResult ) );
       
   834             if ( error == KErrNoMemory )
       
   835                 {
       
   836                 error = KErrNone;
       
   837                 }
       
   838             }
       
   839         AllocFailureSimulation( EFalse );
       
   840         }
       
   841 
       
   842     SetAllocFailureSimulation( RHeap::ENone, 1 ); // Disable OOM test loop
       
   843     User::LeaveIfError( error );
       
   844     return KErrNone;
       
   845     }
       
   846 
       
   847 
       
   848 /*
       
   849 */    
       
   850 
       
   851 void CICMSTIF::AllocFailureSimulation (TBool aSwitchedOn)
       
   852 	{
       
   853 	if (aSwitchedOn)
       
   854 		{
       
   855 		__UHEAP_SETFAIL ( iAllocFailureType, iCurrentAllocFailureRate );
       
   856         iCurrentAllocFailureRate++;
       
   857 		}
       
   858 	else
       
   859 		{
       
   860 		__UHEAP_RESET;
       
   861         iCurrentAllocFailureRate = iAllocFailureRate;
       
   862 		}
       
   863 	}
       
   864 
       
   865 
       
   866 /*
       
   867 */    
       
   868 
       
   869 void CICMSTIF::SetAllocFailureSimulation( RHeap::TAllocFail aAllocFailureType, TInt aAllocFailureRate )
       
   870     {
       
   871     iAllocFailureType = aAllocFailureType;
       
   872     iAllocFailureRate = aAllocFailureRate;
       
   873     iCurrentAllocFailureRate = aAllocFailureRate;
       
   874     }
       
   875 
       
   876 // -----------------------------------------------------------------------------
       
   877 // CICMSTIF::GetTestCasesL
       
   878 // GetTestCases is used to inquire test cases from the Test Module. Test
       
   879 // cases are stored to array of test cases. The Test Framework will be 
       
   880 // the owner of the data in the RPointerArray after GetTestCases return
       
   881 // and it does the memory deallocation. 
       
   882 // -----------------------------------------------------------------------------
       
   883 //
       
   884 TInt CICMSTIF::GetTestCasesL( 
       
   885     const TFileName& /*aConfig*/, 
       
   886     RPointerArray<TTestCaseInfo>& aTestCases )
       
   887     {
       
   888 
       
   889     // Loop through all test cases and create new
       
   890     // TTestCaseInfo items and append items to aTestCase array    
       
   891     for( TInt i = 0; Case(i).iMethod != NULL; i++ )
       
   892         {
       
   893  
       
   894 	    // Allocate new TTestCaseInfo from heap for a testcase definition.
       
   895         TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo();
       
   896     
       
   897 	    // PushL TTestCaseInfo to CleanupStack.    
       
   898         CleanupStack::PushL( newCase );
       
   899 
       
   900 	    // Set number for the testcase.
       
   901 	    // When the testcase is run, this comes as a parameter to RunTestCaseL.
       
   902         newCase->iCaseNumber = i;
       
   903 
       
   904 	    // Set title for the test case. This is shown in UI to user.
       
   905         newCase->iTitle.Copy( Case(i).iCaseName );
       
   906 
       
   907 	    // Append TTestCaseInfo to the testcase array. After appended 
       
   908 	    // successfully the TTestCaseInfo object is owned (and freed) 
       
   909 	    // by the TestServer. 
       
   910         User::LeaveIfError(aTestCases.Append ( newCase ) );
       
   911         
       
   912 	    // Pop TTestCaseInfo from the CleanupStack.
       
   913         CleanupStack::Pop( newCase );
       
   914 
       
   915         }
       
   916 
       
   917     return KErrNone;
       
   918 
       
   919     }
       
   920 
       
   921 // -----------------------------------------------------------------------------
       
   922 // CICMSTIF::RunTestCaseL
       
   923 // RunTestCaseL is used to run an individual test case specified 
       
   924 // by aTestCase. Test cases that can be run may be requested from 
       
   925 // Test Module by GetTestCases method before calling RunTestCase.
       
   926 // -----------------------------------------------------------------------------
       
   927 //
       
   928 TInt CICMSTIF::RunTestCaseL(
       
   929     const TInt aCaseNumber ,
       
   930     const TFileName& /*aConfig*/,
       
   931     TTestResult& aResult )
       
   932     {
       
   933     // Return value
       
   934     TInt execStatus = KErrNone;
       
   935 
       
   936     // Get the pointer to test case function
       
   937     TCaseInfo tmp = Case ( aCaseNumber );
       
   938 
       
   939     // Check that case number was valid
       
   940     if ( tmp.iMethod != NULL )
       
   941         {
       
   942         // Valid case was found, call it via function pointer
       
   943         iMethod = tmp.iMethod;        
       
   944         execStatus  = ( this->*iMethod )( aResult );                  
       
   945         }
       
   946     else
       
   947         {        
       
   948         // Valid case was not found, return error.
       
   949         execStatus = KErrNotFound;
       
   950         }
       
   951 
       
   952     // Return case execution status (not the result of the case execution)
       
   953     return execStatus;
       
   954     }
       
   955 
       
   956 // -----------------------------------------------------------------------------
       
   957 // CICMSTIF::OOMTestQueryL
       
   958 // Used to check if a particular test case should be run in OOM conditions and 
       
   959 // which memory allocations should fail.    
       
   960 //
       
   961 // NOTE: This method is virtual and must be implemented only if test case
       
   962 // should be executed using OOM conditions.  
       
   963 // -----------------------------------------------------------------------------
       
   964 //
       
   965 TBool CICMSTIF::OOMTestQueryL( 
       
   966                                 const TFileName& /* aTestCaseFile */, 
       
   967                                 const TInt /* aCaseNumber */, 
       
   968                                 TOOMFailureType& /* aFailureType */, 
       
   969                                 TInt& /* aFirstMemFailure */, 
       
   970                                 TInt& /* aLastMemFailure */ ) 
       
   971     {
       
   972     _LIT( KOOMTestQueryL, "CICMSTIF::OOMTestQueryL" );
       
   973     iLog->Log( KOOMTestQueryL ); 
       
   974 
       
   975     return EFalse;
       
   976 
       
   977     }
       
   978 
       
   979 // -----------------------------------------------------------------------------
       
   980 // CICMSTIF::OOMTestInitializeL
       
   981 // Used to perform the test environment setup for a particular OOM test case. 
       
   982 // Test Modules may use the initialization file to read parameters for Test 
       
   983 // Module initialization but they can also have their own configure file or 
       
   984 // some other routine to initialize themselves.  
       
   985 //
       
   986 // NOTE: This method is virtual and must be implemented only if test case
       
   987 // should be executed using OOM conditions.  
       
   988 // -----------------------------------------------------------------------------
       
   989 //
       
   990 void CICMSTIF::OOMTestInitializeL( 
       
   991                                 const TFileName& /* aTestCaseFile */, 
       
   992                                 const TInt /* aCaseNumber */ )
       
   993     {
       
   994     }
       
   995 
       
   996 // -----------------------------------------------------------------------------
       
   997 // CICMSTIF::OOMHandleWarningL
       
   998 // In some cases the heap memory allocation should be skipped, either due to
       
   999 // problems in the OS code or components used by the code being tested, or even 
       
  1000 // inside the tested components which are implemented this way on purpose (by 
       
  1001 // design), so it is important to give the tester a way to bypass allocation 
       
  1002 // failures.
       
  1003 //
       
  1004 // NOTE: This method is virtual and must be implemented only if test case
       
  1005 // should be executed using OOM conditions.  
       
  1006 // -----------------------------------------------------------------------------
       
  1007 //
       
  1008 void CICMSTIF::OOMHandleWarningL( 
       
  1009                                 const TFileName& /* aTestCaseFile */,
       
  1010                                 const TInt /* aCaseNumber */, 
       
  1011                                 TInt& /* aFailNextValue */ )
       
  1012     {
       
  1013     }
       
  1014 
       
  1015 // -----------------------------------------------------------------------------
       
  1016 // CICMSTIF::OOMTestFinalizeL
       
  1017 // Used to perform the test environment cleanup for a particular OOM test case.
       
  1018 //
       
  1019 // NOTE: This method is virtual and must be implemented only if test case
       
  1020 // should be executed using OOM conditions.  
       
  1021 // -----------------------------------------------------------------------------
       
  1022 //                  
       
  1023 void CICMSTIF::OOMTestFinalizeL( 
       
  1024                                 const TFileName& /* aTestCaseFile */, 
       
  1025                                 const TInt /* aCaseNumber */ )
       
  1026     {
       
  1027     }
       
  1028 
       
  1029 // ========================== OTHER EXPORTED FUNCTIONS =========================
       
  1030 
       
  1031 // -----------------------------------------------------------------------------
       
  1032 // LibEntryL is a polymorphic Dll entry point
       
  1033 // Returns: CTestModuleBase*: Pointer to Test Module object
       
  1034 // -----------------------------------------------------------------------------
       
  1035 //
       
  1036 EXPORT_C CTestModuleBase* LibEntryL()
       
  1037     {
       
  1038     return CICMSTIF::NewL();
       
  1039 
       
  1040     }
       
  1041 
       
  1042 // -----------------------------------------------------------------------------
       
  1043 // SetRequirements handles test module parameters(implements evolution
       
  1044 // version 1 for test module's heap and stack sizes configuring).
       
  1045 // Returns: TInt: Symbian error code.
       
  1046 // -----------------------------------------------------------------------------
       
  1047 //
       
  1048 EXPORT_C TInt SetRequirements( CTestModuleParam*& aTestModuleParam, 
       
  1049                                 TUint32& aParameterValid )
       
  1050     {
       
  1051 
       
  1052     /* --------------------------------- NOTE ---------------------------------
       
  1053     USER PANICS occurs in test thread creation when:
       
  1054     1) "The panic occurs when the value of the stack size is negative."
       
  1055     2) "The panic occurs if the minimum heap size specified is less
       
  1056        than KMinHeapSize".
       
  1057        KMinHeapSize: "Functions that require a new heap to be allocated will
       
  1058        either panic, or will reset the required heap size to this value if
       
  1059        a smaller heap size is specified".
       
  1060     3) "The panic occurs if the minimum heap size specified is greater than
       
  1061        the maximum size to which the heap can grow".
       
  1062     Other:
       
  1063     1) Make sure that your hardware or Symbian OS is supporting given sizes.
       
  1064        e.g. Hardware might support only sizes that are divisible by four.
       
  1065     ------------------------------- NOTE end ------------------------------- */
       
  1066 
       
  1067     // Normally STIF uses default heap and stack sizes for test thread, see:
       
  1068     // KTestThreadMinHeap, KTestThreadMinHeap and KStackSize.
       
  1069     // If needed heap and stack sizes can be configured here by user. Remove
       
  1070     // comments and define sizes.
       
  1071 
       
  1072 
       
  1073     aParameterValid = KStifTestModuleParameterChanged;
       
  1074 
       
  1075     CTestModuleParamVer01* param = CTestModuleParamVer01::NewL();
       
  1076     // Stack size
       
  1077     param->iTestThreadStackSize= 2*16384; // 32K stack
       
  1078     // Heap sizes
       
  1079     param->iTestThreadMinHeap = 4096;   // 4K heap min
       
  1080     param->iTestThreadMaxHeap = 8*1048576;// 8M heap max
       
  1081 
       
  1082     aTestModuleParam = param;
       
  1083 
       
  1084     return KErrNone;
       
  1085 
       
  1086     }
       
  1087 
       
  1088 // -----------------------------------------------------------------------------
       
  1089 // E32Dll is a DLL entry point function
       
  1090 // Returns: KErrNone: No error
       
  1091 // -----------------------------------------------------------------------------
       
  1092 //
       
  1093 #ifndef EKA2 // Hide Dll entry point to EKA2
       
  1094 GLDEF_C TInt E32Dll(
       
  1095     TDllReason /*aReason*/) // Reason
       
  1096     {
       
  1097     return(KErrNone);
       
  1098 
       
  1099     }
       
  1100 #endif // EKA2
       
  1101 
       
  1102 //  End of File