Symbian3/SDK/Source/GUID-FFBD95C6-0B12-5FD7-BA69-89BBFB97F0A1.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-FFBD95C6-0B12-5FD7-BA69-89BBFB97F0A1.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,104 @@
+<?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 id="GUID-FFBD95C6-0B12-5FD7-BA69-89BBFB97F0A1" xml:lang="en"><title>Call
+Resume Tutorial </title><shortdesc>This tutorial describes how to resume a call with the telephony
+API for applications. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+
+
+<steps id="GUID-43E11818-C05F-53B4-8DCB-7246BAE47AC8">
+<step id="GUID-DF620D49-997B-5780-A7E7-EAD2CBEDBC40"><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-C5296605-2F1B-5084-B34B-F764F358AF27"><cmd/>
+<info>use <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::GetCallDynamicCaps()</apiname></xref> to
+check if the device supports resume function </info>
+</step>
+<step id="GUID-F93FC655-7405-5BD5-9CA3-A15D09D889B5"><cmd/>
+<info>once a call is on hold, you can resume the call by with <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::Resume()</apiname></xref>. </info>
+<info>Pass the ID of the call to resume. </info>
+</step>
+<step id="GUID-04EC72AA-318C-5BFE-A8AD-374929229D50"><cmd/>
+<info>pass the enumeration <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::EResumeCancel</apiname></xref> to
+cancel the asynchronous request </info>
+</step>
+
+
+
+
+
+</steps>
+<example id="GUID-BFF56F2B-E7D7-5CA4-9130-AE4FC768431A"><title>Call resume
+example</title> <codeblock id="GUID-71F14CC1-40DF-5A89-9A6F-D8D31F544FFF" xml:space="preserve">#include &lt;e32base.h&gt;
+#include &lt;Etel3rdParty.h&gt;
+
+class CClientApp : public CActive
+    { 
+
+private:
+    CTelephony* iTelephony;
+    CTelephony::TCallId iCallId;
+
+public:
+    CClientApp(CTelephony* aTelephony, CTelephony::TCallId aCallId);
+    TInt 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, CTelephony::TCallId aCallId)
+    : CActive(EPriorityStandard),
+      iTelephony(aTelephony),
+      iCallId(aCallId)
+    {
+    //default constructor
+    }
+
+TInt CClientApp::SomeFunction()
+    {
+    // Check that the phone supports Resuming calls.
+    CTelephony::TCallCapsV1 callCapsV1;
+    CTelephony::TCallCapsV1Pckg callCapsV1Pckg(callCapsV1);
+    iTelephony-&gt;GetCallDynamicCaps(iCallId, callCapsV1Pckg);
+
+    if( callCapsV1.iControlCaps &amp; CTelephony::KCapsResume )
+       {
+       // The call represented by 'iCallId' can be resumed
+       iTelephony-&gt;Resume(iStatus, iCallId);
+       SetActive();
+       return KErrNone;
+       }
+    else
+       {
+       // The call cannot be resumed; 
+       // return an error indicate this.
+       return KErrNotSupported;
+       }
+    }
+
+void CClientApp::RunL()
+    {
+    if(iStatus==KErrNone)
+       {} // The call has been resumed successfully;
+    }
+
+void CClientApp::DoCancel()
+    {
+    iTelephony-&gt;CancelAsync(CTelephony::EResumeCancel);
+    }
+</codeblock> </example>
+</taskbody></task>
\ No newline at end of file