Public Types | Signals | Public Member Functions | Protected Member Functions | Properties

MeeGo::QmDeviceMode Class Reference

QmDeviceMode Provides information and actions on device operation mode and power save mode. More...

#include <qmdevicemode.h>

List of all members.

Public Types

enum  DeviceMode { Error = -1, Normal = 0, Flight }
 

Possible device operation modes.

More...
enum  PSMState { PSMError = -1, PSMStateOff = 0, PSMStateOn }
 

Possible power save modes for the device.

More...

Signals

void deviceModeChanged (MeeGo::QmDeviceMode::DeviceMode mode)
 Sent when device operation mode has changed.
void devicePSMStateChanged (MeeGo::QmDeviceMode::PSMState state)
 Sent when device power save mode has changed.

Public Member Functions

 QmDeviceMode (QObject *parent=0)
 Constructor.
 ~QmDeviceMode ()
DeviceMode getMode () const
 Gets the current operation mode.
PSMState getPSMState () const
 Gets the current power save mode.
bool setMode (DeviceMode mode)
 Sets the device operation mode.
bool setPSMState (PSMState state)
 Sets the device power save state.
bool setPSMBatteryMode (int percentages)
 Sets the device battery-level based power save mode.
int getPSMBatteryMode ()
 Gets the device battery-level based power save mode.

Protected Member Functions

void connectNotify (const char *signal)
void disconnectNotify (const char *signal)

Properties

DeviceMode mode
PSMState state

Detailed Description

QmDeviceMode Provides information and actions on device operation mode and power save mode.

Scope:
Nokia Meego

Definition at line 50 of file qmdevicemode.h.


Member Enumeration Documentation

Possible device operation modes.

Enumerator:
Error 

Operation mode could not be figured out.

Normal 

Normal mode.

Flight 

Flight mode.

Definition at line 60 of file qmdevicemode.h.

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.

Definition at line 68 of file qmdevicemode.h.


Constructor & Destructor Documentation

MeeGo::QmDeviceMode::QmDeviceMode ( QObject *  parent = 0  ) 

Constructor.

Parameters:
parent The parent object
MeeGo::QmDeviceMode::~QmDeviceMode (  ) 

Member Function Documentation

void MeeGo::QmDeviceMode::connectNotify ( const char *  signal  )  [protected]
void MeeGo::QmDeviceMode::deviceModeChanged ( MeeGo::QmDeviceMode::DeviceMode  mode  )  [signal]

Sent when device operation mode has changed.

Parameters:
mode Current operation mode
void MeeGo::QmDeviceMode::devicePSMStateChanged ( MeeGo::QmDeviceMode::PSMState  state  )  [signal]

Sent when device power save mode has changed.

Parameters:
state Current power save mode
void MeeGo::QmDeviceMode::disconnectNotify ( const char *  signal  )  [protected]
DeviceMode MeeGo::QmDeviceMode::getMode (  )  const

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]

Definition at line 55 of file qmdevicemode.h.

PSMState MeeGo::QmDeviceMode::state [read, write]

Definition at line 56 of file qmdevicemode.h.


The documentation for this class was generated from the following file: