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

QModemCallProvider Class Reference
[QtCellModule]

The QModemCallProvider class implements a mechanism for AT-based phone call providers to hook into the telephony system. More...

    #include <QModemCallProvider>

Inherits QPhoneCallProvider.

Public Types

Public Functions

Public Slots

Protected Functions

Protected Slots

Additional Inherited Members


Detailed Description

The QModemCallProvider class implements a mechanism for AT-based phone call providers to hook into the telephony system.

This class provides a number of methods, such as dialVoiceCommand(), releaseCallCommand(), putOnHoldCommand(), etc, that can be used to customize the AT commands that are used by QModemCall for specific operations. Modem vendor plug-ins override these methods in their own phone call provider.

Client applications should use QPhoneCall and QPhoneCallManager to make and receive phone calls. The QModemCallProvider class is intended for the phone server.

QModemCall instances are created by the QModemCallProvider::create() function. If a modem vendor plug-in needs to change some of the functionality in this class, they should do the following:

See the documentation for QModemCall for more information.

See also QModemCall, QModemDataCall, QPhoneCallProvider, and QPhoneCallImpl.


Member Type Documentation

enum QModemCallProvider::AtdBehavior

This enum defines the behavior of the ATD modem command when dialing voice calls.

ConstantValueDescription
QModemCallProvider::AtdOkIsConnect0When ATD reports OK, the call has connected.
QModemCallProvider::AtdOkIsDialing1When ATD reports OK, the call is dialing, but not yet connected. The AT+CLCC command must be used to determine when it transitions from dialing to connected.
QModemCallProvider::AtdOkIsDialingWithStatus2When ATD reports OK, the call is dialing, but not yet connected. The modem vendor plug-in will call setState() on the call when it transitions to connected.
QModemCallProvider::AtdUnknown3When ATD reports OK, it is unknown whether the call is dialing or connected and AT+CLCC must be used to determine the status. This is the default.


Member Function Documentation

QModemCallProvider::QModemCallProvider ( QModemService * service )

Constructs a new AT-based phone call provider for service.

QModemCallProvider::~QModemCallProvider ()

Destroys this AT-based phone call provider and all QPhoneCallImpl instances associated with it.

void QModemCallProvider::abortDial ( uint modemIdentifier, QPhoneCall::Scope scope )   [virtual protected]

Aborts an ATD dial command for the call modemIdentifier. The scope parameter is passed from QModemCall::hangup().

The default implementation calls atchat()->abortDial(), followed by either AT+CHLD=1 or AT+CHLD=1n depending upon the value of scope.

See also QAtChat::abortDial() and QModemCall::hangup().

QString QModemCallProvider::acceptCallCommand ( bool otherActiveCalls ) const   [virtual protected]

Returns the AT command to use to accept an incoming call. If otherActiveCalls is true, then there are other active calls within the system. The default implementation returns AT+CHLD=2 if otherActiveCalls is true, or ATA otherwise.

See also setBusyCommand() and QModemCall::accept().

QString QModemCallProvider::activateCallCommand ( uint modemIdentifier, bool otherActiveCalls ) const   [virtual protected]

Returns the AT command to use to activate the call modemIdentifier. If otherActiveCalls is true, then there are other active calls within this system. The default implementation returns AT+CHLD=2modemIdentifier if otherActiveCalls is true, or AT+CHLD=2 if the call being activated is the only one in the system.

See also activateHeldCallsCommand(), putOnHoldCommand(), and QModemCall::activate().

QString QModemCallProvider::activateHeldCallsCommand () const   [virtual protected]

Returns the AT command to use to place the currently active calls on hold and activate the held calls. The default implementation returns AT+CHLD=2.

See also activateCallCommand(), putOnHoldCommand(), and QModemCall::activate().

QAtChat * QModemCallProvider::atchat () const

Returns the AT chat handler for this modem call provider.

QModemCallProvider::AtdBehavior QModemCallProvider::atdBehavior () const   [virtual protected]

Returns the behavior of the ATD modem command when dialing voice calls.

The defined behavior in 3GPP TS 27.007 is for the ATD command to immediately return to command mode when it has a trailing semi-colon (i.e. ATDnumber;), even if the call has not yet connected. Not all modems support this correctly.

This function can be used to alter how the system uses the ATD command when dialing voice calls to accommodate non-standard modems.

AtdOkIsConnect indicates that ATD blocks until the call has connected before reporting OK. AtdOkIsDialing and AtdOkIsDialingWithStatus indicates that the modem obeys 3GPP TS 27.007 and returns immediately to command mode.

In the case of AtdOkIsDialing, the AT+CLCC command is polled to determine when the call transitions from dialing to connected. The modem vendor plug-in can avoid polling if it has call status tracking. In that case it should return AtdOkIsDialingWithStatus from this function and call setState() once the transition occurs.

AtdUnknown indicates that it is not known which of these modes is supported by the modem. A separate AT+CLCC command is used to determine what state the call is actually in once ATD reports OK.

The default implementation returns AtdUnknown.

See also QModemCallProvider::AtdBehavior.

QModemCall * QModemCallProvider::callForIdentifier ( uint id ) const

Returns the phone call associated with modem identifier id. Returns null if there is no such call.

QString QModemCallProvider::deflectCallCommand ( const QString & number ) const   [virtual protected]

Returns the AT command to use to deflect the incoming call to number. The default implementation returns AT+CTFR=number.

See also QModemCall::transfer().

QString QModemCallProvider::dialServiceCommand ( const QDialOptions & options ) const   [virtual protected]

Returns the AT command to use to dial the supplementary service specified by options. The default implementation returns ATDnumber.

See also dialVoiceCommand().

QString QModemCallProvider::dialVoiceCommand ( const QDialOptions & options ) const   [virtual protected]

Returns the AT command to use to dial the voice call specified by options. The default implementation returns ATDnumber[i][g]; where the i flag indicates the caller ID disposition and the g flag indicates the closed user group disposition.

See also QDialOptions::number(), QDialOptions::callerId(), QDialOptions::closedUserGroup(), and dialServiceCommand().

QModemCall * QModemCallProvider::dialingCall () const

Returns the phone call object associated with the current dialing or alerting call. Returns null if there is no such call.

See also incomingCall().

QStringList QModemCallProvider::gprsSetupCommands () const   [virtual protected]

Returns the AT commands to use to set up a GPRS session. The returned list should not contain AT+CGDCONT and ATD*99***1# as these commands are automatically inserted. The default Implementation returns AT+CGATT=1.

void QModemCallProvider::hangupRemote ( QModemCall * call )   [slot]

Called by the modem vendor plug-in to indicate that it in determined that call was hung up remotely. This is usually called in response to a proprietary unsolicited result code.

If call is null, then the modem vendor plug-in has determined that the active call has hung up but it was unable to be any more precise than that.

See also QModemCall::hangup().

bool QModemCallProvider::hasRepeatingRings () const   [virtual protected]

Returns true if the modem automatically re-sends RING every few seconds while a call is incoming, and stops sending RING if the caller hangs up. Returns false if the modem does not resend RING every few seconds and instead uses some other mechanism to notify Qt Extended that a remote hangup has occurred. The default return value is true.

See also ringing().

QModemCall * QModemCallProvider::incomingCall () const

Returns the phone call object associated with the current incoming call. Returns null if there is no incoming call.

See also dialingCall().

QString QModemCallProvider::joinCallsCommand ( bool detachSubscriber ) const   [virtual protected]

Returns the AT command to use to join the active and held calls into a single multi-party conversation. If detachSubscriber is true, then detach the local party from the conversation after joining the calls. Returns AT+CHLD=4 if detachSubscriber is true, or AT+CHLD=3 otherwise.

See also QModemCall::join().

QSerialIODeviceMultiplexer * QModemCallProvider::multiplexer () const

Returns the serial multiplexer for this modem call provider.

uint QModemCallProvider::nextModemIdentifier ()

Allocates the next modem identifier in rotation that is not currently used by a call.

bool QModemCallProvider::partOfHoldGroup ( const QString & type ) const   [virtual protected]

Returns true if a particular kind of call is part of the normal hold group. On some systems, video calls are separate from the call grouping for voice and fax calls. Returns true only for Voice by default. The type parameter indicates the type of call (Voice, Video, Fax, etc).

QString QModemCallProvider::putOnHoldCommand () const   [virtual protected]

Returns the AT command to use to put the currently active calls on hold. The default implementation returns AT+CHLD=2.

See also activateCallCommand(), activateHeldCallsCommand(), and QModemCall::hold().

QString QModemCallProvider::releaseActiveCallsCommand () const   [virtual protected]

Returns the AT command to use to release all active calls. The default implementation returns AT+CHLD=1.

See also releaseCallCommand() and releaseHeldCallsCommand().

QString QModemCallProvider::releaseCallCommand ( uint modemIdentifier ) const   [virtual protected]

Returns the AT command to use to release the call modemIdentifier. The default implementation returns AT+CHLD=1modemIdentifier.

See also releaseActiveCallsCommand() and releaseHeldCallsCommand().

QString QModemCallProvider::releaseHeldCallsCommand () const   [virtual protected]

Returns the AT command to use to release all held calls. The default implementation returns AT+CHLD=0.

See also releaseCallCommand() and releaseActiveCallsCommand().

void QModemCallProvider::resetModem ()   [virtual protected slot]

Called when the modem resets after PIN entry, to initialize the call provider.

QString QModemCallProvider::resolveCallMode ( int mode ) const   [virtual protected]

Resolves a call mode as reported by the AT+CLCC command.

See also resolveRingType().

QString QModemCallProvider::resolveRingType ( const QString & type ) const   [virtual protected]

Resolves a call type on a "+CRING" notification into the particular type of call that it represents. The type is guaranteed to be in lower case on entry to this function.

See also resolveCallMode().

void QModemCallProvider::ringing ( const QString & number, const QString & callType, uint modemIdentifier = 0 )   [slot]

Sets the ringing state in the phone library, indicating a call from number of the type callType. Modem vendor plug-ins call this if the modem reports incoming calls with something other than RING or +CRING.

Either number or callType may be empty indicating that the information is not available yet. The information may become available shortly on a different unsolicited result code (e.g. +CLIP or +CCWA).

If modemIdentifier is not zero, it indicates the modem identifier for the call. If modemIdentifier is zero, the next available modem identifier is used.

See also QModemCall::callType(), QModemCall::number(), QModemCall::modemIdentifier(), and hasRepeatingRings().

QModemService * QModemCallProvider::service () const

Returns the modem service that this call provider is associated with.

QString QModemCallProvider::setBusyCommand () const   [virtual protected]

Returns the AT command to use to reject the incoming call and set the busy state for the caller. The default implementation returns AT+CHLD=0.

See also acceptCallCommand() and QModemCall::hangup().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3