Light API

Light API is a library API that provides the ability to control various light targets of the device. It also provides methods to retrieve the current light status and the supported light targets of the device.

It uses synchronous method calls which block the client application until a response is received from the plug-in. The API consists of CHWRMLight and MHWRMLightObserver classes.

Figure 1. Light API Interfaces

The client creates an instance of CHWRMLight using NewL(). If the client requires status information, it must also provide a callback pointer of the MHWRMLightObserver implementing class for the NewL() method.

Usually HWRM Light interface supports restoring the previous or default light state (ON/OFF/BLINK). The already supported (reservation controller) functionality in existing HWRM light APIs is extended to restore the previous or default color of the LED as well.

HWRM also supports automatic reserve and release the targets depends on the client application foreground observer notification through an UI plugin. During these states the light state with color value would be stored and restored automatically. This means if the client application window comes on the foreground then the reserved target’s state will be restored.

Definitions

Term

Description

Light target

A separate entity that can be lighted in the device. For example, the primary display of the device is a light target.

Lights frozen state

Whenever lights are released, their current state is stored as frozen state. On next reserve, the user can specify that frozen state be restored.

Lights default state

Lights default state is determined by device inactivity time and relevant general settings.

Lights base state

It is the state of the light target set for infinite duration (after all the time-based operation is completed).

Related concepts
Light API Tutorial