Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"
<?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 xml:lang="en" id="GUID-75266CB5-B29D-52B5-9881-011B53D6BDB2"><title>Voice Privacy Settings Tutorial</title><shortdesc>This tutorial describes how to get and set the voice privacy settings. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> <context><p>The <xref href="GUID-EF3C3C9F-232D-3259-8FAE-60C8A806F57E.dita"><apiname>RMobilePhone</apiname></xref> API provides methods to access the device default setting for the CDMA-specific Voice Privacy service. Depending on the setting of the Voice Privacy, the phone requests privacy to be on or off for all outgoing and incoming calls. </p> </context> <steps id="GUID-19309951-E589-51DC-9684-420C482E5EAF"> <step id="GUID-CECF3D4B-7334-5AD0-BF95-1ECE54E8F486"><cmd>Get the current setting using <xref href="GUID-EF3C3C9F-232D-3259-8FAE-60C8A806F57E.dita"><apiname>RMobilePhone::GetDefaultPrivacy()</apiname></xref>. </cmd> <info>Possible settings are described in the <xref href="GUID-EF3C3C9F-232D-3259-8FAE-60C8A806F57E.dita"><apiname>RMobilePhone::TMobilePhonePrivacy</apiname></xref> enumeration. </info> </step> <step id="GUID-A75872A9-5D6A-5294-89A9-21DE6A7AEC5C"><cmd>Set the Voice Privacy setting using <xref href="GUID-EF3C3C9F-232D-3259-8FAE-60C8A806F57E.dita"><apiname>RMobilePhone::SetDefaultPrivacy()</apiname></xref>. </cmd> </step> <step id="GUID-D5F1AFD4-FB48-5820-8648-BA5A57F94F87"><cmd>Use <xref href="GUID-EF3C3C9F-232D-3259-8FAE-60C8A806F57E.dita"><apiname>RMobilePhone::NotifyDefaultPrivacyChange()</apiname></xref> to get the notificationof any changes to the voice privacy settings. </cmd> </step> </steps> <example><title>Voice privacy settings example</title> <p>The following code gets the current Voice Privacy setting, and checks if it is off. </p> <p>The code assumes <codeph>iMobilePhone</codeph> is an <xref href="GUID-EF3C3C9F-232D-3259-8FAE-60C8A806F57E.dita"><apiname>RMobilePhone</apiname></xref> object. </p> <codeblock id="GUID-131A79C6-4560-5277-A51D-41F63B1112D6" xml:space="preserve">RMobilePhone::TMobilePhonePrivacy mobilePhonePrivacy;
User::LeaveIfError(iMobilePhone.GetDefaultPrivacy(mobilePhonePrivacy));
if (mobilePhonePrivacy == RMobilePhone::EPrivacyOff)
{
//do something
}
</codeblock> </example> </taskbody></task>