Home · All Classes · Grouped Classes · Annotated · Functions

Hardware Configuration

Introduction

When planning to customize and install Qtopia on a specific device there are a number of factors that must be taken into consideration:

All the changes required to add these device specific customizations are centralized in Qtopia and involve a small number of files (described below). This document should make it easy for OEMs and system integrators to understand how to make Qtopia aware of any special hardware that a device might have.

Device-specific Code

Device-specific code is implemented in custom.h/custom.cpp.

Since these files are tied to a device it is useful to have them in the device profile. If these files are not present configure will look in the traditional location, <source>/src/libraries/qtopia/custom-<xplatform>.(h|cpp). See <custom.h> for more information about these files.

Device profiles can implement their own custom.(h|cpp) files, which will override the <source>/src/libraries/qtopia/custom-<xplatform>.(h|cpp) and custom.(h|cpp) files in Qtopia.

For reference implementations of these files, the existing files found in <source>/devices/greenphone/custom.* may be of assistance.

Removable Media and Devices

Qtopia supports both removable media, such as SD cards, and removable hotplug devices, such as PCMCIA network cards. However, as there is no standard way in Linux for Qtopia to detect when these devices or media are inserted or removed, it is the system integrators responsibility to detect whenever the attached PCMCIA devices or mounted filesystems change notify Qtopia appropriately.

Integrators notify Qtopia by sending QCop messages. QCop messages may be sent from C++ code using the QtopiaIpcEnvelope class, or from system shell scripts using the qcop command line tool.

The following table describes the events and the QCop messages that should be sent:

EventMessage
Removable media added or removedA mtabChanged() message must be sent to the QPE/Card channel after the media has been mounted or unmounted.

To do this from the command line or a script, the following QCop command would suffice:

    qcop send QPE/Card "mtabChanged()"
Removable PCMCIA device added or removedA stabChanged() message must be sent to the QPE/Card channel. The StabMonitor server task provides a default implementation by monitoring certain files on the file system.

To do this from the command line or a script, the following QCop command would suffice:

    qcop send QPE/Card "stabChanged()"


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3