CellularNetworkInfo

Since: BlackBerry 10.0.0

#include <bb/device/CellularNetworkInfo>

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

Encapsulates the capabilities and state of a connected cellular network.

The CellularNetworkInfo class represents a single network that the cellular radio is connected to. The radio may be connected to multiple networks simultaneously. This can occur when using CellularTechnology::Cdma1X. The first connected network (CellularTechnology::Evdo or CellularTechnology::Lte) will provide data service and the second network (CellularTechnology::Cdma1X) will provide voice service. In most other cases, only a single network will be connected. Use CellularRadioInfo::networkCount() to determine the total number of connected networks and setIndex() to associate a CellularNetworkInfo object with one of those networks. If no network exists for the current index, all properties report empty/zero values.

The CellularNetworkInfo class provides information about which wireless communication standard and voice/data services the network supports (see technology() and services() respectively). It also provides details about the network's identity (see name(), mobileCountryCode(), and mobileNetworkCode()) and radio signal strength (see signalStrength()). Use isRoaming() to distinguish between a visited network and the user's home network.

Location information may be derived using the identity of the base station providing service for the network. For GSM/UMTS networks, see cellId() and locationAreaCode(). For LTE networks, see cellId() and trackingAreaCode(). For CDMA networks, see baseStationId(), networkId(), and systemId().


Overview

Properties Index

intbaseStationId [read-only]
intcellId [read-only]
intindex
intlocationAreaCode [read-only]
QStringmobileCountryCode [read-only]
QStringmobileNetworkCode [read-only]
QStringname [read-only]
intnetworkId [read-only]
boolroaming [read-only]
bb::device::CellularService::Typesservices [read-only]
intsignalStrength [read-only]
intsystemId [read-only]
bb::device::CellularTechnology::Typetechnology [read-only]
inttrackingAreaCode [read-only]

Public Functions Index

CellularNetworkInfo (QObject *parent=0)
CellularNetworkInfo (int index, QObject *parent=0)
virtual ~CellularNetworkInfo ()
intbaseStationId () const
intcellId () const
intindex () const
boolisRoaming () const
intlocationAreaCode () const
QStringmobileCountryCode () const
QStringmobileNetworkCode () const
QStringname () const
intnetworkId () const
bb::device::CellularService::Typesservices () const
intsignalStrength () const
intsystemId () const
bb::device::CellularTechnology::Typetechnology () const
inttrackingAreaCode () const

Public Slots Index

voidsetIndex (int index)

Signals Index

voidbaseStationIdChanged (int bid)
voidcellIdChanged (int cellId)
voidindexChanged (int index)
voidlocationAreaCodeChanged (int lac)
voidmobileCountryCodeChanged (const QString &mcc)
voidmobileNetworkCodeChanged (const QString &mnc)
voidnameChanged (const QString &name)
voidnetworkIdChanged (int nid)
voidroamingChanged (bool roaming)
voidservicesChanged (bb::device::CellularService::Types services)
voidsignalStrengthChanged (int rssi)
voidsystemIdChanged (int sid)
voidtechnologyChanged (bb::device::CellularTechnology::Type tech)
voidtrackingAreaCodeChanged (int tac)

Properties

int baseStationId[read-only]

Unique identifier for the base station serving the CDMA network.

Permissions:

The application must have the access_location_services permission to access this information.

Since:

BlackBerry 10.0.0

int cellId[read-only]

Unique identifier for the base station serving the GSM/UMTS/LTE network.

Since:

BlackBerry 10.0.0

int index

Index of the connected network represented by this object (see CellularRadioInfo::networkCount()).

Since:

BlackBerry 10.0.0

int locationAreaCode[read-only]

Identifier for the geographic region which contains the base station serving the GSM/UMTS network.

Permissions:

The application must have the access_location_services permission to access this information.

Since:

BlackBerry 10.0.0

QString mobileCountryCode[read-only]

Unique identifier for the country where the network is located.

Since:

BlackBerry 10.0.0

QString mobileNetworkCode[read-only]

Unique identifier for the network within its country.

Since:

BlackBerry 10.0.0

QString name[read-only]

Human readable name of the network.

Since:

BlackBerry 10.0.0

int networkId[read-only]

Identifier for a geographic region which contains the base station serving the CDMA network.

Permissions:

The application must have the access_location_services permission to access this information.

Since:

BlackBerry 10.0.0

bool roaming[read-only]

Flag indicating whether the device is beyond coverage of its home network.

Since:

BlackBerry 10.0.0

bb::device::CellularService::Types services[read-only]

Bitfield of voice/data services the network supports.

See also:

bb::device::CellularService::Type for a list of flag values.

Since:

BlackBerry 10.0.0

int signalStrength[read-only]

Power measurement of the network's radio signal.

Since:

BlackBerry 10.0.0

int systemId[read-only]

Unique identifier for a geographic region which contains the base station serving the CDMA network.

Permissions:

The application must have the access_location_services permission to access this information.

Since:

BlackBerry 10.0.0

bb::device::CellularTechnology::Type technology[read-only]

Wireless communication standard used by the network.

Since:

BlackBerry 10.0.0

int trackingAreaCode[read-only]

Unique identifier for the geographic region which contains the base station serving the LTE network.

Permissions:

The application must have the access_location_services permission to access this information.

Since:

BlackBerry 10.0.0

Public Functions

CellularNetworkInfo (

Creates a new CellularNetworkInfo object which represents the first connected network (index() == 0).

Parameters
parent

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

Since:

BlackBerry 10.0.0

CellularNetworkInfo (

Creates a new CellularNetworkInfo object which represents the specified connected network.

Parameters
index

Index of the connected network this object will represent (see CellularRadioInfo::networkCount()).

parent

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

Since:

BlackBerry 10.0.0

virtual~CellularNetworkInfo ()

Destructor.

Since:

BlackBerry 10.0.0

int baseStationId ()

Retrieves the unique identifier for the base station serving the CDMA network.

The base station ID (BID) is unique within a system (see systemId()).

Only CDMA networks support BID.

Permissions:

The application must have the access_location_services permission to access this information.

Return:

Returns the BID for the base station serving the CDMA network or 0 if the caller does not have sufficient permission, the network technology is not CDMA, or no network is currently connected.

Since:

BlackBerry 10.0.0

int cellId ()

Retrieves the unique identifier for the base station serving the GSM/UMTS/LTE network.

The cell ID is unique only within a location/tracking area (see locationAreaCode() and trackingAreaCode()).

Only GSM, UMTS, and LTE networks support cell ID.

Permissions:

The application must have the access_location_services permission to access this information.

Return:

Returns the cell ID for the base station serving the GSM/UMTS/LTE network or 0 if the caller does not have sufficient permission, the network technology is not GSM/UMTS/LTE, or no network is currently connected.

Since:

BlackBerry 10.0.0

int index ()

Retrieves the index of the connected network represented by this object.

Return:

Returns the index of the connected network represented by this object (see CellularRadioInfo::networkCount()).

Since:

BlackBerry 10.0.0

bool isRoaming ()

Indicates whether the device is beyond coverage of its home network.

Return:

Returns true if the device is connected to a visited network, false if the device is connected to its home network or no network.

Since:

BlackBerry 10.0.0

int locationAreaCode ()

Retrieves the unique identifier for the geographic region which contains the base station serving the GSM/UMTS network.

The location area code (LAC) is unique within the network.

Only GSM and UMTS networks support LAC.

Permissions:

The application must have the access_location_services permission to access this information.

Return:

Returns the LAC for the base station serving the GSM/UMTS network or 0 if the caller does not have sufficient permission, the network technology is not GSM/UMTS, or no network is currently connected.

Since:

BlackBerry 10.0.0

QString mobileCountryCode ()

Retrieves the unique identifier for the country where the network is located.

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

Return:

Returns the country code of the network encoded as a string or an empty string if no network is currently connected.

Since:

BlackBerry 10.0.0

QString mobileNetworkCode ()

Retrieves the unique identifier for the 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.

Only GSM, UMTS, and LTE networks support MNC.

Return:

Returns the network code of the network encoded as a string or an empty string if the network does not support MNC or is not currently connected.

Since:

BlackBerry 10.0.0

QString name ()

Retrieves the human readable name of the network.

Return:

Returns the human readable name of the network or an empty string if no network is currently connected or the network does not provide a name.

Since:

BlackBerry 10.0.0

int networkId ()

Retrieves the unique identifier for a geographic region within a system which contains the base station serving the CDMA network.

The network ID (NID) is unique within a system (see systemId()).

Only CDMA networks support NID.

Permissions:

The application must have the access_location_services permission to access this information.

Return:

Returns the NID for the base station serving the CDMA network or 0 if the caller does not have sufficient permission, the network technology is not CDMA, or no network is currently connected.

Since:

BlackBerry 10.0.0

bb::device::CellularService::Types services ()

Retrieves a bitfield of voice/data services the network supports.

Return:

Returns a bitfield of voice/data services the network supports or CellularService::None if no network is currently connected.

See also:

bb::device::CellularService::Type for a list of flag values.

Since:

BlackBerry 10.0.0

int signalStrength ()

Retrieves a power measurement of the network's radio signal.

Received signal strength indication (RSSI) is a measurement of radio signal's power in dBm.

Return:

Returns the RSSI of the network or 0 if no network is currently connected.

Since:

BlackBerry 10.0.0

int systemId ()

Retrieves the unique identifier for a geographic region which contains the base station serving the CDMA network.

The system ID (SID) is globally unique.

Only CDMA networks support SID.

Permissions:

The application must have the access_location_services permission to access this information.

Return:

Returns the SID for the base station serving the CDMA network or 0 if the caller does not have sufficient permission, the network technology is not CDMA, or no network is currently connected.

Since:

BlackBerry 10.0.0

bb::device::CellularTechnology::Type technology ()

Retrieves the wireless communication standard used by the network.

Return:

Returns the wireless communication standard used by the network or CellularTechnology::None if no network is currently connected.

Since:

BlackBerry 10.0.0

int trackingAreaCode ()

Retrieves the unique identifier for the geographic region which contains the base station serving the LTE network.

The tracking area code (TAC) is unique within the network.

Only LTE networks support TAC.

Permissions:

The application must have the access_location_services permission to access this information.

Return:

Returns the TAC for the base station serving the LTE network or 0 if the caller does not have sufficient permission, the network technology is not LTE, or no network is currently connected.

Since:

BlackBerry 10.0.0

Public Slots

void setIndex (
  • intindex)

Changes the connected network represented by this object.

Parameters
index

The index of the connected network represented by this object (see CellularRadioInfo::networkCount()).

Since:

BlackBerry 10.0.0

Signals

void baseStationIdChanged (
  • intbid)

Emitted when the base station ID (BID) for the base station serving the CDMA network changes.

Parameters
bid

The new BID for the base station serving the CDMA network.

Since:

BlackBerry 10.0.0

void cellIdChanged (
  • intcellId)

Emitted when the cell ID for the base station serving the GSM/UMTS/LTE network changes.

Parameters
cellId

The new cell ID for the base station serving the GSM/UMTS/LTE network.

Since:

BlackBerry 10.0.0

void indexChanged (
  • intindex)

Emitted when the connected network represented by this object changes.

Parameters
index

The index of the new connected network represented by this object (see CellularRadioInfo::networkCount()).

Since:

BlackBerry 10.0.0

void locationAreaCodeChanged (
  • intlac)

Emitted when the location area code (LAC) for the base station serving the GSM/UMTS network changes.

Parameters
lac

The new LAC for the base station serving the GSM/UMTS network.

Since:

BlackBerry 10.0.0

void mobileCountryCodeChanged (

Emitted when the mobile country code (MCC) of the network changes.

Parameters
mcc

The new MCC of the network.

Since:

BlackBerry 10.0.0

void mobileNetworkCodeChanged (

Emitted when the mobile network code (MNC) of the network changes.

Parameters
mnc

The new MNC of the network.

Since:

BlackBerry 10.0.0

void nameChanged (

Emitted when the human readable name of the network changes.

Parameters
name

The new human readable name of the network.

Since:

BlackBerry 10.0.0

void networkIdChanged (
  • intnid)

Emitted when the network ID (NID) for the base station serving the CDMA network changes.

Parameters
nid

The new NID for the base station serving the CDMA network.

Since:

BlackBerry 10.0.0

void roamingChanged (
  • boolroaming)

Emitted when the roaming indicator changes.

Parameters
roaming

true if the device is currently connected to a visited network, false if the device is currently connected to its home network or no network.

Since:

BlackBerry 10.0.0

void servicesChanged (
  • bb::device::CellularService::Typesservices)

Emitted when the supported voice/data services of the network change.

Parameters
services

A bitfield of the new voice/data services the network supports.

See also:

bb::device::CellularService::Type for a list of flag values.

Since:

BlackBerry 10.0.0

void signalStrengthChanged (
  • intrssi)

Emitted when the power measurement of the network's radio signal changes.

Parameters
rssi

The new received signal strength indication (RSSI) of the network in dBm.

Since:

BlackBerry 10.0.0

void systemIdChanged (
  • intsid)

Emitted when the system ID (SID) for the base station serving the CDMA network changes.

Parameters
sid

The new SID for the base station serving the CDMA network.

Since:

BlackBerry 10.0.0

void technologyChanged (

Emitted when the wireless communication standard of the network changes.

Parameters
tech

The new wireless communication standard of the network.

Since:

BlackBerry 10.0.0

void trackingAreaCodeChanged (
  • inttac)

Emitted when the tracking area code (TAC) for the base station serving the LTE network changes.

Parameters
tac

The new TAC for the base station serving the LTE network.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus