Home · All Classes · Grouped Classes · Annotated · Functions

CellModemManager Class Reference

The CellModemManager class simplifies the initialization and monitoring of a cellular phone modem. More...

    #include <CellModemManager>

Inherits QAbstractCallPolicyManager.

Public Types

Public Functions

Public Slots

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The CellModemManager class simplifies the initialization and monitoring of a cellular phone modem.

The CellModeManager provides a Qtopia Server Task. Qtopia Server Tasks are documented in full in the QtopiaServerApplication class documentation.

Task NameCellModem
InterfacesCellModemManager
ServicesSuspend

The CellModemManager class provides a simplified goal-oriented wrapper around Qtopia's telephony APIs. While the telephony subsystem provides the ability to query and control every aspect of a cellular modem, the CellModemManager class focuses only the task of initializing the telephony subsystem and monitoring common attributes such as the current operator or cell location.

To reduce the complexity of developing a system using CellModemManager, the class rigidly enforces a state transition model of startup and shutdown. Refer to the CellModemManager::State enumeration for this model and an exact description of each state. By guarenteeing the transition flow, validating users of the API is greatly reduced.

In addition to the C++ methods provided, the CellModemManager class also sets the following value space keys:

KeyDescription
/Telephony/Status/RegistrationStateSet to the current registration state of the network. Possible values are "None", "Home", "Searching", "Denied", "Unknown" or "Roaming" and correspond to the values of the QTelephony::RegistrationState enumeration.
/Telephony/Status/NetworkRegisteredSet to true if the network is registered (in the home or roaming states), otherwise false.
/Telephony/Status/RoamingSet to true if the network is in the roaming statem otherwise false.
/Telephony/Status/CellLocationSet to the current cell location. This is equivalent to the value returned by the cellLocation() method.
/Telephony/Status/OperatorNameSet to the current network operator name. This is equivalent to the value returned by the networkOperator() method.
/Telephony/Status/OperatorCountrySet to the current network operator's country name, if available. This is equivalent to the value returned by the networkOperatorCountry() method.
/Telephony/Status/CallDivertTrue if voice calls will be unconditionally diverted, false otherwise.
/Telephony/Status/PlaneModeAvailableTrue if the modem supports "plane mode". Possible values are "Yes", "No" or "Unknown". The "Unknown" value is set during modem initialization before Qtopia has determined whether the modem can support plane mode.
/Telephony/Status/ModemStatusSet to the string value of the current State enumeration value.
/Telephony/Status/SimToolkit/AvailableSet to true if SIM toolkit support is available, otherwise false.
/Telephony/Status/SimToolkit/IdleModeTextSet to the value of the idle mode text string from the SIM toolkit application.
/Telephony/Status/SimToolkit/IdleModeIconSet to the QIcon to display in idle mode.
/Telephony/Status/SimToolkit/IdleModeIconSelfExplanatorySet to true if the idle mode icon is self-explanatory without accompanying text.
/Telephony/Status/SimToolkit/MenuTitleSet to the title of the SIM toolkit application's main menu.

This class is part of the Qtopia server and cannot be used by other Qtopia applications.


Member Type Documentation

enum CellModemManager::State

The State enumeration represents the current state of the CellModemManager class. The allowable transitions between each of the 14 possible states is strictly defined and enforced. The following diagram shows all of the state transitions possible.

ConstantValueDescription
CellModemManager::NoCellModem0There is no cell modem present on the device.
CellModemManager::Initializing1The modem is initializing, but has not yet determined whether a SIM is present or if a pin is required.
CellModemManager::Initializing22The modem is initializing. A SIM card is present and a pin number is either not required or has been correctly entered.
CellModemManager::Ready3The modem is ready to connect to the network and service user requests. Most status changed notifications and requests that the CellModemManager class supports will return default or empty values until it enters the Ready state.
CellModemManager::WaitingSIMPin4The modem requires a SIM pin number to continue initializing. The pin number should be requested from the user and entered through the setSimPin() method.
CellModemManager::VerifyingSIMPin5The modem has received the SIM pin number and is verifying whether it is correct. If incorrect, it will reenter the WaitingSIMPin state (or the WaitingSIMPuk state if the maximum number of SIM pin attempts has expired), otherwise it will proceed to the Initializing2 state.
CellModemManager::WaitingSIMPuk6The modem requires a SIM puk number to continue initializing. The SIM puk is an unlock code for the SIM which is generally required if the SIM pin is incorrectly entered a number of times. The specific number of attempts allowed is determined by either the SIM card or the modem itself. The puk number, and a new pin number, should be entered through the setSimPuk() method.
CellModemManager::VerifyingSIMPuk7The modem has received the SIM puk number and is verifying wither it is correct.
CellModemManager::SIMDead8The user has attempted entry of the SIM puk more than the allowed number of times and the SIM has disabled itself. The specific number of attempts allowed is determined by either the SIM card or the modem itself. Generally SIMDead means that a new SIM card will be required for the account. Emergency calls will still be available in this state.
CellModemManager::SIMMissing9The SIM card is missing and needs to be inserted. Emergency calls will still be available in this state.
CellModemManager::AerialOff10The modem is fully initialized, but is in plane mode with the aerial turned off.
CellModemManager::FailureReset11The modem has encountered an error and is resetting.
CellModemManager::UnrecoverableFailure12The modem has failed in such a way that it cannot be recovered. Qtopia or the device will need to be restarted.


Member Function Documentation

CellModemManager::~CellModemManager ()   [virtual]

Destroy the CellModemManager instance.

void CellModemManager::blockProfiles ( bool block )   [slot]

