uiresources_plat/cdl_api/tsrc/src/testdomcdl.cpp
branchRCL_3
changeset 24 e4e3998ddda2
parent 0 05e9090e2422
child 25 9f95a5546443
equal deleted inserted replaced
23:9dbe1b043bea 24:e4e3998ddda2
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include <stiftestinterface.h>
    21 #include <stiftestinterface.h>
    22 #include <settingserverclient.h>
    22 #include <settingserverclient.h>
    23 #include <screensaverinternalpskeys.h>
       
    24 #include <e32property.h>
    23 #include <e32property.h>
    25 
    24 
    26 #include "testdomcdl.h"
    25 #include "testdomcdl.h"
    27 
    26 
    28 // CONSTANTS
    27 // CONSTANTS
   100                           CStifLogger::EFile,
    99                           CStifLogger::EFile,
   101                           EFalse );
   100                           EFalse );
   102     
   101     
   103     SendTestClassVersion();
   102     SendTestClassVersion();
   104     
   103     
   105     TurnOffScreenSaver();
       
   106     
       
   107     _LIT( KResourceFile, "c:\\resource\\testdomcdl.rsc" );
   104     _LIT( KResourceFile, "c:\\resource\\testdomcdl.rsc" );
   108     iOffset = CCoeEnv::Static()->AddResourceFileL( KResourceFile );
   105     iOffset = CCoeEnv::Static()->AddResourceFileL( KResourceFile );
   109     
   106     
   110     }
   107     }
   111 
   108 
   156 EXPORT_C CScriptBase* LibEntryL( 
   153 EXPORT_C CScriptBase* LibEntryL( 
   157     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
   154     CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
   158     {
   155     {
   159     return ( CScriptBase* ) CTestDomCdl::NewL( aTestModuleIf );
   156     return ( CScriptBase* ) CTestDomCdl::NewL( aTestModuleIf );
   160     }
   157     }
   161 
       
   162 // -----------------------------------------------------------------------------
       
   163 // Turn off ScreenSaver
       
   164 // -----------------------------------------------------------------------------
       
   165 //
       
   166 void CTestDomCdl::TurnOffScreenSaver()
       
   167     {
       
   168     TInt err1 = RProperty::Get( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
       
   169         iOldScreenSaverProperty );
       
   170     TInt err2 = RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
       
   171         KScreenSaverAllowScreenSaver );    
       
   172     RDebug::Printf( "screensaver property=%d err1=%d err2=%d\n", 
       
   173         iOldScreenSaverProperty, err1, err2 );
       
   174     }
       
   175 
       
   176 // -----------------------------------------------------------------------------
       
   177 // Restore ScreenSaver
       
   178 // -----------------------------------------------------------------------------
       
   179 //
       
   180 void CTestDomCdl::RestoreScreenSaver()
       
   181     {
       
   182     RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
       
   183         iOldScreenSaverProperty );
       
   184     User::ResetInactivityTime();
       
   185     }
       
   186 
       
   187 
       
   188 //  End of File
   158 //  End of File
   189 
   159 
   190 
   160