Initial contribution of the Adaptation Documentation.
<?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 concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-92966ADC-17CF-5411-A829-1201C182B59F" xml:lang="en"><title>ETel3rdParty: Using the Telephony Independent Software Vendor
(ISV) API</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This set of seven example applications demonstrate the use of the
Telephony ISV API provided by the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony</apiname></xref> public
interface to the phone’s telephony system. This interface enables
developers to access common mobile telephony services, such as finding
phone information, dialling and answering voice calls. </p>
<p>Each example demonstrates a different set of mobile telephony services,
and is stored in a subdirectory of <filepath>ETel3rdPartyExample</filepath>. These subdirectories are explained in the description section. </p>
<section id="GUID-CD1C71CD-AB0C-4C39-93CA-50E57E4A80FE"><title>Download</title> <p>Click on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-7bdecae0-8d0b-407e-b387-2543550d99e7.zip" scope="external"> ETel3rdParty.zip</xref></p><p>Click <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-7bdecae0-8d0b-407e-b387-2543550d99e7.html" scope="peer">browse</xref> to view the example code. </p> </section>
<section id="GUID-BF0DBC82-2432-54B9-9A5F-78900F3FDA6C"><title>Description</title> <p><b>AutoDTMFDialler</b> </p> <p>This example performs the following
operations: </p> <ul>
<li id="GUID-AAA9F2D1-839B-5B68-A8AC-4C67E2573BBD"><p>Retrieves the
line status using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-0586CC93-2F37-31BB-804B-E4EAF56E705D"><apiname>CTelephony::GetLineStatus(const TPhoneLine&
, TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-2F14CEC3-9000-50B9-856E-E0BED7A0F617"><p>Retrieves the
call status using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-623CA9E2-6474-3ED8-8608-D74AF33E34E2"><apiname>CTelephony::GetCallStatus(const TCallId&
, TDes8&)</apiname></xref> function </p> </li>
<li id="GUID-698A96D0-3669-59C5-B81C-34D0DC651562"><p>Retrieves the
current network registration status using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-B515E4EB-C263-31B4-BAEA-059DDE4FA0EB"><apiname>CTelephony::GetNetworkRegistrationStatus(TRequestStatus&
, TDes8&)</apiname></xref> function </p> </li>
<li id="GUID-6725066A-EAA5-5530-807C-FA7D7FF510E0"><p>Retrieves the
current flight mode status using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-735C3095-6DBB-356F-87B6-C474AEB2A1B8"><apiname>CTelephony::GetFlightMode(TRequestStatus&
, TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-A6E7E73E-D31F-5D0D-895F-FABBEA5FECFD"><p>Initiates a
call using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-A0BB7D4A-563D-36C9-ADD9-91C1BA702980"><apiname>CTelephony::DialNewCall(TRequestStatus&
, TDes8& , const TTelNumber& , TCallId& , const TPhoneLine)</apiname></xref> function </p> </li>
<li id="GUID-541A9C02-ACAA-5017-BE5C-98FED025FF06"><p>Transmits DTMF
tones across all the current active voice calls one after the other
using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-33950E77-9502-3698-8135-0B01C42EE0FD"><apiname>CTelephony::SendDTMFTones(TRequestStatus& ,
const TDesC&)</apiname></xref> function </p> </li>
<li id="GUID-6FA24CD2-FB5E-57B2-92A1-CE4D69969306"><p>Disconnects
a call using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-15D52797-E697-3C27-89EB-845592958E8F"><apiname>CTelephony::Hangup(TRequestStatus& ,
const TCallId&)</apiname></xref> function. </p> </li>
</ul> <p><b>Configs</b> </p> <p>This example directory contains the <filepath>config.txt</filepath> and the <filepath>TelephonyISVAppConfig.cfg</filepath> files, which are required to configure the SIM TSY to run the application.
For more information, see the <xref href="GUID-92966ADC-17CF-5411-A829-1201C182B59F.dita#GUID-92966ADC-17CF-5411-A829-1201C182B59F/GUID-F065BEFB-810D-5C25-97FD-8D953515D249">Configuring the Simulator TSY</xref> section. </p> <p><b>IncomingCalls</b> </p> <p>This example answers incoming calls using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-E3B87047-020B-3889-A2C1-9E6D2A818419"><apiname>CTelephony::AnswerIncomingCall(TRequestStatus&
, TCallId& , const TPhoneLine)</apiname></xref> function. It also retrieves
information about the call using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-F1B513A2-1B64-3BD3-A2FC-02145165AA0B"><apiname>CTelephony::GetCallInfo(TDes8&
, TDes8& , TDes8&)</apiname></xref> function. It uses a test plug-in
named Simulator TSY (SIMTSY) which simulates telephony functions like
phonebook, voicecall, SMS etc. </p> <p><b>NetworkInformation</b> </p> <p>This example retrieves the over-the-air network information about
the currently registered mobile network using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-5E5C9D21-C9B6-36E0-B2AB-17EBBF1223FE"><apiname>CTelephony::GetCurrentNetworkInfo(TRequestStatus&
, TDes8&)</apiname></xref> function and also requests notification of
changes to this information using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-E5DE0420-F112-3198-AF19-C65603B391C9"><apiname>CTelephony::NotifyChange(TRequestStatus&
, const TNotificationEvent& , TDes8&)</apiname></xref> function. </p> <p><b>OutgoingCalls</b> </p> <p>This uses a test plug-in named Simulator
TSY (SIMTSY) which simulates telephony functions like phonebook, voicecall,
SMS etc. This example performs the following operations: </p> <ul>
<li id="GUID-6D961227-F152-5107-8495-EA7F25E4769A"><p>Initiates a
call using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-A0BB7D4A-563D-36C9-ADD9-91C1BA702980"><apiname>CTelephony::DialNewCall(TRequestStatus&
, TDes8& , const TTelNumber& , TCallId& , const TPhoneLine)</apiname></xref> function. </p> </li>
<li id="GUID-E080260D-97EA-51B5-9DB3-A00818ACEE5D"><p>Places a call
on hold using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-AE5CE716-FDC9-3981-822C-DD1CE2E524F9"><apiname>CTelephony::Hold(TRequestStatus& ,
const TCallId&)</apiname></xref> function. </p> </li>
<li id="GUID-A2B396AE-38AE-5776-AE15-782BAF848F19"><p>Swaps between
calls using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-E7EF7DF4-7841-321F-8205-04ABDB2043D2"><apiname>CTelephony::Swap(TRequestStatus& , const
TCallId& , const TCallId&)</apiname></xref> function. </p> </li>
<li id="GUID-6224A13F-A467-583D-9A47-7945081DFD0E"><p>Resumes a call
on hold using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-76F65E9F-4909-3327-80CB-AB0D9F3D811E"><apiname>CTelephony::Resume(TRequestStatus&
, const TCallId&)</apiname></xref> function. </p> </li>
<li id="GUID-0E611A4B-B748-5FEC-9F8F-A1AA84B9BA7E"><p>Retrieves the
status of ICC locks using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-C56BF3F8-834F-3D8E-AECF-B284718AFE19"><apiname>CTelephony::GetLockInfo(TRequestStatus&
, const TIccLock& , TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-ED64D75F-7792-5009-B457-CB0871273F64"><p>Retrieves ICC-stored
information about the (preferred) name of the currently registered
mobile network using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-2DF79C5B-5BF7-3761-81B3-24FEC4994C37"><apiname>CTelephony::GetCurrentNetworkName(TRequestStatus&
, TDes8& )</apiname></xref> function and the network name using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-2F54B3D9-81C0-30D2-AD60-8EA7D2BC59CA"><apiname>CTelephony::GetOperatorName(TRequestStatus& , TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-4521E90B-4E15-5087-AE9A-3FB3DFE5162C"><p> </p> <p>Retrieves
the dynamic call capabilities for the calls that was dialled or answered
using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-5ED0B26D-0D47-37C6-8523-B0D171ACD753"><apiname>CTelephony::GetCallDynamicCaps(const TCallId&,
TDes8&)</apiname></xref> function. </p> </li>
</ul> <p><b>PhoneId</b> </p> <p>This example retrieves information
about a phone, such as the manufacturer name, serial number, phone
and SIM card number using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-BD7848B1-0FE6-344F-9D85-4673F7412DDF"><apiname>CTelephony::GetPhoneId(TRequestStatus&
, TDes8&)</apiname></xref> function, and current subscriber information
using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-AB2BD2FA-C508-3866-8AFA-A36D59E4E75D"><apiname>CTelephony::GetSubscriberId(TRequestStatus&
, TDes8&)</apiname></xref> function. It then prints this information
to the console. </p> <p><b>PhoneMonitoring</b> </p> <p>This example
performs the following operations: </p> <ul>
<li id="GUID-99718553-06A4-5BB3-986E-EA9B73EF0FCC"><p>Retrieves the
status and charge level of the phone battery using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-1A94F22F-02CF-304E-876C-1ED3889DA74D"><apiname>CTelephony::GetBatteryInfo(TRequestStatus&
, TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-DC238197-472A-5408-9F66-28F61FD185D0"><p>Indicates whether
a phone battery is being charged using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-849590A1-3DC8-3995-A27E-845F316596E1"><apiname>CTelephony::GetIndicator(TRequestStatus&
, TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-A800C543-4FB4-5A62-B6CC-BBF4CFE0970A"><p>Retrieves the
current signal strength of the phone using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-A242726A-8A71-3508-B537-5534D6B447B3"><apiname>CTelephony::GetSignalStrength(TRequestStatus&
, TDes8&)</apiname></xref> function. </p> </li>
<li id="GUID-D8B692C0-C8A7-5CE9-8643-6C7B2150C57B"><p>Retrieves the
current flight mode status using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-735C3095-6DBB-356F-87B6-C474AEB2A1B8"><apiname>CTelephony::GetFlightMode(TRequestStatus&
, TDes8&)</apiname></xref> function. </p> </li>
</ul> <p><b>Shared</b> </p> <p>This example directory contains the
shared files to be used by other directories for synchronous and asynchronous
operations. </p> <p><b>SuppleServices</b> </p> <p>This example retrieves
the current status of the following services: </p> <ul>
<li id="GUID-E1D17AB9-54A7-5EFB-A20F-5AA9A1D4BF3C"><p>call barring
services using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-C2972477-3671-381C-9D40-46D9C9C6E54A"><apiname>CTelephony::GetCallBarringStatus(TRequestStatus&
, const TCallBarringCondition , TDes8& , const TServiceGroup)</apiname></xref> function, </p> </li>
<li id="GUID-F9338E27-96B4-54A6-BB27-8EDFB61DAE26"><p>call forwarding
services using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-CE3C3D05-2313-3ED2-9AAF-D172D6A6F9FD"><apiname>CTelephony::GetCallForwardingStatus(TRequestStatus&
, const TCallForwardingCondition , TDes8& , const TServiceGroup)</apiname></xref> function, </p> </li>
<li id="GUID-70CEDAB7-6BD2-5F8B-BEFB-36B79223C9FC"><p>call waiting
services using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-BBFA4B72-3CDE-3585-91AB-3331F7B973BA"><apiname>CTelephony::GetCallWaitingStatus(TRequestStatus&
, TDes8& , const TServiceGroup)</apiname></xref> function, </p> </li>
<li id="GUID-D2A45950-D676-54F8-A365-AAC53160CE86"><p>call identity
services using the <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita#GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A/GUID-DCD53D66-0812-35F7-B1D5-2E436D4729DD"><apiname>CTelephony::GetIdentityServiceStatus(TRequestStatus&
, const TIdentityService& , TDes8&)</apiname></xref> function. </p> </li>
</ul> </section>
<section id="GUID-A4801049-45DC-4705-B43B-9F2CD37E130E"><title>Class
summary</title> <p>The principal class used in this example is <xref href="GUID-97D402C8-B4B7-385A-92B3-D3FCC0CA575A.dita"><apiname>CTelephony</apiname></xref>. </p> </section>
<section id="GUID-F065BEFB-810D-5C25-97FD-8D953515D249"><title>Configuring
the simulator TSY</title> <p>To run the application you must configure
the Simulator TSY. To do this, install the configuration files by
performing the following steps: </p> <ol id="GUID-A72585E2-49F7-56CA-957F-2AAA6D2ADF9B">
<li id="GUID-38B9A560-6511-5EC7-BB96-DD1ECBED96E2"><p>Copy the <filepath>config.txt</filepath> file and the <filepath>TelephonyISVAppConfig.cfg</filepath> file into the <filepath>\epoc32\winscw\c\</filepath> directory of
the phone. </p> </li>
<li id="GUID-3422372C-9843-55A2-9DB8-83A28EF61C94"><p>From the command
prompt, go to the source root directory. </p> </li>
<li id="GUID-A86CA3CE-500B-575F-BB3B-D4825579BA97"><p>Change directory
to <filepath>\epoc32\release\winscw\udeb</filepath> and run the following
command: </p> <p><userinput>ced c:\TelephonyISVAppConfig.cfg </userinput> </p> </li>
<li id="GUID-8AFA4C77-F78F-5672-AF9C-E999930E1E51"><p>Check the <filepath>ced.log</filepath> file to ensure that the configuration file has
been read successfully. </p> </li>
</ol> </section>
<section id="GUID-67006F52-C18C-576E-B645-20AE6CCD61C4"><title>Building
and running</title> <p> The Symbian build process describes how to
build an application. </p> <p>The <codeph>ETel3rdPartyExample</codeph> builds the following executables in the standard location (<filepath>\epoc32\release\winscw\<build_variant></filepath> for CodeWarrior): </p> <ul>
<li id="GUID-443AF336-E3B4-507E-9A13-A6AB7912B79F"><p> <filepath> phoneid.exe</filepath> </p> </li>
<li id="GUID-DAB579A4-B8D2-570E-BD25-5C5F9F5B90B5"><p> <filepath>phonemonitor.exe</filepath> </p> </li>
<li id="GUID-243981B3-581D-5716-AA4E-44FA6392E7D4"><p> <filepath>networkinformation.exe</filepath> </p> </li>
<li id="GUID-0799DF67-6E1E-5584-B9B5-5F146977E10A"><p> <filepath>suppleservices.exe</filepath> </p> </li>
<li id="GUID-1D7E2526-E35C-5522-BF06-C1CC72E5B15D"><p> <filepath>outgoingcalls.exe</filepath> </p> </li>
<li id="GUID-717B32F7-2DBE-5088-8B42-AC3437B39315"><p> <filepath>autodtmf.exe</filepath> </p> </li>
<li id="GUID-85027887-4C27-56FF-8A11-7ADE2BC89F93"><p> <filepath>incomingcalls.exe</filepath> </p> </li>
</ul> <p>Each executable must be run separately. </p> <p> <b>Note:</b> Set the <codeph>StartUpMode</codeph> mode to <codeph>1</codeph> in
the <filepath>\epoc32\data\epoc.ini</filepath> file to start the emulator
in text shell mode as the applications use a console based interface. </p> </section>
</conbody></concept>