If block is true, temporarily disable changes in phone profile from effecting whether or not the modem is enabled. If block is false, the modem will be immediately set to the state dictated by the plane mode value returned by QPhoneProfileManager and any further changes to this value will result in changes to the modem state.

See also profilesBlocked().

bool CellModemManager::callForwardingEnabled () const

Returns true if unconditional call forwarding is enabled. This call will always return false unless CellModemManager is in the Ready state.

void CellModemManager::callForwardingEnabledChanged ( bool enabled )   [signal]

Emitted whenever the state of unconditional call forwarding changes. enabled will be true if unconditional call forwarding is on, and false otherwise.

See also callForwardingEnabled().

bool CellModemManager::cellModemAvailable () const

Returns true if a cell modem is available, otherwise false.

void CellModemManager::disableProfilesControlModem ()   [static]

Assuming profiles control has not been temporarily profilesBlocked() blocked, CellModemManager normally enables and disables the modem in response to changes in the plane mode value returned by QPhoneProfileManager.

A call to this method disables this functionality and setModemEnabled() must be called manually to control the modem. This method can only be called prior to CellModemManager's construction.

See also CellModemManager::profilesControlModem().

QStringList CellModemManager::emergencyNumbers ()   [static]

Return the list of emergency numbers. This list is currently 112, 911, 08, 000, 999, 110, 118, and 119, but may change in the future.

QString CellModemManager::networkOperator () const

Returns the current network operator. This call will always return an empty string unless CellModemManager is in the Ready state.

void CellModemManager::networkOperatorChanged ( const QString & networkOperator )   [signal]

Emitted whenever the network operator changes. networkOperator will be set to the new value.

QString CellModemManager::networkOperatorCountry () const

Returns the current network operator's country. This call will always return an empty string unless CellModemManager is in the Ready state.

bool CellModemManager::networkRegistered () const

Returns true if a network is registered, false otherwise. A network is registered if registrationState() is either QTelephony::RegistrationHome or QTelephony::RegistrationRoaming.

bool CellModemManager::planeModeEnabled () const

Returns true if the modem is in or is transitioning into plane mode, false otherwise. The call will return the last value set through setPlaneModeEnabled().

As a modem takes time to respond to requests, planeModeEnabled() may not represent the true modem state. Instead, it represents the intended state of the modem once all pending operations have been performed.

The true state of the modem can be queried through the state() method. Ignoring potential abnormal conditions, the modem has reached a steady state when state() == (planeModeEnabled()?AerialOff:Ready).

See also setPlaneModeEnabled().

void CellModemManager::planeModeEnabledChanged ( bool enabled )   [signal]

Emitted whenever the plane mode enabled value, as set by setPlaneModeEnabled() changes. enabled will be set to the new value.

bool CellModemManager::planeModeSupported () const

Returns true if the modem supports plane mode. Plane mode, a state in which the modem neither transmits or receives information, is suitable for use on an airplane.

bool CellModemManager::profilesBlocked ()

Return true if profiles have been temporarily blocked from effecting the modem state, false otherwise.

See also blockProfiles().

bool CellModemManager::profilesControlModem ()   [static]

Returns true if the plane mode value returned by QPhoneProfileManager will control whether the modem is enabled or disabled.

See also disableProfilesControlModem().

QTelephony::RegistrationState CellModemManager::registrationState () const   [virtual]

Returns the current network registration state. This call will always return QTelephony::RegistrationNone unless CellModemManager is in the Ready state.

Reimplemented from QAbstractCallPolicyManager.

void CellModemManager::registrationStateChanged ( QTelephony::RegistrationState state )   [signal]

Emitted whenever the network registration state changes.

void CellModemManager::setCellLocation ( const QString & location )

Updates the value in value space at /Telephony/Status/CellLocation to location.

void CellModemManager::setPlaneModeEnabled ( bool enabled )   [slot]

Sets the desired plane mode state to enabled. If enabled is true, the CellModemManager will attempt to disable the modem aerial and put it into the AerialOff state. If false, the aerial will be enabled and the manager will transition into the Ready state.

If the modem does not support plane mode, this method will have no effect. Support for plane mode can be determined through the planeModeSupported() method.

See also planeModeEnabled().

void CellModemManager::setSimPin ( const QString & pin )   [slot]

Set the SIM pin. This method may only be called while CellModemManager is in the WaitingSIMPin state.

void CellModemManager::setSimPuk ( const QString & puk, const QString & pin )   [slot]

Set the SIM puk and new pin. This method may only be called while CellModemManager is in the WaitingSIMPuk state.

bool CellModemManager::simToolkitAvailable () const

Returns true if a sim supporting SIM toolkit applications is available, otherwise false.

void CellModemManager::simToolkitAvailableChanged ( bool available )   [signal]

Emitted whenever the state of SIM toolkit availability changes. available will be set to true if a sim supporting SIM toolkit applications is available, and false otherwise.

See also simToolkitAvailable().

QIcon CellModemManager::simToolkitIdleModeIcon () const

Returns the icon to display when the system is in idle mode.

bool CellModemManager::simToolkitIdleModeIconSelfExplanatory () const

Returns true if the idle mode icon is self-explanatory without accompanying text.

QString CellModemManager::simToolkitIdleModeText () const

Returns the text to display when the system is in idle mode.

QString CellModemManager::simToolkitMenuTitle () const

Returns the title of the SIM toolkit application's main menu.

State CellModemManager::state () const

Return the current state of the CellModemManager instance.

void CellModemManager::stateChanged ( CellModemManager::State newState, CellModemManager::State oldState )   [signal]

Emitted whenever the state of CellModemManager changes from oldState to newState.

QString CellModemManager::stateToString ( State state )   [static]

Returns state as a string.


Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3