Symbian3/PDK/Source/GUID-64E8B920-CD45-4AFF-BD5B-8A7F70F0D59E.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<?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 id="GUID-64E8B920-CD45-4AFF-BD5B-8A7F70F0D59E" xml:lang="en"><title>Responding
to Requests and Cancelling Requests</title><shortdesc>As shown in the previous Privacy Controller API code examples,
a Privacy Controller has a pointer to a <apiname>CLbsPrivacyController</apiname> class.
The Privacy Controller uses this pointer to respond to privacy requests and
to cancel them. The simple outline code in this section shows how a Privacy
Controller calls these functions. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section>       <title>Responding to a request</title>       <p>The code below
shows how the observer class can respond to privacy requests by calling <xref href="GUID-DA9AD188-944E-36C0-98A6-4F9B6FB2A091.dita#GUID-DA9AD188-944E-36C0-98A6-4F9B6FB2A091/GUID-D3C37C92-5609-31F1-82AB-01AEC99671BB"><apiname>CLbsPrivacyController::RespondNetworkLocationRequest()</apiname></xref>. </p><codeblock xml:space="preserve">// Send a privacy response to the LBS subsystem
void CMyLbsPrivacyControllerObserver::SendResponse(TUint aRequestId,
                                                   CLbsPrivacyController::TRequestVerificationResult aResult)
	{
	// aRequestId is the ID of a privacy request that was previously received
	iController-&gt;RespondNetworkLocationRequest(aRequestId, aResult);
	}</codeblock>     </section>
<section><title>Cancelling a privacy verification request </title><p>The code
below shows how the observer class can cancel privacy verification requests
by calling <xref href="GUID-DA9AD188-944E-36C0-98A6-4F9B6FB2A091.dita#GUID-DA9AD188-944E-36C0-98A6-4F9B6FB2A091/GUID-C2FC9C84-DB18-3741-BD2F-AC214D679A13"><apiname>CLbsPrivacyController::CancelNetworkLocationRequest()</apiname></xref>.</p><p>There
is no guarantee that a privacy request will be cancelled by calling <xref href="GUID-DA9AD188-944E-36C0-98A6-4F9B6FB2A091.dita#GUID-DA9AD188-944E-36C0-98A6-4F9B6FB2A091/GUID-C2FC9C84-DB18-3741-BD2F-AC214D679A13"><apiname>CLbsPrivacyController::CancelNetworkLocationRequest()</apiname></xref>.
If a privacy request was first accepted and then later cancelled by a Privacy
Controller, the network may accept the request before the cancel message is
processed. The sequence diagrams in LBS <xref href="GUID-D857413A-D5A1-5F9F-A780-C980A9E0BEE0.dita">Privacy
Controller</xref>r describe this situation in more detail.</p><codeblock xml:space="preserve">// Cancel a privacy response
void CMyLbsPrivacyControllerObserver::CancelRequest(TUint aRequestId)
	{
	// aRequestId is the ID of a privacy request that was previously received
	iController-&gt;CancelNetworkLocationRequest(aRequestId);
	}</codeblock></section>
</conbody></concept>