QmDeviceMode Provides information and actions on device operation mode and power save mode. More...
List of all members.
Detailed Description
QmDeviceMode Provides information and actions on device operation mode and power save mode.
- Scope:
- Nokia Meego
Member Enumeration Documentation
Possible device operation modes.
- Enumerator:
-
Error |
Operation mode could not be figured out.
|
Normal |
Normal mode.
|
Flight |
Flight mode.
|
Possible power save modes for the device.
- Enumerator:
-
PSMError |
Power save mode could not be figured out.
|
PSMStateOff |
Power save mode is off.
|
PSMStateOn |
Power save mode is on.
|
Constructor & Destructor Documentation
MeeGo::QmDeviceMode::QmDeviceMode |
( |
QObject * |
parent = 0 |
) |
|
MeeGo::QmDeviceMode::~QmDeviceMode |
( |
|
) |
|
Member Function Documentation
void MeeGo::QmDeviceMode::connectNotify |
( |
const char * |
signal |
) |
[protected, virtual] |
Sent when device operation mode has changed.
- Parameters:
-
|
mode |
Current operation mode |
Sent when device power save mode has changed.
- Parameters:
-
|
state |
Current power save mode |
void MeeGo::QmDeviceMode::disconnectNotify |
( |
const char * |
signal |
) |
[protected, virtual] |
Gets the current operation mode.
- Returns:
- The current operation mode
int MeeGo::QmDeviceMode::getPSMBatteryMode |
( |
|
) |
|
Gets the device battery-level based power save mode.
- Returns:
- The battery charging level, -1 is error, 0 is 'never', 1-100 is the charging level (percentages)
PSMState MeeGo::QmDeviceMode::getPSMState |
( |
|
) |
const |
Gets the current power save mode.
- Returns:
- the Current power save mode
bool MeeGo::QmDeviceMode::setMode |
( |
DeviceMode |
mode |
) |
|
Sets the device operation mode.
- Credential:
- mce::DeviceModeControl Resource token required to set the device (normal/flight) mode.
- Parameters:
-
|
mode |
Operation mode to set |
- Returns:
- True if a valid mode was requested, false otherwise
bool MeeGo::QmDeviceMode::setPSMBatteryMode |
( |
int |
percentages |
) |
|
Sets the device battery-level based power save mode.
- Credential:
- mce::DeviceModeControl Resource token required to set the powersave automode.
- Parameters:
-
|
percentages |
The battery charging level (0-100) in percentages after powersave mode is automatically enabled. Value 0 means never. |
- Returns:
- True on success, false otherwise
bool MeeGo::QmDeviceMode::setPSMState |
( |
PSMState |
state |
) |
|
Sets the device power save state.
- Credential:
- mce::DeviceModeControl Resource token required to set the powersave state.
- Parameters:
-
|
state |
Power state mode to set |
- Returns:
- True on success, false otherwise
Property Documentation
DeviceMode MeeGo::QmDeviceMode::mode [read, write] |
PSMState MeeGo::QmDeviceMode::state [read, write] |
(C) 2009-2011 Nokia Corporation
LGPL Lesser General Public License |
MeeGo 1.2 Harmattan API
|