stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp
branchRCL_3
changeset 6 ecff51f1e7fb
parent 0 a03f92240627
child 18 3406c99bc375
equal deleted inserted replaced
4:73ff0d268e1d 6:ecff51f1e7fb
    31 // Implementation part is located at the end of this file.
    31 // Implementation part is located at the end of this file.
    32 //#define STIFUNIT_OOMTESTQUERYL
    32 //#define STIFUNIT_OOMTESTQUERYL
    33 //#define STIFUNIT_OOMTESTINITIALIZEL
    33 //#define STIFUNIT_OOMTESTINITIALIZEL
    34 //#define STIFUNIT_OOMHANDLEWARNINGL
    34 //#define STIFUNIT_OOMHANDLEWARNINGL
    35 //#define STIFUNIT_OOMTESTFINALIZEL
    35 //#define STIFUNIT_OOMTESTFINALIZEL
       
    36 // Uncomment following define, if you want to increase heap or stack size.
       
    37 // #define STIFUNIT_SETHEAPANDSTACKSIZE
    36 /******************************************************************************/
    38 /******************************************************************************/
    37 
    39 
    38 
    40 
    39 /*
    41 /*
    40  * Test module internals. Please do not edit them. 
    42  * Test module internals. Please do not edit them. 
    53 #define STIF_UNIT_MODULE_CLASS_NAME CSTIFUnitXXX
    55 #define STIF_UNIT_MODULE_CLASS_NAME CSTIFUnitXXX
    54 #define STIF_UNIT_MODULE_NAME _L("STIFUnitXXX.dll")
    56 #define STIF_UNIT_MODULE_NAME _L("STIFUnitXXX.dll")
    55 
    57 
    56 // Include STIF unit generic file
    58 // Include STIF unit generic file
    57 #include <StifUnitGeneric.h>
    59 #include <StifUnitGeneric.h>
       
    60 
       
    61 /*
       
    62  * Implementation of setHeapAndStack virtual methods.
       
    63  * To changes heap and stack size provide new values to iTestThreadStackSize, iTestThreadMinHeap and iTestThreadMaxHeap. 
       
    64 */
       
    65 
       
    66 #ifdef STIFUNIT_SETHEAPANDSTACKSIZE
       
    67 EXPORT_C TInt SetRequirements( CTestModuleParam*& aTestModuleParam, 
       
    68                                TUint32& aParameterValid )
       
    69     {
       
    70     aParameterValid = KStifTestModuleParameterChanged;
       
    71     CTestModuleParamVer01* param = CTestModuleParamVer01::NewL(); 
       
    72     // Stack size 
       
    73     param->iTestThreadStackSize= 16384; // 16K stack 
       
    74     // Heap sizes 
       
    75     param->iTestThreadMinHeap = 4096; // 4K heap min 
       
    76     param->iTestThreadMaxHeap = 1048576;// 1M heap max 
       
    77 
       
    78     return KErrNone;
       
    79     }
       
    80 #undef STIFUNIT_SETHEAPANDSTACKSIZE
       
    81 #endif
    58 
    82 
    59 /*
    83 /*
    60  * User implementation of OOM virtual methods.
    84  * User implementation of OOM virtual methods.
    61  * Providing own implementation requires uncommenting defines at the
    85  * Providing own implementation requires uncommenting defines at the
    62  * beginnig of this file.   
    86  * beginnig of this file.