Symbian3/PDK/Source/GUID-8FC2BA94-2374-5BFE-B4CF-624A6B0056BC.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     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 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 &lt;e32base.h&gt;
       
    13 #include &lt;Etel3rdParty.h&gt;
       
    14 
       
    15 class CClientApp : public CActive
       
    16     { 
       
    17 
       
    18 private:
       
    19     CTelephony* iTelephony;
       
    20     CTelephony::TCallWaitingSupplServicesV1 iCallWaitingSupplServicesV1;
       
    21     CTelephony::TCallWaitingSupplServicesV1Pckg iCallWaitingSupplServicesV1Pckg;
       
    22 
       
    23 public:
       
    24     CClientApp(CTelephony* aTelephony);
       
    25     void SomeFunction();
       
    26 
       
    27 private:
       
    28     /*
       
    29        These are the pure virtual methods from CActive that  
       
    30        MUST be implemented by all active objects
       
    31        */
       
    32     void RunL();
       
    33     void DoCancel();
       
    34    };
       
    35 
       
    36 CClientApp::CClientApp(CTelephony* aTelephony)
       
    37     : CActive(EPriorityStandard),
       
    38       iTelephony(aTelephony),
       
    39       iCallWaitingSupplServicesV1Pckg(iCallWaitingSupplServicesV1)
       
    40     {
       
    41     //default constructor
       
    42     }
       
    43 
       
    44 void CClientApp::SomeFunction()
       
    45     {
       
    46     iTelephony-&gt;GetCallWaitingStatus(iStatus, iCallWaitingSupplServicesV1Pckg);
       
    47     SetActive();
       
    48     }
       
    49 
       
    50 void CClientApp::RunL()
       
    51     {
       
    52     if(iStatus==KErrNone)
       
    53        {
       
    54        CTelephony::TSupplServiceStatus callWaitingStatus = iCallWaitingSupplServicesV1.iCallWaiting;
       
    55        }
       
    56     }
       
    57 
       
    58 void CClientApp::DoCancel()
       
    59     {
       
    60     iTelephony-&gt;CancelAsync(CTelephony::EGetCallWaitingStatusCancel);
       
    61     }</codeblock> </example> </taskbody></task>