Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
<?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 <e32base.h>
#include <Etel3rdParty.h>
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->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->CancelAsync(CTelephony::EGetIdentityServiceStatusCancel);
}</codeblock> </example>
</taskbody></task>