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

MeeGo::QmSystemState Class Reference

QmSystemState provides information and actions on device state. More...

#include <qmsystemstate.h>

List of all members.

Public Types

enum  NextState { Powerup = 0, Reboot, ShuttingDown }
 

States the user can set.

More...
enum  StateIndication {
  Shutdown = 0, ThermalStateFatal, BatteryStateEmpty, SaveData,
  RebootDeniedUSB, ShutdownDeniedUSB
}
 

State indication.

More...
enum  RunState {
  RunState_User = 0, RunState_ActDead, RunState_Test, RunState_Local,
  RunState_Malf, RunState_Flash, RunState_Shutdown, RunState_Unknown
}
enum  BootReason {
  BootReason_Unknown = -1, BootReason_SwdgTimeout = 0, BootReason_SecViolation, BootReason_Wdg32kTimeout,
  BootReason_PowerOnReset, BootReason_PowerKey, BootReason_MBus, BootReason_Charger,
  BootReason_Usb, BootReason_SWReset, BootReason_RTCAlarm, BootReason_NSU
}

Signals

void systemStateChanged (MeeGo::QmSystemState::StateIndication what)
 Sent when device state indication has been received.

Public Member Functions

 QmSystemState (QObject *parent=0)
 Constructor.
 ~QmSystemState ()
bool set (NextState nextState)
 Requests to system to move into state nextState.
RunState getRunState ()
 Gets the current run state.
BootReason getBootReason ()
 Gets the current boot reason.
unsigned int getPowerOnTimeInSeconds ()
 Gets the accumulated value of the power on counter in seconds, which represents the total time the device has been powered on.

Protected Member Functions

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

Detailed Description

QmSystemState provides information and actions on device state.

Scope:
Nokia Meego

Definition at line 53 of file qmsystemstate.h.


Member Enumeration Documentation

Enumerator:
BootReason_Unknown 
BootReason_SwdgTimeout 

Security watchdog timeout.

BootReason_SecViolation 

Security violation.

BootReason_Wdg32kTimeout 

32k watchdog timeout

BootReason_PowerOnReset 

Power on reset issued by the HW.

BootReason_PowerKey 

Power key pressed.

BootReason_MBus 

MBus.

BootReason_Charger 

Charger plugged in.

BootReason_Usb 

Usb charger plugged in.

BootReason_SWReset 

SW reset issued by the system.

BootReason_RTCAlarm 

Real Time Clock Alarm.

BootReason_NSU 

Software update.

Definition at line 93 of file qmsystemstate.h.

States the user can set.

Enumerator:
Powerup 

Powerup from acting dead.

Reboot 

Reboot.

ShuttingDown 

Shutdown.

Definition at line 63 of file qmsystemstate.h.

Enumerator:
RunState_User 
RunState_ActDead 
RunState_Test 

Similar to Local, but CMT tests are run differently.

RunState_Local 

Used when the device is mounted to a jig for R&D purposes.

RunState_Malf 
RunState_Flash 
RunState_Shutdown 
RunState_Unknown 

Definition at line 81 of file qmsystemstate.h.

State indication.

Enumerator:
Shutdown 

Normal shutdown.

ThermalStateFatal 

Shutdown due to thermal state.

BatteryStateEmpty 

Shutdown due battery empty within few seconds.

SaveData 

Save data.

RebootDeniedUSB 

Reboot denied because USB is connected in mass storage mode.

ShutdownDeniedUSB 

Shutdown denied because USB is connected in mass storage mode.

Definition at line 71 of file qmsystemstate.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
parent The possible parent object
MeeGo::QmSystemState::~QmSystemState (  ) 

Member Function Documentation

void MeeGo::QmSystemState::connectNotify ( const char *  signal  )  [protected]
void MeeGo::QmSystemState::disconnectNotify ( const char *  signal  )  [protected]
BootReason MeeGo::QmSystemState::getBootReason (  ) 

Gets the current boot reason.

Returns:
The current boot reason
unsigned int MeeGo::QmSystemState::getPowerOnTimeInSeconds (  ) 

Gets the accumulated value of the power on counter in seconds, which represents the total time the device has been powered on.

Returns:
The total time in seconds the device has been powered on
RunState MeeGo::QmSystemState::getRunState (  ) 

Gets the current run state.

Returns:
The current run state
bool MeeGo::QmSystemState::set ( NextState  nextState  ) 

Requests to system to move into state nextState.

Credential:
dsme::DeviceStateControl Resource token required to set the device state (shutdown/reboot/powerup).
Parameters:
nextState New state
Returns:
True on success, false otherwise
void MeeGo::QmSystemState::systemStateChanged ( MeeGo::QmSystemState::StateIndication  what  )  [signal]

Sent when device state indication has been received.

Parameters:
what Received state indication type

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