PhoneCall Class Reference
Implementation of a single incoming or outgoing phone call.
More...
#include <phone.h>
List of all member functions.
Public Members
- PhoneCall ()
- PhoneCall ( const PhoneCall & call )
- ~PhoneCall ()
- enum State { Idle, Incoming, Dialing, Connected, Hold, HangupLocal, HangupRemote, Missed, NetworkFailure, OtherFailure, ServiceHangup }
- enum Scope { CallOnly, Group }
- enum Request { HoldFailed, JoinFailed }
- enum CallType { Voice, Data, Fax, Video }
- enum Notification { CallingName }
- int id () const
- PhoneCall & operator= ( const PhoneCall & call )
- PhoneLine & line () const
- PhoneLineType getLineType ()
- QString fullNumber () const
- QString number () const
- QUuid contact () const
- void setContact ( const QUuid & cnt )
- State state () const
- CallType callType () const
- QDateTime startTime () const
- QDateTime endTime () const
- bool hasBeenConnected () const
- bool idle () const
- bool incoming () const
- bool dialing () const
- bool connected () const
- bool onHold () const
- bool dropped () const
- bool missed () const
- bool dialed () const
- QString pendingTones () const
- void dial ( const QString & number, bool sendcallerid )
- void accept ()
- void hangup ( Scope scope = Group )
- void hold ()
- void activate ( Scope scope = Group )
- void join ( bool detachSubscriber = FALSE )
- void tone ( const QString & tones )
- void transfer ( const QString & number )
- void connectPendingTonesChanged ( QObject * object, const char * slot )
- void connectStateChanged ( QObject * object, const char * slot )
- void disconnectStateChanged ( QObject * object, const char * slot )
- void connectRequestFailed ( QObject * object, const char * slot )
- void disconnectRequestFailed ( QObject * object, const char * slot )
- void connectNotification ( QObject * object, const char * slot )
- void disconnectNotification ( QObject * object, const char * slot )
Detailed Description
Implementation of a single incoming or outgoing phone call.
The PhoneCall 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. PhoneCall instances act
as identifiers for actual call objects. The actual object disappears
when the last identifier instance is dropped.
See also PhoneLine, PhoneUtils, and Qtopia Phone Classes.
Member Type Documentation
PhoneCall::Notification
Defines auxillary value notifications that may be associated
with a phone call.
- PhoneCall::CallingName - The name of the calling party.
PhoneCall::Request
Defines the Request types, for reporting failures.
- PhoneCall::HoldFailed
- PhoneCall::JoinFailed
PhoneCall::Scope
Defines the scope of an operation.
- PhoneCall::CallOnly - Only the referenced call.
- PhoneCall::Group - All calls in the same active/held group.
PhoneCall::State
This enum defines the different states a phonecall can have.
- PhoneCall::Idle - New outgoing call, not dialed yet.
- PhoneCall::Incoming - Incoming connection from remote party.
- PhoneCall::Dialing - Dialing, but not yet connected.
- PhoneCall::Connected - Connected to the other party.
- PhoneCall::Hold - Connected, but currently on hold.
- PhoneCall::HangupLocal - Local side hung up the call.
- PhoneCall::HangupRemote - Remote side hung up the call, or call lost.
- PhoneCall::Missed - Incoming call that was missed.
- PhoneCall::NetworkFailure - Network has failed in some way.
- PhoneCall::OtherFailure - Something else went wrong.
- PhoneCall::ServiceHangup - Supplementary service request caused the
call to "hangup", notifying higher layers that the
request has been sent.
Member Function Documentation
PhoneCall::PhoneCall ()
Construct a new phone call object, initially in the Idle state.
PhoneCall::PhoneCall ( const PhoneCall & call )
Construct a copy of call.
PhoneCall::~PhoneCall ()
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 PhoneCall::accept ()
Accept an incoming call (must be in the Incoming state).
All active calls are automatically put on hold.
CallType PhoneCall::callType () const
Get the type of call (voice, data, etc).
void PhoneCall::connectNotification ( QObject * object, const char * slot )
Register a slot to receive notification of auxillary values that
are associated with a call. The signal prototype is
"notification( const PhoneCall& call, Notification type, const QString& value )".
void PhoneCall::connectPendingTonesChanged ( QObject * object, const char * slot )
Register a slot to receive notification of pending tones changes. The signal
prototype is "pendingTonesChanged( const PhoneCall& call )".
void PhoneCall::connectRequestFailed ( QObject * object, const char * slot )
Register a slot to receive notification of request failures. The signal
prototype is "requestFailed( const PhoneCall& call, Request request )".
void PhoneCall::connectStateChanged ( QObject * object, const char * slot )
Register a slot to receive notification of state changes. The signal
prototype is "stateChanged( const PhoneCall& call )".
bool PhoneCall::connected () const
Determine if the phone call is currently in the Connected or Hold states.
QUuid PhoneCall::contact () const
Get the contact UID of the remote party, if known. QUuid::null if unknown.
void PhoneCall::dial ( const QString & number, bool sendcallerid )
Dial a number on this call (must be in the Idle state).
The user must ensure there is space for this call on the PhoneLine.
If sendcallerid is TRUE, the caller ID is enabled
(on the assumption that it is normally disabled).
bool PhoneCall::dialed () const
Returns TRUE if this call was dialed, FALSE otherwise.
bool PhoneCall::dialing () const
Determine if the phone call is currently in the Dialing state.
void PhoneCall::disconnectNotification ( QObject * object, const char * slot )
Un-register a slot to receive notification of auxillary values. The signal
prototype is "notification( const PhoneCall& call, Notification type, const QString& value )".
void PhoneCall::disconnectRequestFailed ( QObject * object, const char * slot )
Un-register a slot to receive notification of request failures. The signal
prototype is "requestFailed( const PhoneCall& call, Request request )".
void PhoneCall::disconnectStateChanged ( QObject * object, const char * slot )
Un-register a slot to receive notification of state changes. The signal
prototype is "stateChanged( const PhoneCall& call )".
bool PhoneCall::dropped () const
Determine if the phone call is currently "dropped". That is, no longer
connected because of normal call termination, network error, etc.
Use PhoneCall::state() to determine the precise reason why the call
was dropped.
QDateTime PhoneCall::endTime () const
Returns the date and time this called ended.
If the call never connected a null QDateTime is returned.
QString PhoneCall::fullNumber () const
Get the full number of the remote party. This is the literal number that was
dialed including affixes. QString::null if unknown.
PhoneLineType PhoneCall::getLineType ()
Returns the line Type GSM or VOIP.
bool PhoneCall::hasBeenConnected () const
Returns TRUE if this call has been in the state PhoneCall::Connected
at some stage, otherwise FALSE.
void PhoneCall::hold ()
Put this active call, and all other active calls, on hold.
If there were calls on hold or waiting, then activate them.
int PhoneCall::id () const
Returns the id of this phone call. This is a unique integer among
all PhoneCall objects across all lines.
bool PhoneCall::idle () const
Determine if the phone call is currently in the Idle state.
bool PhoneCall::incoming () const
Determine if the phone call is currently in the Incoming state.
void PhoneCall::join ( bool detachSubscriber = FALSE )
Join the active and held calls together and make them all active.
PhoneLine & PhoneCall::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 PhoneCall::missed () const
Determine if the phone call is currently in the Missed state.
QString PhoneCall::number () const
Get the phone number of the remote party. QString::null if unknown.
bool PhoneCall::onHold () const
Determine if the phone call is currently in the Hold state.
PhoneCall & PhoneCall::operator= ( const PhoneCall & call )
Copy call object.
QString PhoneCall::pendingTones () const
Returns the pending tones for this call.
void PhoneCall::setContact ( const QUuid & cnt )
Sets the contact UID of the remote party
QDateTime PhoneCall::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 PhoneCall::state () const
Return the state of this call.
void PhoneCall::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 PhoneCall::transfer ( const QString & number )
Transfer the call to a new number and then discontinue this call.
This file is part of the Qtopia platform,
copyright © 1995-2005
Trolltech, all rights reserved.
| Copyright © 2005 Trolltech
| Trademarks
| Qtopia version 2.2.0
|