phoneapp/phoneuiutils/src/cphonestorage.cpp
changeset 77 2be0b271d017
parent 0 5f000ab63145
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
    26 // ---------------------------------------------------------------------------
    26 // ---------------------------------------------------------------------------
    27 // Constructor
    27 // Constructor
    28 // ---------------------------------------------------------------------------
    28 // ---------------------------------------------------------------------------
    29 //
    29 //
    30 CPhoneStorage::CPhoneStorage()
    30 CPhoneStorage::CPhoneStorage()
    31     : iIsScreenLocked( EFalse ),
    31     : iNeedToEnableKeylock( EFalse )
    32     iNeedToEnableKeylock( EFalse )
       
    33     {
    32     {
    34     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::CPhoneStorage()");
    33     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::CPhoneStorage()");
    35     }
    34     }
    36 
    35 
    37 // ---------------------------------------------------------------------------
    36 // ---------------------------------------------------------------------------
    63 // ---------------------------------------------------------------------------
    62 // ---------------------------------------------------------------------------
    64 //
    63 //
    65 EXPORT_C CPhoneStorage::~CPhoneStorage()
    64 EXPORT_C CPhoneStorage::~CPhoneStorage()
    66     {
    65     {
    67     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::~CPhoneStorage()");
    66     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::~CPhoneStorage()");
    68     iBlockedKeysScanCode.Reset();
       
    69     iBlockedKeysScanCode.Close();
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // CPhoneStorage::AppendBlockedKeysListL
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 EXPORT_C void CPhoneStorage::AppendBlockedKeysListL( TStdScanCode aScanCode )
       
    77     {
       
    78     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::AppendBlockedKeysListL()");
       
    79     iBlockedKeysScanCode.AppendL( aScanCode );
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------
       
    83 // CPhoneStorage::GetBlockedKeyList
       
    84 // -----------------------------------------------------------
       
    85 //
       
    86 EXPORT_C const RArray<TInt>& CPhoneStorage::GetBlockedKeyList() const
       
    87     {
       
    88     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::GetBlockedKeyList()");
       
    89     return iBlockedKeysScanCode;
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------
       
    93 // CPhoneStorage::ResetBlockedKeysList
       
    94 // -----------------------------------------------------------
       
    95 //
       
    96 EXPORT_C void CPhoneStorage::ResetBlockedKeysList()
       
    97     {
       
    98     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::ResetBlockedKeysList()");
       
    99     iBlockedKeysScanCode.Reset();
       
   100     }
       
   101 
       
   102 // -----------------------------------------------------------
       
   103 // CPhoneStorage::IsBlockedKeysListSet
       
   104 // -----------------------------------------------------------
       
   105 //
       
   106 EXPORT_C TBool CPhoneStorage::IsBlockedKeysListEmpty()
       
   107     {
       
   108     __LOGMETHODSTARTEND(EPhoneUIUtils, "CPhoneStorage::IsBlockedKeysListSet()");
       
   109     TBool ret = ETrue;
       
   110     if( iBlockedKeysScanCode.Count() )
       
   111         {
       
   112         ret = EFalse;
       
   113         }
       
   114     return ret;
       
   115     }
       
   116 
       
   117 // -----------------------------------------------------------
       
   118 // CPhoneStorage::SetScreenLocked
       
   119 // -----------------------------------------------------------
       
   120 //
       
   121 EXPORT_C void CPhoneStorage::SetScreenLocked( TBool aLocked )
       
   122     {
       
   123     iIsScreenLocked = aLocked;
       
   124     }
       
   125 
       
   126 // -----------------------------------------------------------
       
   127 // CPhoneStorage::IsScreenLocked
       
   128 // -----------------------------------------------------------
       
   129 //
       
   130 EXPORT_C TBool CPhoneStorage::IsScreenLocked()
       
   131     {
       
   132     return iIsScreenLocked;
       
   133     }
    67     }
   134 
    68 
   135 // -----------------------------------------------------------
    69 // -----------------------------------------------------------
   136 // CPhoneStorage::NeedToEnableKeylock
    70 // CPhoneStorage::NeedToEnableKeylock
   137 // -----------------------------------------------------------
    71 // -----------------------------------------------------------
   139 EXPORT_C TBool CPhoneStorage::NeedToEnableKeylock()
    73 EXPORT_C TBool CPhoneStorage::NeedToEnableKeylock()
   140     {
    74     {
   141     return iNeedToEnableKeylock;
    75     return iNeedToEnableKeylock;
   142     }
    76     }
   143 
    77 
   144 
       
   145 // -----------------------------------------------------------
    78 // -----------------------------------------------------------
   146 // CPhoneStorage::NeedToEnableKeylock
    79 // CPhoneStorage::NeedToEnableKeylock
   147 // -----------------------------------------------------------
    80 // -----------------------------------------------------------
   148 //
    81 //
   149 EXPORT_C void CPhoneStorage::SetNeedToEnableKeylock( TBool aNeedToEnableKeylock )
    82 EXPORT_C void CPhoneStorage::SetNeedToEnableKeylock( TBool aNeedToEnableKeylock )