|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task xml:lang="en" id="GUID-95CA8E55-AC98-5B6C-889A-AF0DF17A3D57"><title>Data Call Parameters Tutorial</title><shortdesc>This tutorial describes how to get the data call parameters from a call. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> <context><p>The various parameters that can be retrieved from a call are: </p> <ul><li id="GUID-80EDCC9C-79AC-5562-89FB-8BB3D22A89A0"><p>type of data service </p> </li> <li id="GUID-41FAAA12-1339-5D0D-AE0D-58BDFA326C97"><p>data transfer rate </p> </li> <li id="GUID-0CA6626E-3989-5EF4-92A9-5FE320A0A5B5"><p>GSM and WCDMA specific parameters such as the quality of data service and the version of Radio Link Protocol (RLP). </p> </li> </ul> </context> <steps id="GUID-C369CF72-00EB-5E9F-AA5D-027E7E6B1CBD"> <step id="GUID-D8324F26-9F0D-50B4-9C02-6F67DDAC54D4"><cmd/><info>Create a <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobileCall::TMobileDataCallParamsV1</apiname></xref> class to store the data call parameters. </info> <info>The class is derived from <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RCall::TCallParams</apiname></xref>. </info> </step> <step id="GUID-9E9F3CFA-5163-53A0-BC08-BFAB658EEEF0"><cmd>Pass a package object to the <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RCall::Dial()</apiname></xref> to set the data parameters to make a call. </cmd> </step> <step id="GUID-F4548425-3E46-52A5-8223-C04C0DD00259"><cmd>Pass a package object to the <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RCall::AnswerIncomingCall()</apiname></xref> to set the data parameters for an inbound call. </cmd> </step> <step id="GUID-046D9671-3353-5A14-8686-AC982FEB39B3"><cmd>Use <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RCall::GetCallParams()</apiname></xref> to get the current parameters used for data calls. </cmd> </step> </steps> <example><title>Data call parameters example</title> <p>The following code prints the call's speed. </p> <codeblock id="GUID-2B2A4C47-C9A8-5E77-86E3-61BFA887DA4A" xml:space="preserve">void CClientApp::DataCallParamsL(RMobileCall& aCall) |
|
13 { |
|
14 RMobileCall::TMobileDataCallParamsV1 callParams; |
|
15 RMobileCall::TMobileDataCallParamsV1Pckg callParamsPckg(callParams); |
|
16 |
|
17 User::LeaveIfError(aCall.GetCallParams(callParamsPckg)); |
|
18 const TText* speeds[] = {_S("Unspecified"),_S("Autobauding"), _S("2400"), |
|
19 _S("4800"), _S("9600"), _S("14400"), _S("19200"), _S("28800"), _S("32000"), |
|
20 _S("33600"), _S("38400"), _S("43200"), _S("48000"), _S("56000"), _S("57600"), |
|
21 _S("64000")}; |
|
22 |
|
23 TBuf<20> speedDes (speeds[callParams.iSpeed]); |
|
24 console->Printf(_L("Speed %S"), &speedDes); |
|
25 }</codeblock> </example> </taskbody></task> |