Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QAbstractCallPolicyManager Class Reference
[QtTelephonyModule]

The QAbstractCallPolicyManager class provides an interface for the management of calls across multiple call types. More...

    #include <QAbstractCallPolicyManager>

Inherits QObject.

Inherited by AsteriskManager, CellModemManager, JabberManager, and VoIPManager.

Public Types

Public Functions

Signals

Static Public Members

Additional Inherited Members


Detailed Description

The QAbstractCallPolicyManager class provides an interface for the management of calls across multiple call types.

When the user enters a number or URI to be dialed, or selects one from their list of contacts, Qt Extended needs to decide how to place and manage the call. This decision can be quite complex when multiple call types (e.g. GSM and VoIP) are registered with the system. Some examples are:

The purpose of the QAbstractCallPolicyManager class is to allow these decisions to be separated from the core Qt Extended code, and to ease the integration of new call types in the future.

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

See also CellModemManager and VoIPManager.


Member Type Documentation

enum QAbstractCallPolicyManager::CallHandling

This enum defines how to handle a call that is about to be placed, based on the number to be dialed.

ConstantValueDescription
QAbstractCallPolicyManager::CannotHandle0The number cannot be handled by this policy manager at all, or network registration is not available so it cannot be handled at this time.
QAbstractCallPolicyManager::CanHandle1The call can be handled by this policy manager. If multiple policy managers return this value, the user will be given a choice of call types before the call is placed.
QAbstractCallPolicyManager::MustHandle2The call must be handled by this policy manager, and all other policy managers that return CanHandle should be ignored. This is typically used for emergency calls that must be placed via a specific network (e.g. GSM). It could also be returned if the user has configured a specific policy manager as their preferred call type.
QAbstractCallPolicyManager::NeverHandle3The call must never be handled by any policy manager. The call will be rejected. This is typically used for emergency calls when the device is in airplane mode. The policy manager would normally return MustHandle, but cannot right now.


Member Function Documentation

QAbstractCallPolicyManager::QAbstractCallPolicyManager ( QObject * parent = 0 )

Create a new call policy manager and attach it to parent.

QString QAbstractCallPolicyManager::callType () const   [pure virtual]

Returns the call type that will be used to create the QPhoneCall object with QPhoneCallManager::create().

See also trCallType() and callTypeIcon().

QString QAbstractCallPolicyManager::callTypeIcon () const   [pure virtual]

Returns the icon to display to indicate the call type. This is typically displayed next to the trCallType() text.

See also callType() and trCallType().

bool QAbstractCallPolicyManager::doDnd ()   [pure virtual]

Toggles the status between Do not disturb and normal status. Returns true if Do Not Disturb state is activated, otherwise returns false.

QAbstractCallPolicyManager::CallHandling QAbstractCallPolicyManager::handling ( const QString & number )   [pure virtual]

Determine how to handle calls to number.

bool QAbstractCallPolicyManager::isAvailable ( const QString & number )   [pure virtual]

If the call policy manager supports presence, determine if the party at number is currently available. If the call policy manager does not support presence, this function should always return true.

QAbstractCallPolicyManager * QAbstractCallPolicyManager::managerForCallType ( const QString & type )   [static]

Returns a reference to the call policy manager that handles call of type; otherwise returns 0.

    QString t = "Voice";
    QAbstractCallPolicyManager* m = QAbstractCallPolicyManager::managerforCallType( t );
    if (m) {
        Q_ASSERT(m->calltype() == "Voice");
    }

void QAbstractCallPolicyManager::registrationChanged ( QTelephony::RegistrationState state )   [signal]

Signal that is emitted when the registration state of the telephony service being used by this call policy manager changes.

See also registrationState(), registrationMessage(), and registrationIcon().

QString QAbstractCallPolicyManager::registrationIcon () const   [pure virtual]

Returns the name of an icon to display next to the registrationMessage(), or an empty QString for no icon.

See also registrationChanged(), registrationState(), and registrationMessage().

QString QAbstractCallPolicyManager::registrationMessage () const   [pure virtual]

Returns a human-readable message to be displayed to indicate the current registration state of the telephony service being used by this call policy manager. This function is called whenever the registration state changes.

Returns an empty QString if the call policy manager does not wish to have a message displayed. Messages are normally only displayed if the registration is not present, or the telephony service is searching for a new network to register to. Once successfully registered, the returned message should be empty.

See also registrationChanged(), registrationState(), and registrationIcon().

QTelephony::RegistrationState QAbstractCallPolicyManager::registrationState () const   [pure virtual]

Returns the current registration state of the telephony service being used by this call policy manager.

See also registrationChanged(), registrationMessage(), and registrationIcon().

void QAbstractCallPolicyManager::setCellLocation ( const QString & location )   [pure virtual]

Sets the current cell location to location.

bool QAbstractCallPolicyManager::supportsPresence () const   [pure virtual]

Returns true if the policy manager supports presence.

QString QAbstractCallPolicyManager::trCallType () const   [pure virtual]

Returns the translated, human-readable, version of the call type.

See also callType() and callTypeIcon().

void QAbstractCallPolicyManager::updateOnThePhonePresence ( bool isOnThePhone )   [pure virtual]

If isOnThePhone is true, updates the local presence to away. Otherwise updates the local presence to online. If the call policy manager does not support presence, this function should do nothing.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3