Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QBootSourceAccessory class provides an interface for querying the event which triggered the last boot sequence. More...
#include <QBootSourceAccessory>
Inherits QHardwareInterface.
Inherited by QBootSourceAccessoryProvider.
The QBootSourceAccessory class provides an interface for querying the event which triggered the last boot sequence.
QBootSourceAccessory can be used to query the event which triggered the last boot using bootSource(). For example the following code checks if the device was booted by plugging in the charger:
QBootSourceAccessory bsa; if (bsa.bootSource() == QBootSourceAccessory::Charger) { ... }
Boot source implementations should inherit from QBootSourceAccessoryProvider.
See also QBootSourceAccessoryProvider and QHardwareInterface.
Defines the events which can trigger a boot sequence
Constant | Value | Description |
---|---|---|
QBootSourceAccessory::Unknown | 0 | Boot was triggered by an unknown event |
QBootSourceAccessory::PowerKey | 1 | Boot was triggered by pressing the power-on key |
QBootSourceAccessory::Charger | 2 | Boot was triggered by plugging in the battery charger |
QBootSourceAccessory::Alarm | 3 | Boot was triggered by an RTC alarm |
QBootSourceAccessory::Watchdog | 4 | Boot was triggered by the expiration of the watchdog timer |
QBootSourceAccessory::Software | 5 | Boot was triggered by software, e.g. via a software reboot. |
Construct a new boot source accessory object for the given provider id and attaches it to parent. The object will be created in client mode if mode is Client, or server mode otherwise.
If id is empty, this class will use the default boot source provider that supports the boot source interface. If there is more than one service that supports the boot source interface, the caller should enumerate them with QHardwareManager::providers() and create separate QBootSourceAccessory objects for each.
See also QHardwareManager::providers().
Destroys the boot source hardware abstraction.
Returns the event which triggered the last boot sequence.
This signal is emitted when bootSource() changes.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |