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

QPhoneCallImpl Class Reference
[QtTelephonyModule]

The QPhoneCallImpl class provides a base class for specific phone call implementations. More...

    #include <QPhoneCallImpl>

Inherits QObject.

Inherited by QModemCall.

Public Types

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QPhoneCallImpl class provides a base class for specific phone call implementations.

Phone call providers (e.g. GSM and VoIP) inherit from the QPhoneCallProvider class and override the create() method to create a QPhoneCallImpl instance that is specific to their requirements.

The QPhoneCallProvider class provides the infrastructure to receive requests from client applications and dispatch them to the appropriate methods on QPhoneCallImpl. As the calls change state, the state information is sent back to the client applications.

Client applications should use QPhoneCall and QPhoneCallManager to make and receive phone calls. Only the server-side providers need to use QPhoneCallProvider and QPhoneCallImpl.

For AT-based modems, phone call providers should consider using QModemCall instead of QPhoneCallImpl.

See also QPhoneCallProvider and QModemCall.


Member Type Documentation

enum QPhoneCallImpl::Action
flags QPhoneCallImpl::Actions

This enum defines actions that a phone call can perform in its current state.

ConstantValueDescription
QPhoneCallImpl::None0No actions are possible.
QPhoneCallImpl::Accept0x0001Incoming call that can be accepted.
QPhoneCallImpl::Hold0x0002Connected call that can be put on hold.
QPhoneCallImpl::ActivateCall0x0004Held call that can be individually activated.
QPhoneCallImpl::ActivateGroup0x0008Held call that can be activated with its group.
QPhoneCallImpl::Join0x0010Call which can be joined to a multi-party conversation.
QPhoneCallImpl::JoinAndDetach0x0020Call which can be joined to a multi-party conversation, with the local user being detached.
QPhoneCallImpl::Tone0x0040DTMF tones are possible on this connected call.
QPhoneCallImpl::Transfer0x0080Call can be transferred to another number.

The Actions type is a typedef for QFlags<Action>. It stores an OR combination of Action values.


Member Function Documentation

QPhoneCallImpl::QPhoneCallImpl ( QPhoneCallProvider * provider, const QString & identifier, const QString & callType )

Creates a new phone call implementation object and attaches it to provider. The identifier is a globally-unique value that identifies the call. If identifier is empty, then this constructor will allocate a new identifier.

The callType indicates the type of call to be constructed (Voice, Data, Fax, VoIP, etc).

QPhoneCallImpl::~QPhoneCallImpl ()   [virtual]

Destroys this phone call implementation object. Providers should not delete call implementation objects themselves. The objects will be automatically deleted when the call transitions into an end state (HangupLocal, HangupRemote, Missed, etc), or when the QPhoneCallProvider that owns this object is deleted.

void QPhoneCallImpl::accept ()   [virtual]

Accepts an incoming call. The call must be in the Incoming state. The default implementation does nothing.

QPhoneCallImpl::Actions QPhoneCallImpl::actions () const

Returns the actions that can be performed on this call in its current state.

See also setActions().

void QPhoneCallImpl::activate ( QPhoneCall::Scope scope )   [virtual]

Activates this call and takes it off hold. The scope indicates whether the activation relates to this call only (QPhoneCall::CallOnly), or the entire call group (QPhoneCall::Group). The default implementation does nothing.

QString QPhoneCallImpl::callType () const

Returns the call type for this call. The callType indicates the type of call to be constructed (Voice, Data, Fax, VoIP, etc).

See also QPhoneCall::callType().

int QPhoneCallImpl::dataPort () const

Returns the data port that will be used for passing the body of a data call to client applications. Returns -1 if not set.

See also setDataPort().

void QPhoneCallImpl::dial ( const QDialOptions & options )   [virtual]

Dials a call according to the specified options. The default implementation sets number() to the value specified in options, but does not do anything else.

See also QDialOptions.

void QPhoneCallImpl::emitNotification ( QPhoneCall::Notification type, const QString & value )

Emits the notification() signal with the parameters type and value.

This is a public method that emits the protected notification() signal. It is intended for use in QPhoneCallProvider implementations.

