Symbian3/SDK/Source/GUID-B66323BB-7AC0-5303-BC3A-DD577D28CF16.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-B66323BB-7AC0-5303-BC3A-DD577D28CF16.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,94 @@
+<?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-B66323BB-7AC0-5303-BC3A-DD577D28CF16" xml:lang="en"><title>Caller
+Identification Status Tutorial</title><shortdesc>This tutorial describes how to get the caller identification status
+information with the telephony API for applications. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context id="GUID-B45A8C02-1C5E-4902-8231-F98B1838CCE4"><p>The caller identification service is available only on GSM and
+WCDMA networks.  </p><p/><p>The steps to get the caller identification
+status information are:  </p></context>
+
+
+<steps id="GUID-4E8D8774-7C57-5190-A896-E045B8028AE6">
+<step id="GUID-76D5CC80-CC9D-59D1-BB44-CD9E689DBACA"><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-FD81FA29-62DC-5519-8C71-456FD09EEC0B"><cmd/>
+<info>call <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony::GetIdentityServiceStatus()</apiname></xref> to
+get the caller identification service status information </info>
+<info>Pass a <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>TIdentityService</apiname></xref> object
+with <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>EIdServiceCallerPresentation</apiname></xref>  </info>
+</step>
+<step id="GUID-662113AC-889C-51E2-9053-294B8CEE35CB"><cmd/>
+<info>pass a <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>TIdentityService</apiname></xref> object
+with <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>EIdServiceCallerRestriction</apiname></xref> to
+with hold the number </info>
+</step>
+<step id="GUID-16AA1108-AAC2-577F-A611-26224C493597"><cmd/>
+<info>pass the enumeration<xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>EGetIdentityServiceStatusCancel</apiname></xref> to
+the to cancel the asynchronous request. </info>
+</step>
+</steps>
+<example id="GUID-1BDF5DCA-672D-56C5-9DB2-A777F6E9B68E"><title>Caller identification
+status example</title> <p>Example code to get the caller identification status. </p> <codeblock id="GUID-5C67664C-8D4E-56FE-8745-F38072CE4B60" xml:space="preserve">#include &lt;e32base.h&gt;
+#include &lt;Etel3rdParty.h&gt;
+
+class CClientApp : public CActive
+    { 
+
+private:
+    CTelephony* iTelephony;
+    CTelephony::TIdentityServiceV1 iTIdentityServiceV1;
+    CTelephony::TIdentityServiceV1Pckg iTIdentityServiceV1Pckg;
+
+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),
+      iTIdentityServiceV1Pckg(iTIdentityServiceV1)
+    {
+    //default constructor
+    }
+
+void CClientApp::SomeFunction()
+    {
+    CTelephony::TIdentityService condition = CTelephony::EIdServiceCallerPresentation;
+    iTelephony-&gt;GetIdentityServiceStatus(iStatus, condition, iTIdentityServiceV1Pckg);
+    SetActive();
+    }
+
+void CClientApp::RunL()
+    {
+    if(iStatus==KErrNone)
+       {
+       if( iTIdentityServiceV1.iIdentityStatus == CTelephony::EIdServiceActivePermanent )
+          {} // CLIP is permanently active; 
+             // Your phone will display the callers number whenever this is allowed by the caller
+       }
+    }
+
+void CClientApp::DoCancel()
+    {
+    iTelephony-&gt;CancelAsync(CTelephony::EGetIdentityServiceStatusCancel);
+    }</codeblock> </example>
+</taskbody></task>
\ No newline at end of file