Symbian3/SDK/Source/GUID-1969956D-CDA0-5DA0-ACF8-69AFBBEC1408.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-1969956D-CDA0-5DA0-ACF8-69AFBBEC1408"><title>Light API</title><shortdesc>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. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><p>It uses synchronous method calls which block the client application until a response is received from the plug-in. The API consists of <codeph>CHWRMLight</codeph> and <codeph>MHWRMLightObserver</codeph> classes. </p> <fig id="GUID-CA2D2394-FF93-54F9-880A-7AD56CFB1BDE"><title>
          Light API Interfaces 
        </title> <image href="GUID-3F0789DE-8455-5BA6-850C-45C60C581F18_d0e124947_href.png" placement="inline"/></fig> <p>The client creates an instance of <codeph>CHWRMLight</codeph> using <xref href="GUID-93132FF9-512F-30EC-8AB0-BD3E98F668E6.dita"><apiname>NewL()</apiname></xref>. If the client requires status information, it must also provide a callback pointer of the <xref href="GUID-54A448DF-6C1A-347F-9B11-734DAA813268.dita"><apiname>MHWRMLightObserver</apiname></xref> implementing class for the <xref href="GUID-93132FF9-512F-30EC-8AB0-BD3E98F668E6.dita"><apiname>NewL()</apiname></xref> method. </p> <p>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. </p> <p>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. </p> <section><title>Definitions</title> <table id="GUID-62DF1B4F-EC68-53EB-B620-0D1AC8EC8D35"><tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/><tbody><row><entry><p> <b>Term</b>  </p> </entry> <entry><p> <b>Description</b>  </p> </entry> </row> <row><entry><p>Light target </p> </entry> <entry><p>A separate entity that can be lighted in the device. For example, the primary display of the device is a light target. </p> </entry> </row> <row><entry><p>Lights frozen state </p> </entry> <entry><p>Whenever lights are released, their current state is stored as frozen state. On next reserve, the user can specify that frozen state be restored. </p> </entry> </row> <row><entry><p>Lights default state </p> </entry> <entry><p>Lights default state is determined by device inactivity time and relevant general settings. </p> </entry> </row> <row><entry><p>Lights base state </p> </entry> <entry><p>It is the state of the light target set for infinite duration (after all the time-based operation is completed). </p> </entry> </row> </tbody> </tgroup> </table> </section> </conbody><related-links><link href="GUID-D4E06508-4346-5294-995A-64B403467EC5.dita"><linktext>Light API Tutorial</linktext> </link> </related-links></concept>