Home · All Classes · Annotated · Functions

QPhoneCall Class Reference

The QPhoneCall class provides an interface to incoming or outgoing phone calls. More...

#include <QPhoneCall>

Public Types

Public Functions


Detailed Description

The QPhoneCall class provides an interface to incoming or outgoing phone calls.

The QPhoneCall class refers to a single outgoing or incoming on a phone line. Calls may be in a number of states: idle, dialing, incoming, connected, hold, hangup, etc. QPhoneCall instances act as identifiers for actual call objects. The actual object disappears when the last identifier instance is dropped.

See also QPhoneLine and QPhoneUtils.


Member Type Documentation

enum QPhoneCall::CallType

Defines the types of phone calls that may occur in the system.

ConstantValueDescription
QPhoneCall::Voice0Ordinary voice telephone call
QPhoneCall::Data1Data call
QPhoneCall::Fax2Fascimile call
QPhoneCall::Video3Video call
QPhoneCall::VoIP4Voice-Over-IP call
QPhoneCall::Other5Some other unspecified type of call

enum QPhoneCall::Notification

Defines auxillary value notifications that may be associated with a phone call.

ConstantValueDescription
QPhoneCall::CallingName0The name of the calling party.

enum QPhoneCall::Request

Defines the Request types, for reporting failures.

ConstantValue
QPhoneCall::HoldFailed0
QPhoneCall::JoinFailed1

enum QPhoneCall::Scope

Defines the scope of an operation.

ConstantValueDescription
QPhoneCall::CallOnly0Only the referenced call.
QPhoneCall::Group1All calls in the same active/held group.

enum QPhoneCall::State

This enum defines the different states a phonecall can have.

ConstantValueDescription
QPhoneCall::Idle0New outgoing call, not dialed yet.
QPhoneCall::Incoming1Incoming connection from remote party.
QPhoneCall::Dialing2Dialing, but not yet connected.
QPhoneCall::Connected3Connected to the other party.
QPhoneCall::Hold4Connected, but currently on hold.
QPhoneCall::HangupLocal5Local side hung up the call.
QPhoneCall::HangupRemote6Remote side hung up the call, or call lost.
QPhoneCall::Missed7Incoming call that was missed.
QPhoneCall::NetworkFailure8Network has failed in some way.
QPhoneCall::OtherFailure9Something else went wrong.
QPhoneCall::ServiceHangup10Supplementary service request caused the call to "hangup", notifying higher layers that the request has been sent.


Member Function Documentation

QPhoneCall::QPhoneCall ()

Construct a new phone call object, initially in the Idle state.

QPhoneCall::QPhoneCall ( const QPhoneCall & call )

Construct a copy of call.

QPhoneCall::~QPhoneCall ()

Destruct a phone call object. This will not destroy or hangup the actual underlying phone call, which will persist until hung up by the user or some other action.

void QPhoneCall::accept ()

Accept an incoming call (must be in the Incoming state). All active calls are automatically put on hold.

void QPhoneCall::activate ( QPhoneCall::Scope scope = Group )

Activate this call and take it off hold. The scope indicates whether the activation relates to this call only (CallOnly), or the entire call group (Group).

CallType QPhoneCall::callType () const

Get the type of call (voice, data, etc).

void QPhoneCall::connectNotification ( QObject * object, const char * slot )

Register the specified slot on object to receive notification of auxillary values that are associated with a call. The signal prototype is "notification( const QPhoneCall& call, Notification type, const QString& value )".

void QPhoneCall::connectPendingTonesChanged ( QObject * object, const char * slot )

Register a specified slot on object to receive notification of pending tones changes. The signal prototype is "pendingTonesChanged( const QPhoneCall& call )".

void QPhoneCall::connectRequestFailed ( QObject * object, const char * slot )

Register a specified slot on object to receive notification of request failures. The signal prototype is "requestFailed( const QPhoneCall& call, Request request )".

void QPhoneCall::connectStateChanged ( QObject * object, const char * slot )

Register a specified slot on object to receive notification of state changes. The signal prototype is "stateChanged( const QPhoneCall& call )".