See also notification().

void QPhoneCallImpl::floorChanged ( bool haveFloor, bool floorAvailable )   [signal]

Signal that is emitted when the floor state changes to haveFloor in response to a requestFloor(), releaseFloor(), or implicit release. Also emitted when the upstream floorAvailable state changes.

void QPhoneCallImpl::hangup ( QPhoneCall::Scope scope )   [virtual]

Hangs up this call and/or all other calls of its type (active/held). The scope indicates whether the hangup relates to this call only (QPhoneCall::CallOnly), or the entire call group (QPhoneCall::Group). The default implementation does nothing.

void QPhoneCallImpl::hold ()   [virtual]

Puts this call on hold. The default implementation fails the request indicating that hold is not supported by emitting the requestFailed() signal.

QString QPhoneCallImpl::identifier () const

Returns the globally-unique identifier that is associated with this call.

void QPhoneCallImpl::join ( bool detachSubscriber )   [virtual]

Joins the active and held calls together and makes them all active. If detachSubscriber is true, then the current subscriber is detached from the conversation. The default implementation fails the request indicating that join is not supported by emitting the requestFailed() signal.

void QPhoneCallImpl::notification ( QPhoneCall::Notification type, const QString & value )   [signal]

Signal that is emitted when the auxiliary notification type is set to value.

See also emitNotification().

QString QPhoneCallImpl::number () const

Returns the phone number associated with the party on the other end of this call. Returns an empty string if the other party is unknown (e.g. caller id is disabled).

See also setNumber().

QPhoneCallProvider & QPhoneCallImpl::provider () const

Returns the provider that is associated with this call.

void QPhoneCallImpl::releaseFloor ()   [virtual]

Releases the floor in a voice group call. The floorChanged() signal should be emitted when the floor state changes. If the phone call type does not support the floor, this function should do nothing.

void QPhoneCallImpl::requestFailed ( QPhoneCall::Request request )   [signal]

Signal that is emitted when a specific type of request fails.

See also hold() and join().

void QPhoneCallImpl::requestFloor ( int secs )   [virtual]

Requests the floor in a voice group call for secs seconds. After the timeout, the floor will be automatically released.

If secs is -1, then requests the floor until explicitly released by a call to releaseFloor().

The floorChanged() signal should be emitted when the floor state changes.

void QPhoneCallImpl::setActions ( QPhoneCallImpl::Actions actions )   [virtual]

Sets the actions that can be performed on this call. This should be called before setState() as the actions are only advertised to client applications when the state changes.

See also actions() and setState().

void QPhoneCallImpl::setDataPort ( int port )

Sets the data port that will be used for passing the body of a data call to client applications to port. This should be set before changing the call's state to QPhoneCall::Connected with setState().

See also dataPort().

void QPhoneCallImpl::setNumber ( const QString & number )   [virtual]

Sets the phone number associated with this call. This should be set on an outgoing call before setting the state to QPhoneCall::Dialing, and on an incoming call before setting the state to QPhoneCall::Incoming.

See also number().

void QPhoneCallImpl::setState ( QPhoneCall::State state )   [virtual]

Sets the call's state and emits the stateChanged() signal. If the call has already ended, the state change will be ignored.

Once the call ends, the QPhoneCallProvider will arrange for this object to be deleted upon the next entry to the event loop.

See also state() and stateChanged().

QPhoneCall::State QPhoneCallImpl::state () const

Returns the state that this call is currently in.

See also setState(), stateChanged(), and QPhoneCall::state().

void QPhoneCallImpl::stateChanged ()   [signal]

Signal that is emitted when the call's state changes.

See also state() and setState().

void QPhoneCallImpl::tone ( const QString & tones )   [virtual]

Sends a sequence of DTMF tones over the call. Ignored if the call is not connected, or it is on hold. The default implementation does nothing.

void QPhoneCallImpl::transfer ( const QString & number )   [virtual]

Transfers the call to a new number and then discontinues this call. The default implementation fails the request indicating that transfer is not supported by emitting the requestFailed() signal.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3