|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-6DA81F01-FBD7-4167-B722-832888DEC0AD" xml:lang="en"><title>Reserving |
|
13 light targets</title><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
14 <context> <p>The <codeph>ReserveLightL()</codeph> call reserves the |
|
15 light target(s) exclusively for this client. Multiple lights can be specified |
|
16 by using bitwise-or.</p><p>A higher priority client can cause lower priority |
|
17 client reservation to be temporarily suspended. Commands can still be issued |
|
18 in suspended state, but they are not acted upon unless suspension is lifted |
|
19 within a specified duration. The suspended client does not receive any notification |
|
20 about the suspension. If the light target is already reserved by a higher |
|
21 or an equal priority application, reserving still succeeds but gets suspended |
|
22 immediately. In such case, only the virtual state of the lights is remembered |
|
23 by the session; actual lights are not controlled. When suspended reservation |
|
24 is activated, the actual lights state is restored to the same as the virtual |
|
25 state.</p><p>The following code snippet demonstrates how to reserve multiple |
|
26 light targets:</p><codeblock xml:space="preserve">//aRestoreState = ETrue means that any previously frozen state will be restored. |
|
27 // aForceNoCCoeEnv = EFalse means that the CCoeEnv background/foreground status |
|
28 // is always used to control further reservations. |
|
29 iLight->ReserveLightL( ( CHWRMLight::EPrimaryDisplay | CHWRMLight::EPrimaryKeyboard ), ETrue, EFalse );</codeblock><p>Calling |
|
30 the <codeph>ReserveLightL()</codeph> method without second and third parameters |
|
31 is equal to calling <codeph>ReserveLightL( aTarget, EFalse, EFalse )</codeph>, |
|
32 that is, any previously frozen state is not restored and the <codeph>CCoeEnv</codeph> background/foreground |
|
33 status is always used to control further reservations.</p><p><b>Note</b>: |
|
34 Light can be controlled without a reservation, if there is no other client |
|
35 with a reservation.</p></context> |
|
36 </taskbody></task> |