Symbian3/PDK/Source/GUID-05CDE32C-05B3-519F-9937-757A196400F9.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 1 25a17d01db0c
child 14 578be2adaf3e
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

<?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-05CDE32C-05B3-519F-9937-757A196400F9" xml:lang="en"><title>Integrated
Circuit Card (ICC) Access Tutorial</title><shortdesc>This tutorial explains how the <codeph>RMobilePhone</codeph> functions
enables a client to know whether ICC access is available and how to be notified
when this access is possible. The <codeph>RMobilePhone</codeph> also enables
the client to get the functional capabilities of the current ICC. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>


<context id="GUID-C952CF4B-20C4-4D75-9BF8-CA093F71B9ED"><p>An ICC has different names under the different cellular standards. </p> <ul>
<li id="GUID-3CE9DCD8-2129-5F8C-A4CC-1136CAA7310E"><p>The ICC is called as
Subscriber Identity Module (SIM) card in GSM networks. </p> </li>
<li id="GUID-37AB1492-E84B-5643-8922-57B16D809FDC"><p>The ICC is called Removable
User Identity Module (R-UIM) in CDMA networks. </p> </li>
<li id="GUID-7D402BEA-D833-5BC3-B6A0-E94687B9C021"><p>In WCDMA networks, the
ICC contains a number of applications one of which is known as the Universal
Subscriber Identity Module (USIM) application. </p> </li>
</ul> <p>The ICC stores the services available in the SIM Service Table (SST)
on a SIM, or the CDMA Service Table on a R-UIM. For DCS1800 systems, there
is also the Customer Service Profile (CSP). The services available reflects
the ICC applications static capabilities combined with the subscription details
of the user. </p> </context>
<steps id="GUID-330C5808-2492-57B4-9F70-93E11705E223">




<step id="GUID-6757FD3F-0913-562F-B1D3-6BF917B96777"><cmd>Use <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::GetIccAccessCaps()</apiname></xref> to
find if the ICC access is available. </cmd>
<info>Capabilities are described by <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::TMobilePhoneIccCaps</apiname></xref>. </info>
</step>
<step id="GUID-8B16C684-0711-59B9-8139-AEF2068C2F1D"><cmd>Use <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::NotifyIccAccessCapsChange()</apiname></xref> to
get the notification of any changes in the capabilities. </cmd>
</step>
<step id="GUID-FB65BE05-5141-5EFD-9D3B-2E2E62D047F6"><cmd>Get the ICC service
table using <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::GetServiceTable()</apiname></xref>. </cmd>

<info>Service table information is returned in a packaged <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::TMobilePhoneServiceTableV1</apiname></xref> object.
This contains the data members that store bitmasks of flags indicating the
supported services. </info>
</step>
</steps>
<result id="GUID-D289A2A3-CFEC-4661-A152-E2C43E695EAE"><p>Capabilities
are described by <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::TMobilePhoneIccCaps</apiname></xref>.
The service table information is returned in a packaged <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::TMobilePhoneServiceTableV1</apiname></xref> object.
This contains the data members that store bitmasks of flags indicating the
supported services. </p> </result>
<example><title>SIM access example</title> <p>The following code checks if
the phone has a SIM that can be accessed, and if so, gets the service table
of the SIM. It then checks if Cell Broadcast (CB) message identifiers (a list
of identifiers used as a filter to specify which CB messages are accepted
and shown to user and which are rejected) can be stored, by testing if the <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone::KSstCBMI</apiname></xref> flag is set in the
service table. </p> <p>The code assumes <codeph>iMobilePhone</codeph> is an <xref href="GUID-AA81AFA4-6FAC-3B0D-A082-BE0AEC58CCA8.dita"><apiname>RMobilePhone</apiname></xref> object. </p> <codeblock id="GUID-208F50A9-395F-5CCB-A5B4-5C5601FFDFF3" xml:space="preserve">TUint32 iccCaps;

User::LeaveIfError(iMobilePhone.GetIccAccessCaps(iccCaps));
TBool cbStorage = EFalse;

if (iccCaps &amp; RMobilePhone::KCapsSimAccessSupported)
    {
    RMobilePhone::TMobilePhoneServiceTableV1 mobilePhoneServiceTable;
    RMobilePhone::TMobilePhoneServiceTableV1Pckg mobilePhoneServiceTablePckg(mobilePhoneServiceTable);

    TRequestStatus status;

    iMobilePhone.GetServiceTable(status, RMobilePhone::ESIMServiceTable, mobilePhoneServiceTablePckg);
    User::WaitForRequest(status);
    User::LeaveIfError(status.Int());
    cbStorage = mobilePhoneServiceTable.iServices9To16 &amp; RMobilePhone::KSstCBMI;
    }
</codeblock> </example>
</taskbody></task>