Qtopia Home - Classes - Annotated - Functions - Qt Embedded

PhoneLine Class Reference

Implementation of a single "phone line". More...

#include <phone.h>

List of all member functions.

Public Members

Signals

Static Public Members


Detailed Description

Implementation of a single "phone line".

The PhoneLine class abstracts the idea of a single "line" on the local device. Phones will normally only have one line, but it is theoretically possible to have multiple lines, each with its own list of calls. QString::null is used in the constructor to refer to the default line.

The PhoneLine class keeps a list of all "active" calls: those that are dialing, incoming, or connected. Idle and dropped calls are not reported in this list, and the underlying object will disappear when the last PhoneCall reference is dropped.

[Aside: identifier instances are used to represent calls because of race conditions. e.g. a pending call arrives, the user accepts, but before the request can be fully processed, the other party hangs up and the real call object disappears. The identifier system avoids dangling references to deallocated objects. Requests to inactive calls will always "fail safe".]

Because of race conditions, callers should not assume that a request (hangup, accept, etc) succeeded without error. Callers should use the state() function to query the actual state after the request.

See also PhoneCall, PhoneUtils and Qtopia Phone Classes.


Member Function Documentation

PhoneCall PhoneLine::active () const

Returns the currently active call. That is, the call that is connected and not on hold. PhoneCall::null if there is no active call.

QValueList<PhoneCall> PhoneLine::calls () const

Returns a list of all active calls on this line. Active calls are those that are dialing, incoming, or connected. Idle and dropped calls are not included in this list.

PhoneCall PhoneLine::createCall ()

Create a new call in the "idle" state, ready to dial. This will not appear in the "calls()" list until it is actually dialed.

void PhoneLine::modify ( QueryType type, const QString & value )

Modify a particular piece of information for this line.

QString PhoneLine::name () const

Return the name of this line.

PhoneBook * PhoneLine::phoneBook ()

Returns the phone book manager for the phone line.

SimToolkit * PhoneLine::simToolkit ()

Returns the SIM toolkit handler for the phone line.

SMSRequest * PhoneLine::sms ()

Returns the SMS request handler for the phone line.

void PhoneLine::startData ( const QString & number, const QStringList & initCmds, const QStringList & moduleArgs, bool persist )

Start a new data call.

The initCmds argument is a list of AT commands to send before dialing to initialize the data call.

The moduleArgs argument is the full list of command-line options to launch the data protocol module (e.g. pppd).

If persist is set to TRUE, then it indicates that pppd should be started, but the dial process should not happen yet. The dial will happen only when pppd detects TCP/IP network activity.

void PhoneLine::stopData ()

Stop an active data call, killing the protocol module (e.g. pppd) that is handling it.

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