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

QModemCall Class Reference
[QtCellModule]

The QModemCall class implements phone call functionality for AT-based modems. More...

    #include <QModemCall>

Inherits QPhoneCallImpl.

Inherited by QModemDataCall.

Public Functions

Additional Inherited Members


Detailed Description

The QModemCall class implements phone call functionality for AT-based modems.

QModemCall inherits from QPhoneCallImpl to provide the back end server infrastructure for QPhoneCall.

Client applications should use QPhoneCall and QPhoneCallManager to make and receive phone calls. The QModemCall class is intended for the server-side modem telephony service.

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:

The following example demonstrates overriding the hold() method to use a proprietary modem command instead of the standard AT+CHLD=2:

    class MyModemCall : public QModemCall
    {
        Q_OBJECT
    public:
        MyModemCall( QModemCallProvider *provider,
                     const QString& identifier,
                     const QString& callType )
            : QModemCall( provider, identifier, callType ) {}

        void hold();
    }

    void MyModemCall::hold()
    {
        if ( state() == QPhoneCall::Connected ) {
            provider()->atchat()->chat( "AT*XHLD=2" );
            setActions( QPhoneCallImpl::ActivateCall );
            setState( QPhoneCall::Hold );
        }
    }

For voice calls, there is an alternative way to modify the AT commands that correspond to voice call operations. Methods in QModemCallProvider() such as QModemCallProvider::dialVoiceCommand(), QModemCallProvider::putOnHoldCommand(), etc. can be overridden to change just the AT command without modifying the rest of the logic in QModemCall. This will usually be an easier way to modify the AT commands than inheriting from QModemCall.

See also QPhoneCallImpl, QPhoneCall, QModemDataCall, and QModemCallProvider.


Member Function Documentation

QModemCall::QModemCall ( QModemCallProvider * provider, const QString & identifier, const QString & callType )

Constructs a new modem call that is attached to provider and is associated with a globally-unique identifier. The callType specifies the type of call (Voice, Data, Fax, etc).

This constructor is called from QModemCallProvider::create() or from a subclass implementation that overrides QModemCallProvider::create().

QModemCall::~QModemCall ()

Destroys this modem call object.

uint QModemCall::modemIdentifier () const

Returns the modem identifier associated with this call. Modem identifiers are used with commands like AT+CHLD to identify specific calls. Returns zero if the modem identifier has not been assigned yet.

See also setModemIdentifier() and QPhoneCall::modemIdentifier().

QModemCallProvider * QModemCall::provider () const

Returns the QModemCallProvider instance associated with this call object.

void QModemCall::setConnected ()

Called by modem vendor plug-ins to indicate that a call has transitioned from Dialing or Alerting to Connected.

The QModemCall class adjusts the call's state() and actions() appropriately and emits the relevant signals. The state() and actions() on other calls may also be affected, indicating new actions that can be taken now that there are several calls in the system.

See also state() and actions().

void QModemCall::setModemIdentifier ( uint id )

Sets the modem identifier associated with this call to id. The QModemCallProvider::nextModemIdentifier() function can be used to assign the next call identifier in rotation.

See also modemIdentifier() and QPhoneCall::modemIdentifier().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3