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 }
enum
Scope { CallOnly, Group }
enum
Request { HoldFailed, JoinFailed }
enum CallType { Voice, Data, Fax }
PhoneCall &
operator= ( const PhoneCall & call )
PhoneLine &
line () const
bool idle () const
bool incoming () const
bool dialing () const
bool connected () const
bool onHold () const
bool dropped () const
bool missed () const
void
dial ( const QString & number, bool sendcallerid )
void hangup ( Scope scope = Group )
void activate ( Scope scope = Group )
void
join ( bool detachSubscriber = FALSE )
void
tone ( const QString & tones )
void
transfer ( const QString & number )
void connectStateChanged ( QObject *, const char * )
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::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.
Member Function Documentation
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::connectPendingTonesChanged ( QObject * object, const char * slot )
Register a slot to receive notification of state changes. The signal
prototype is "stateChanged( 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::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.
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 )".
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.
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.
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.
QString PhoneCall::number () const
Get the phone number of the remote party. QString::null if unknown.
PhoneCall & PhoneCall::operator= ( const PhoneCall & call )
Copy call object.
QString PhoneCall::pendingTones () const
Returns the pending tones for this call.
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-2004
Trolltech, all rights reserved.
| Copyright © 2001-2004 Trolltech
| Trademarks
| Qtopia version 2.0.1
|