SimCardInfo

Since: BlackBerry 10.0.0

#include <bb/device/SimCardInfo>

To link against this class, add the following line to your .pro file: LIBS += -lbbdevice

Encapsulates the state and contents of a subscriber identification module (SIM) card.

The SIM card stores information used to authenticate and identify a subscriber of a cellular network. The presence of a SIM card can be detected using the state() method. Information stored on the SIM card includes the subscriber's home network (see mobileCountryCode() and mobileNetworkCode()) and the serial number of the SIM card (see serialNumber()).


Overview

Public Functions Index

Signals Index

voidmobileCountryCodeChanged (const QString &mcc)
voidmobileNetworkCodeChanged (const QString &mnc)
voidserialNumberChanged (const QString &serialNumber)
voidstateChanged (bb::device::SimCardState::Type state)

Properties

QString mobileCountryCode[read-only]

Unique identifier for the country where the SIM card's home network is located.

Permissions:

The application must have the read_device_identifying_information permission to access this property.

Since:

BlackBerry 10.0.0

QString mobileNetworkCode[read-only]

Unique identifier for the SIM card's home network within its country.

Permissions:

The application must have the read_device_identifying_information permission to access this property.

Since:

BlackBerry 10.0.0

QString serialNumber[read-only]

Unique identifier for the SIM card.

Permissions:

The application must have the read_device_identifying_information permission to access this property.

Since:

BlackBerry 10.0.0

bb::device::SimCardState::Type state[read-only]

Indicates whether the data on the SIM card can be accessed or why not.

Since:

BlackBerry 10.0.0

Public Functions

SimCardInfo (

Creates a new SimCardInfo object.

Parameters
parent

If not 0, the supplied parent will be responsible for deleting this instance.

Since:

BlackBerry 10.0.0

virtual~SimCardInfo ()

Destructor.

Since:

BlackBerry 10.0.0

QString mobileCountryCode ()

Retrieves the unique identifier for the country where the SIM card's home network is located.

The mobile country code (MCC) is composed of 3 or 4 decimal digits. For more information about the structure of the MCC, see ITU-T recommendation E.212.

Return:

Returns the country code of the SIM card's home network encoded as a string, or an empty string if the caller does not have sufficient permission or if the SIM card's state is not SimCardState::Ready.

Permissions:

The application must have the read_device_identifying_information permission to access this method.

Since:

BlackBerry 10.0.0

QString mobileNetworkCode ()

Retrieves the unique identifier for the SIM card's home network within its country.

The mobile network code (MNC) is composed of 2 or 3 decimal digits. For further details about the structure of the MNC, see ITU-T recommendation E.212.

Return:

Returns the network code of the SIM card's home network encoded as a string, or an empty string if the caller does not have sufficient permission or if the SIM card's state is not SimCardState::Ready.

Permissions:

The application must have the read_device_identifying_information permission to access this method.

Since:

BlackBerry 10.0.0

QString serialNumber ()

Retrieves the unique identifier for the SIM card.

The integrated circuit card identifier (ICCID) uniquely identifies a SIM card. The ICCID is composed of 19 or 20 decimal digits plus a check digit. For more information about the structure of the ICCID, see ITU-T recommendation E.118.

Return:

Returns the ICCID of the SIM card encoded as a string, or an empty string if the caller does not have sufficient permission or if the SIM card's state is not SimCardState::Ready.

Permissions:

The application must have the read_device_identifying_information permission to access this method.

Since:

BlackBerry 10.0.0

bb::device::SimCardState::Type state ()

Retrieves the state of the SIM card.

Return:

Returns the state of the SIM card or SimCardState::NotDetected if the caller does not have sufficient permission.

Since:

BlackBerry 10.0.0

Signals

void mobileCountryCodeChanged (

Emitted when the mobile country code (MCC) of the SIM card's home network changes.

Parameters
mcc

The new MCC of the SIM card's home network.

Since:

BlackBerry 10.0.0

void mobileNetworkCodeChanged (

Emitted when the mobile network code (MNC) of the SIM card's home network changes.

Parameters
mnc

The new MNC of the SIM card's home network.

Since:

BlackBerry 10.0.0

void serialNumberChanged (

Emitted when the integrated circuit card identifier (ICCID) of the SIM card changes.

Parameters
serialNumber

The new ICCID of the SIM card.

Since:

BlackBerry 10.0.0

void stateChanged (

Emitted when the state of the SIM card changes.

Parameters
state

The new state of the SIM card.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus