connectionutilities/ConnectionDialogs/src/ConnectionDialogsNotifBase.cpp
branchRCL_3
changeset 26 0a9e01492035
parent 0 5a93021fdf25
child 45 4c83dcfb6f1a
equal deleted inserted replaced
24:c45d4fe2ff0a 26:0a9e01492035
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 
    20 
    21 #include "ConnectionDialogsNotifBase.h"
    21 #include <e32property.h>
    22 
    22 #include <ScreensaverInternalPSKeys.h>
       
    23 #include <coreapplicationuisdomainpskeys.h>
    23 #include <bautils.h>
    24 #include <bautils.h>
    24 #include <eikenv.h>
    25 #include <eikenv.h>
    25 #include <data_caging_path_literals.hrh>
    26 #include <data_caging_path_literals.hrh>
    26 
    27 
       
    28 #include "ConnectionDialogsNotifBase.h"
    27 
    29 
    28 // CONSTANTS
    30 // CONSTANTS
    29 
    31 
    30 // ROM folder
    32 // ROM folder
    31 _LIT( KDriveZ, "z:" );
    33 _LIT( KDriveZ, "z:" );
   128         {
   130         {
   129         CCoeEnv::Static()->DeleteResourceFile( iResource );        
   131         CCoeEnv::Static()->DeleteResourceFile( iResource );        
   130         }
   132         }
   131     }
   133     }
   132 
   134 
       
   135 // ---------------------------------------------------------
       
   136 // CConnectionDialogsNotifBase::ScreenSaverOn()
       
   137 // ---------------------------------------------------------
       
   138 //
       
   139 TBool CConnectionDialogsNotifBase::ScreenSaverOn()
       
   140     {
       
   141     TInt err( KErrNone );
       
   142     TInt screenSaverOn( 0 );
       
   143 
       
   144     // Cancel the dialog if screen saver is on.
       
   145     err = RProperty::Get( KPSUidScreenSaver, 
       
   146             KScreenSaverOn, 
       
   147             screenSaverOn );
       
   148     
       
   149     return (err == KErrNone && screenSaverOn > 0); 
       
   150     }
       
   151 
       
   152 // ---------------------------------------------------------
       
   153 // CConnectionDialogsNotifBase::AutolockOn()
       
   154 // ---------------------------------------------------------
       
   155 //
       
   156 TBool CConnectionDialogsNotifBase::AutolockOn()
       
   157     {
       
   158     TBool retval( EFalse );
       
   159 
       
   160 #ifdef RD_STARTUP_CHANGE
       
   161     TInt err( KErrNone );
       
   162     TInt autolockOn( 0 );
       
   163     // Cancel the dialog if screen saver is on.
       
   164     err = RProperty::Get( KPSUidCoreApplicationUIs, 
       
   165             KCoreAppUIsAutolockStatus, 
       
   166             autolockOn );
       
   167     retval = (err == KErrNone && autolockOn > EAutolockOff);
       
   168 #endif
       
   169 
       
   170     return retval; 
       
   171     }
   133 
   172 
   134 
   173 
   135 // End of File
   174 // End of File