Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
<?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-8FC2BA94-2374-5BFE-B4CF-624A6B0056BC"><title>Call Waiting Status Tutorial</title><shortdesc>This tutorial describes how to get the call waiting status information with the telephony API for applications. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> <steps id="GUID-E24D656A-701E-5B29-B189-06304C4C7DE5"> <step id="GUID-4CDC8306-6814-5E5F-835A-694D1849A746"><cmd/><info>create a new instance of <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony</apiname></xref> </info> </step> <step id="GUID-C37BEE6E-CB6F-50ED-81F1-4523E2312A6C"><cmd/><info>call<xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname> CTelephony::GetCallWaitingStatus()</apiname></xref> to get the call waiting information </info> </step> <step id="GUID-020F7560-2DC2-59E1-B685-579A33235C56"><cmd/><info>you can cancel the asynchronous request with a <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::EGetCallWaitingStatusCancel</apiname></xref> enumeration. </info> </step> </steps> <example id="GUID-F3885187-FB33-5490-87C5-184138F7E4B3"><title>Call waiting status example</title> <codeblock id="GUID-05F9F0DE-5D96-55F8-B1B9-A9CE858CF5B7" xml:space="preserve">#include <e32base.h>
#include <Etel3rdParty.h>
class CClientApp : public CActive
{
private:
CTelephony* iTelephony;
CTelephony::TCallWaitingSupplServicesV1 iCallWaitingSupplServicesV1;
CTelephony::TCallWaitingSupplServicesV1Pckg iCallWaitingSupplServicesV1Pckg;
public:
CClientApp(CTelephony* aTelephony);
void SomeFunction();
private:
/*
These are the pure virtual methods from CActive that
MUST be implemented by all active objects
*/
void RunL();
void DoCancel();
};
CClientApp::CClientApp(CTelephony* aTelephony)
: CActive(EPriorityStandard),
iTelephony(aTelephony),
iCallWaitingSupplServicesV1Pckg(iCallWaitingSupplServicesV1)
{
//default constructor
}
void CClientApp::SomeFunction()
{
iTelephony->GetCallWaitingStatus(iStatus, iCallWaitingSupplServicesV1Pckg);
SetActive();
}
void CClientApp::RunL()
{
if(iStatus==KErrNone)
{
CTelephony::TSupplServiceStatus callWaitingStatus = iCallWaitingSupplServicesV1.iCallWaiting;
}
}
void CClientApp::DoCancel()
{
iTelephony->CancelAsync(CTelephony::EGetCallWaitingStatusCancel);
}</codeblock> </example> </taskbody></task>