Week 23 contribution of PDK 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 task
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-6DA81F01-FBD7-4167-B722-832888DEC0AD" xml:lang="en"><title>Reserving
light targets</title><prolog><metadata><keywords/></metadata></prolog><taskbody>
<context> <p>The <codeph>ReserveLightL()</codeph> call reserves the
light target(s) exclusively for this client. Multiple lights can be specified
by using bitwise-or.</p><p>A higher priority client can cause lower priority
client reservation to be temporarily suspended. Commands can still be issued
in suspended state, but they are not acted upon unless suspension is lifted
within a specified duration. The suspended client does not receive any notification
about the suspension. If the light target is already reserved by a higher
or an equal priority application, reserving still succeeds but gets suspended
immediately. In such case, only the virtual state of the lights is remembered
by the session; actual lights are not controlled. When suspended reservation
is activated, the actual lights state is restored to the same as the virtual
state.</p><p>The following code snippet demonstrates how to reserve multiple
light targets:</p><codeblock xml:space="preserve">//aRestoreState = ETrue means that any previously frozen state will be restored.
// aForceNoCCoeEnv = EFalse means that the CCoeEnv background/foreground status
// is always used to control further reservations.
iLight->ReserveLightL( ( CHWRMLight::EPrimaryDisplay | CHWRMLight::EPrimaryKeyboard ), ETrue, EFalse );</codeblock><p>Calling
the <codeph>ReserveLightL()</codeph> method without second and third parameters
is equal to calling <codeph>ReserveLightL( aTarget, EFalse, EFalse )</codeph>,
that is, any previously frozen state is not restored and the <codeph>CCoeEnv</codeph> background/foreground
status is always used to control further reservations.</p><p><b>Note</b>:
Light can be controlled without a reservation, if there is no other client
with a reservation.</p></context>
</taskbody></task>