Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded

PhoneLine Class Reference

Class handling the implementation of a single phoneline. More...

#include <phone.h>

List of all member functions.

Public Members

Signals

Static Public Members


Detailed Description

Class handling the implementation of a single phoneline.

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 Type Documentation

PhoneLine::ClassX

This enum lists values that may appear in PhoneLine::ForwardRec::classx.

PhoneLine::QueryType

This enum defines a number of phone features whose values can be queried or modified by applications. Unless otherwise specified, the format of the queried values will follow the GSM 07.07 and GSM 07.05 response specifications for the AT commands listed in parentheses.

Member Function Documentation

PhoneLine::PhoneLine ( const QString & name = QString::null, QObject * parent = 0 )

Create a new phone line object. Normally name will be QString::null in application programs.

PhoneLine::~PhoneLine ()

Destruct a PhoneLine object.

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.

QString PhoneLine::formatBarring ( bool enable, const QString & password = QString::null ) [static]

Format a request for a modify operation on one of the barr settings (BarrAllOutgoing, BarrIncomingWhenRoaming, etc).

QString PhoneLine::formatCallWaiting ( bool enable, int classx ) [static]

Format the value to use in a PhoneLine::CallWaiting modify to enable or disable a call waiting feature. The classx parameter should be one of PhoneLine::Voice, PhoneLine::Data, or PhoneLine::Fax.

QString PhoneLine::formatCallerIdRestriction ( bool on ) [static]

Format the value for a PhoneLine::CallerIdRestriction modify. The on parameter should be set to true if the caller ID restriction is suppressed, or false if it is invoked.

QString PhoneLine::formatChangePassword ( const QString & oldPassword, const QString & newPassword ) [static]

Format the value to use in a password modification request.

QString PhoneLine::formatChannels ( QValueList<int> channels ) [static]

Format a list of cell broadcast channels for a PhoneLine::Channels modify.

QString PhoneLine::formatForwarding ( bool enable, int classx, const QString & number ) [static]

Format the value for a modify on a forwarding setting (ForwardingUnconditional, ForwardingMobileBusy, etc).

QString PhoneLine::formatOperator ( bool automatic, const QString & opid = QString::null ) [static]

Format the value to use in a PhoneLine::Operator modify. The opid is the identifier for the operator to select, which usually comes from the id field of a PhoneLine::OperatorInfo object. If automatic is true, then the operator will be selected automatically. Otherwise the operator will be selected manually.

QString PhoneLine::formatPreferredOperatorModify ( const PreferredOperatorInfo & oper ) [static]

Format a modification request for the preferred operator list.

QString PhoneLine::formatServiceCenter ( const QString & number ) [static]

Format a phone number for a PhoneLine::ServiceCenter modify.

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.

void PhoneLine::newCall ( const PhoneCall & call ) [signal]

Notification of a new call being added to the "calls()" list.

void PhoneLine::notification ( PhoneLine::QueryType type, const QString & value ) [signal]

Asynchronous notification of an interesting value that wasn't explicitly requested by a query call.

QValueList<OperatorInfo> PhoneLine::parseAvailableOperators ( const QString & v ) [static]

Parse the value returned from a PhoneLine::AvailableOperators query into a list of PhoneLine::OperatorInfo objects.

int PhoneLine::parseCallWaiting ( const QString & v ) [static]

Parse the value returned by a PhoneLine::CallWaiting query. The return value contains the flags PhoneLine::Voice, PhoneLine::Data, and PhoneLine::Fax, indicating which classes of calls have call waiting enabled.

bool PhoneLine::parseCallerIdRestriction ( const QString & v, bool * modifiable = 0 ) [static]

Parse the value returned by a PhoneLine::CallerIdRestriction query. Returns true if the caller ID restriction is invoked, or false if it is suppressed. The modifiable parameter is set to true if the caller ID restriction can be modified.

QValueList<ForwardRec> PhoneLine::parseForwarding ( const QString & v ) [static]

Parse the value returned by a query on a forwarding setting (ForwardingUnconditional, ForwardingMobileBusy, etc).

OperatorInfo PhoneLine::parseOperator ( const QString & v, bool * automatic ) [static]

Parse the value returned by a PhoneLine::Operator query. The automatic parameter will be set to true if the phone will register automatically to the network operator.

QValueList<OperatorInfo> PhoneLine::parseOperatorNames ( const QString & v ) [static]

Parse the list of operator names that resulted from an "OperatorNames" query. The "status" field in the returned structures is unused.

QValueList<PreferredOperatorInfo> PhoneLine::parsePreferredOperatorList ( const QString & v ) [static]

Parse the preferred operator list that resulted from a "PreferredOperatorList" query.

QString PhoneLine::parseServiceCenter ( const QString & v ) [static]

Parse the value returned by a PhoneLine::ServiceCenter query.

PhoneBook * PhoneLine::phoneBook ()

Returns the phone book manager for the phone line.

void PhoneLine::queryResult ( PhoneLine::QueryType type, const QString & value ) [signal]

Notification of a value that was being queried for.

QValueList<PreferredOperatorInfo> PhoneLine::resolveOperatorNames ( QValueList<PreferredOperatorInfo> & opers, QValueList<OperatorInfo> & names ) [static]

Resolve numeric operator identifiers within the opers list using the name associations in names. The names list is typically the result of the "OperatorNames" query.

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::startVideo ( const QString & number )

Starts a video phone call to number

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-2005 Trolltech, all rights reserved.


Copyright © 2005 Trolltech Trademarks
Qtopia version 2.1.2