Symbian3/SDK/Source/GUID-2332AFD7-30F2-5B4D-BBA9-3EA36D8F5E81.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-2332AFD7-30F2-5B4D-BBA9-3EA36D8F5E81.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,87 @@
+<?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-2332AFD7-30F2-5B4D-BBA9-3EA36D8F5E81" xml:lang="en"><title>Call
+Barring Status </title><shortdesc>This tutorial describes how to get the call barring status information
+with the telephony API for applications </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context><p>The call barring is a supplementary service. The client applications
+can determine the status of the service with the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony</apiname></xref> functions.
+ </p></context>
+
+
+<steps id="GUID-2BA7DD2F-8ECE-5F05-A534-FA8A213C2E04">
+<step id="GUID-ADD96618-3A97-59A3-9A18-C34B46D36CDF"><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-41E8A873-C810-5C80-95C4-4247CBAA4952"><cmd/>
+<info>use <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::GetCallBarringStatus()</apiname></xref> to
+get the supplementary services status information. </info>
+<info>pass a <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>TCallBarringCondition</apiname></xref> object. </info>
+</step>
+<step id="GUID-F7F6B090-1A10-5902-8470-BB1A2A3E6A5E"><cmd/>
+<info>cancel the request with <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::EGetCallBarringStatusCancel</apiname></xref> enumeration. </info>
+</step>
+</steps>
+<example id="GUID-C64CDE2B-344E-5341-88B0-624059E85CE5"><title>Call barring
+example</title> <codeblock id="GUID-873ED2A9-3B8F-57F5-8A35-46EBD87350B7" xml:space="preserve">#include &lt;e32base.h&gt;
+#include &lt;Etel3rdParty.h&gt;
+
+class CClientApp : public CActive
+    { 
+
+private:
+    CTelephony* iTelephony;
+    CTelephony::TCallBarringSupplServicesV1 iCallBarringSupplServicesV1;
+    CTelephony::TCallBarringSupplServicesV1Pckg iCallBarringSupplServicesV1Pckg;
+
+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),
+      iCallBarringSupplServicesV1Pckg(iCallBarringSupplServicesV1)
+    {
+    //default constructor
+    }
+
+void CClientApp::SomeFunction()
+    {
+    CTelephony::TCallBarringCondition condition = CTelephony::EBarAllOutgoing;
+    iTelephony-&gt;GetCallBarringStatus(iStatus, condition, iCallBarringSupplServicesV1Pckg);
+    SetActive();
+    }
+
+void CClientApp::RunL()
+    {
+    if(iStatus==KErrNone)
+       {
+       if( iCallBarringSupplServicesV1.iCallBarring == CTelephony::EStatusActive )
+          {} // The call barring condition is active; 
+             // all outgoing calls are barred.
+       }
+    }
+
+void CClientApp::DoCancel()
+    {
+    iTelephony-&gt;CancelAsync(CTelephony::EGetCallBarringStatusCancel);
+    }</codeblock> </example>
+</taskbody></task>
\ No newline at end of file