This tutorial explains how the RMobilePhone functions enables a client to know whether ICC access is available and how to be notified when this access is possible. The RMobilePhone also enables the client to get the functional capabilities of the current ICC.
An ICC has different names under the different cellular standards.
The ICC is called as Subscriber Identity Module (SIM) card in GSM networks.
The ICC is called Removable User Identity Module (R-UIM) in CDMA networks.
In WCDMA networks, the ICC contains a number of applications one of which is known as the Universal Subscriber Identity Module (USIM) application.
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.
Capabilities are described by RMobilePhone::TMobilePhoneIccCaps. The service table information is returned in a packaged RMobilePhone::TMobilePhoneServiceTableV1 object. This contains the data members that store bitmasks of flags indicating the supported services.
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 RMobilePhone::KSstCBMI flag is set in the service table.
The code assumes iMobilePhone is an RMobilePhone object.
TUint32 iccCaps; User::LeaveIfError(iMobilePhone.GetIccAccessCaps(iccCaps)); TBool cbStorage = EFalse; if (iccCaps & 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 & RMobilePhone::KSstCBMI; }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.