bool QPhoneCall::connected () const

Determine if the phone call is currently in the Connected or Hold states.

QUniqueId QPhoneCall::contact () const

Get the uid of the contact of the remote party. QUniqueId() if unknown.

void QPhoneCall::dial ( const QString & number, bool sendcallerid, const QUniqueId & contact = QUniqueId() )

Dial a number on this call (must be in the Idle state). The user must ensure there is space for this call on the QPhoneLine.

If a contact is specified, it is used to display information on the callee, and will be stored as part of the call history.

If sendcallerid is true, the caller ID is enabled (on the assumption that it is normally disabled).

bool QPhoneCall::dialed () const

Returns true if this call was dialed, false otherwise.

bool QPhoneCall::dialing () const

Determine if the phone call is currently in the Dialing state.

void QPhoneCall::disconnectNotification ( QObject * object, const char * slot )

Un-register the specified slot on object to receive notification of auxillary values. The signal prototype is "notification( const QPhoneCall& call, Notification type, const QString& value )".

void QPhoneCall::disconnectRequestFailed ( QObject * object, const char * slot )

Un-register a specified slot on object to receive notification of request failures. The signal prototype is "requestFailed( const QPhoneCall& call, Request request )".

void QPhoneCall::disconnectStateChanged ( QObject * object, const char * slot )

Un-register a specified slot on object to receive notification of state changes. The signal prototype is "stateChanged( const QPhoneCall& call )".

bool QPhoneCall::dropped () const

Determine if the phone call is currently "dropped". That is, no longer connected because of normal call termination, network error, etc. Use QPhoneCall::state() to determine the precise reason why the call was dropped.

QDateTime QPhoneCall::endTime () const

Returns the date and time this called ended. If the call never connected a null QDateTime is returned.

QString QPhoneCall::fullNumber () const

Get the full number of the remote party. This is the literal number that was dialed including affixes. QString() if unknown.

void QPhoneCall::hangup ( QPhoneCall::Scope scope = Group )

Hangup this call and/or all other calls of its type (active/held). The scope indicates whether the hangup relates to this call only (CallOnly), or the entire call group (Group).

bool QPhoneCall::hasBeenConnected () const

Returns true if this call has been in the state QPhoneCall::Connected at some stage, otherwise false.

void QPhoneCall::hold ()

Put this active call, and all other active calls, on hold. If there were calls on hold or waiting, then activate them.

int QPhoneCall::id () const

Returns the id of this phone call. This is a unique integer among all QPhoneCall objects across all lines. This identifier will never be negative.

bool QPhoneCall::idle () const

Determine if the phone call is currently in the Idle state.

bool QPhoneCall::incoming () const

Determine if the phone call is currently in the Incoming state.

void QPhoneCall::join ( bool detachSubscriber = false )

Join the active and held calls together and make them all active. If detachSubscriber is true, then the current subscriber is detached from the conversation.

QPhoneLine & QPhoneCall::line () const

Get the phone line that was used to create this call object. The return value will be invalid if this is a null call.

bool QPhoneCall::missed () const

Determine if the phone call is currently in the Missed state.

QString QPhoneCall::number () const

Get the phone number of the remote party. QString() if unknown.

bool QPhoneCall::onHold () const

Determine if the phone call is currently in the Hold state.

QString QPhoneCall::pendingTones () const

Returns the pending tones for this call.

QDateTime QPhoneCall::startTime () const

Returns the date and time that this called started. For calls that are never connected this is the time the call was activated. For calls that connected, this is the connection time.

State QPhoneCall::state () const

Return the state of this call.

void QPhoneCall::tone ( const QString & tones )

Send a sequence of DTMF tones over the call. Ignored if the call is not connected, or it is on hold.

void QPhoneCall::transfer ( const QString & number )

Transfer the call to a new number and then discontinue this call.

QPhoneCall & QPhoneCall::operator= ( const QPhoneCall & call )

Copy call object.


Copyright © 2006 Trolltech Trademarks
Qtopia 4.1.7