Home · All Classes · Grouped Classes · Annotated · Functions

Qtopia Accessory System

Introduction

A hardware interface is a particular hardware feature that needs to expose its state and functionality to other parts of Qtopia. Expamples for such interfaces are the battery, the kepad light or the vibration interface on a mobile phone. The accessory API is split into two sets of classes. The first set provides the backend for a hardware feature (also called provider). It usually monitors the state of the hardware and reports its change. Each hardware feature can only have one provider implementation. The second set of accessory classes represents the client API. Each provider instance can have multiple client instances through which other Qtopia components/applications can idiscover and control the hardware feature.

Some hardware features such as the keypad light may only exist once other features, such as the battery, may have several provider instances. In the case of the battery the device may e.g., have a default battery and a secondary battery. All batteries are exposed via the same hardware interface class (QBatteryAccessory) but Qtopia would manages two accessory provider, one for the primary battery and one for the secondary battery.

The QHardwareManager can be used to iterate over the various accessories supported by Qtopia.


Copyright © 2007 Trolltech Trademarks
Qtopia 4.2.5