9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-64E8B920-CD45-4AFF-BD5B-8A7F70F0D59E" xml:lang="en"><title>Responding |
12 <concept id="GUID-64E8B920-CD45-4AFF-BD5B-8A7F70F0D59E" xml:lang="en"><title>Responding |
13 to Requests and Cancelling Requests</title><shortdesc>As shown in the previous Privacy Controller API code examples, |
13 to Requests and Cancelling Requests</title><shortdesc>As shown in the previous Privacy Controller API code examples, |
14 a Privacy Controller has a pointer to a <apiname>CLbsPrivacyController</apiname> class. |
14 a Privacy Controller has a pointer to a <codeph>CLbsPrivacyController</codeph> class. |
15 The Privacy Controller uses this pointer to respond to privacy requests and |
15 The Privacy Controller uses this pointer to respond to privacy requests and |
16 to cancel them. The simple outline code in this section shows how a Privacy |
16 to cancel them. The simple outline code in this section shows how a Privacy |
17 Controller calls these functions. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
17 Controller calls these functions. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
18 <section> <title>Responding to a request</title> <p>The code below |
18 <section id="GUID-0254EF2E-6719-421C-8877-47D5A69D0D52"> <title>Responding to a request</title> <p>The code below |
19 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 |
19 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 |
20 void CMyLbsPrivacyControllerObserver::SendResponse(TUint aRequestId, |
20 void CMyLbsPrivacyControllerObserver::SendResponse(TUint aRequestId, |
21 CLbsPrivacyController::TRequestVerificationResult aResult) |
21 CLbsPrivacyController::TRequestVerificationResult aResult) |
22 { |
22 { |
23 // aRequestId is the ID of a privacy request that was previously received |
23 // aRequestId is the ID of a privacy request that was previously received |
24 iController->RespondNetworkLocationRequest(aRequestId, aResult); |
24 iController->RespondNetworkLocationRequest(aRequestId, aResult); |
25 }</codeblock> </section> |
25 }</codeblock> </section> |
26 <section><title>Cancelling a privacy verification request </title><p>The code |
26 <section id="GUID-B78E8723-7FD3-4ECD-842E-ACA59B40C69E"><title>Cancelling a privacy verification request </title><p>The code |
27 below shows how the observer class can cancel privacy verification requests |
27 below shows how the observer class can cancel privacy verification requests |
28 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 |
28 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 |
29 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>. |
29 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>. |
30 If a privacy request was first accepted and then later cancelled by a Privacy |
30 If a privacy request was first accepted and then later cancelled by a Privacy |
31 Controller, the network may accept the request before the cancel message is |
31 Controller, the network may accept the request before the cancel message is |