21 #include "HtiLightsController.h" |
21 #include "HtiLightsController.h" |
22 #include "HtiPropertySubscriber.h" |
22 #include "HtiPropertySubscriber.h" |
23 #include <HtiDispatcherInterface.h> |
23 #include <HtiDispatcherInterface.h> |
24 #include <HtiLogging.h> |
24 #include <HtiLogging.h> |
25 |
25 |
|
26 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
26 #include <aknkeylock.h> |
27 #include <aknkeylock.h> |
|
28 #include <ScreensaverInternalPSKeys.h> |
|
29 #endif |
|
30 |
27 #include <AknSkinsInternalCRKeys.h> |
31 #include <AknSkinsInternalCRKeys.h> |
28 #include <AknsSkinUID.h> |
32 #include <AknsSkinUID.h> |
29 #include <AknsSrvClient.h> |
33 #include <AknsSrvClient.h> |
30 #include <bautils.h> |
34 #include <bautils.h> |
31 #include <btengsettings.h> |
35 #include <btengsettings.h> |
78 _LIT8( KErrDescrSetSizeTempFile, "Error allocating size for temp file" ); |
81 _LIT8( KErrDescrSetSizeTempFile, "Error allocating size for temp file" ); |
79 _LIT8( KErrDescrDeleteTempFile, "Error deleting temp file" ); |
82 _LIT8( KErrDescrDeleteTempFile, "Error deleting temp file" ); |
80 _LIT8( KErrDescrSysUtil, "SysUtil failed" ); |
83 _LIT8( KErrDescrSysUtil, "SysUtil failed" ); |
81 _LIT8( KErrDescrSetTime, "Setting time failed" ); |
84 _LIT8( KErrDescrSetTime, "Setting time failed" ); |
82 _LIT8( KErrDescrDateTimeFormat, "Setting date and time formats failed" ); |
85 _LIT8( KErrDescrDateTimeFormat, "Setting date and time formats failed" ); |
83 _LIT8( KErrDescrScreenSaver, "Setting screen saver state failed" ); |
|
84 _LIT8( KErrDescrGetNetworkModes, "Getting network modes failed" ); |
86 _LIT8( KErrDescrGetNetworkModes, "Getting network modes failed" ); |
85 _LIT8( KErrDescrSetNetworkMode, "Setting network mode failed" ); |
87 _LIT8( KErrDescrSetNetworkMode, "Setting network mode failed" ); |
86 _LIT8( KErrDescrIrActivation, "IR activation failed" ); |
88 _LIT8( KErrDescrIrActivation, "IR activation failed" ); |
87 _LIT8( KErrDescrGetBtPower, "Getting BT power state failed" ); |
89 _LIT8( KErrDescrGetBtPower, "Getting BT power state failed" ); |
88 _LIT8( KErrDescrSetBtPower, "Setting BT power state failed" ); |
90 _LIT8( KErrDescrSetBtPower, "Setting BT power state failed" ); |
89 _LIT8( KErrDescrBtOnDenied, "Turning BT on not allowed (Offline mode)" ); |
91 _LIT8( KErrDescrBtOnDenied, "Turning BT on not allowed (Offline mode)" ); |
90 _LIT8( KErrDescrBtOffDenied, "Turning BT off not allowed (active connections)" ); |
92 _LIT8( KErrDescrBtOffDenied, "Turning BT off not allowed (active connections)" ); |
91 _LIT8( KErrDescrBtSettings, "Bluetooth settings failed" ); |
93 _LIT8( KErrDescrBtSettings, "Bluetooth settings failed" ); |
92 _LIT8( KErrDescrBtDeletePairings, "Deleting Bluetooth pairing(s) failed" ); |
94 _LIT8( KErrDescrBtDeletePairings, "Deleting Bluetooth pairing(s) failed" ); |
|
95 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
93 _LIT8( KErrDescrKeyLock, "Key lock toggle failed" ); |
96 _LIT8( KErrDescrKeyLock, "Key lock toggle failed" ); |
|
97 _LIT8( KErrDescrScreenSaver, "Setting screen saver state failed" ); |
|
98 _LIT8( KErrDescrInvalidSSTimeout, "Invalid screen saver timeout value" ); |
|
99 _LIT8( KErrDescrSSTimeoutFailed, "Setting screen saver timeout failed" ); |
|
100 #endif |
94 _LIT8( KErrDescrInvalidTime, "Auto key guard time value too large (max 3600)" ); |
101 _LIT8( KErrDescrInvalidTime, "Auto key guard time value too large (max 3600)" ); |
95 _LIT8( KErrDescrAutoKeyGuardFailed, "Setting auto key guard time failed" ); |
102 _LIT8( KErrDescrAutoKeyGuardFailed, "Setting auto key guard time failed" ); |
96 _LIT8( KErrDescrInvalidSSTimeout, "Invalid screen saver timeout value" ); |
|
97 _LIT8( KErrDescrSSTimeoutFailed, "Setting screen saver timeout failed" ); |
|
98 _LIT8( KErrDescrDrmDbConnect, "DRM DB connect failed." ); |
103 _LIT8( KErrDescrDrmDbConnect, "DRM DB connect failed." ); |
99 _LIT8( KErrDescrDrmDbDelete, "DRM DB delete failed." ); |
104 _LIT8( KErrDescrDrmDbDelete, "DRM DB delete failed." ); |
100 _LIT8( KErrDescrBatteryLevel, "Getting battery level failed." ); |
105 _LIT8( KErrDescrBatteryLevel, "Getting battery level failed." ); |
101 _LIT8( KErrDescrChargingStatus, "Getting charging status failed." ); |
106 _LIT8( KErrDescrChargingStatus, "Getting charging status failed." ); |
102 _LIT8( KErrDescrSignalStrength, "Getting signal strength failed." ); |
107 _LIT8( KErrDescrSignalStrength, "Getting signal strength failed." ); |
174 |
179 |
175 //------------------------------------------------------------------------------ |
180 //------------------------------------------------------------------------------ |
176 // Constructor |
181 // Constructor |
177 //------------------------------------------------------------------------------ |
182 //------------------------------------------------------------------------------ |
178 CHtiSysInfoServicePlugin::CHtiSysInfoServicePlugin(): |
183 CHtiSysInfoServicePlugin::CHtiSysInfoServicePlugin(): |
179 iMemEater( NULL ), iReply( NULL ), iAllowSSValue( -1 ), |
184 iMemEater( NULL ), iReply( NULL ), iGalleryUpdateSupported( ETrue ) |
180 iAllowSSPropertyAttached( EFalse ), iGalleryUpdateSupported( ETrue ) |
185 { |
181 { |
186 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
|
187 iAllowSSValue = -1; |
|
188 iAllowSSPropertyAttached = EFalse; |
|
189 #endif |
182 } |
190 } |
183 |
191 |
184 //------------------------------------------------------------------------------ |
192 //------------------------------------------------------------------------------ |
185 // Destructor |
193 // Destructor |
186 //------------------------------------------------------------------------------ |
194 //------------------------------------------------------------------------------ |
1520 iAllowSSSubscriber = NULL; |
1534 iAllowSSSubscriber = NULL; |
1521 } |
1535 } |
1522 |
1536 |
1523 iReply = HBufC8::NewL( 1 ); |
1537 iReply = HBufC8::NewL( 1 ); |
1524 iReply->Des().Append( 0 ); |
1538 iReply->Des().Append( 0 ); |
|
1539 #else |
|
1540 iDispatcher->DispatchOutgoingErrorMessage(KErrArgument, |
|
1541 KErrDescrNotSupported, KSysInfoServiceUid); |
|
1542 #endif |
|
1543 HTI_LOG_FUNC_OUT( |
|
1544 "CHtiSysInfoServicePlugin::HandleScreenSaverCommandL" ); |
1525 } |
1545 } |
1526 |
1546 |
1527 //------------------------------------------------------------------------------ |
1547 //------------------------------------------------------------------------------ |
1528 // CHtiSysInfoServicePlugin::HandleScreenSaverTimeoutCommandL |
1548 // CHtiSysInfoServicePlugin::HandleScreenSaverTimeoutCommandL |
1529 //------------------------------------------------------------------------------ |
1549 //------------------------------------------------------------------------------ |
1530 void CHtiSysInfoServicePlugin::HandleScreenSaverTimeoutCommandL( |
1550 void CHtiSysInfoServicePlugin::HandleScreenSaverTimeoutCommandL( |
1531 const TDesC8& aMessage ) |
1551 const TDesC8& aMessage ) |
1532 { |
1552 { |
1533 HTI_LOG_FUNC_IN( |
1553 HTI_LOG_FUNC_IN( |
1534 "CHtiSysInfoServicePlugin::HandleScreenSaverTimeoutCommandL" ); |
1554 "CHtiSysInfoServicePlugin::HandleScreenSaverTimeoutCommandL" ); |
|
1555 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
1535 if ( aMessage.Length() != 2 ) |
1556 if ( aMessage.Length() != 2 ) |
1536 { |
1557 { |
1537 iDispatcher->DispatchOutgoingErrorMessage( |
1558 iDispatcher->DispatchOutgoingErrorMessage( |
1538 KErrArgument, |
1559 KErrArgument, |
1539 KErrDescrArgument, |
1560 KErrDescrArgument, |
2143 // CHtiSysInfoServicePlugin::HandleKeyLockToggleL |
2168 // CHtiSysInfoServicePlugin::HandleKeyLockToggleL |
2144 //------------------------------------------------------------------------------ |
2169 //------------------------------------------------------------------------------ |
2145 void CHtiSysInfoServicePlugin::HandleKeyLockToggleL( const TDesC8& aMessage ) |
2170 void CHtiSysInfoServicePlugin::HandleKeyLockToggleL( const TDesC8& aMessage ) |
2146 { |
2171 { |
2147 HTI_LOG_FUNC_IN( "CHtiSysInfoServicePlugin::HandleKeyLockToggleL" ); |
2172 HTI_LOG_FUNC_IN( "CHtiSysInfoServicePlugin::HandleKeyLockToggleL" ); |
2148 |
2173 #if ( SYMBIAN_VERSION_SUPPORT < SYMBIAN_4 ) |
2149 if ( aMessage.Length() != 3 ) |
2174 if ( aMessage.Length() != 3 ) |
2150 { |
2175 { |
2151 iDispatcher->DispatchOutgoingErrorMessage( KErrArgument, |
2176 iDispatcher->DispatchOutgoingErrorMessage( KErrArgument, |
2152 KErrDescrArgument, KSysInfoServiceUid ); |
2177 KErrDescrArgument, KSysInfoServiceUid ); |
2153 return; |
2178 return; |