Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QPhoneBook Class Reference
[QtTelephonyModule]

The QPhoneBook class provides an interface to the SIM phone books of a device. More...

    #include <QPhoneBook>

Inherits QCommInterface.

Inherited by QModemPhoneBook.

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The QPhoneBook class provides an interface to the SIM phone books of a device.

Phone devices contain a number of internal phone books. The principal one of these is SM, representing the phone book on the user's SIM card.

The QPhoneBook class allows applications to access the contents of SIM phone books. For access to full phone book information, including SIM phone books and on-disk phone books, use QContactModel.

The following phone book stores are commonly provided on SIM's according to 3GPP TS 27.007, and can be accessed using QPhoneBook:

SMWritable SIM phone book for user-defined names and numbers.
SNRead-only SIM phone book for operator-defined service numbers.
DCRead-only list of recently dialed calls.
LDRead-only list containing the last dialed call.
MCRead-only list of recently missed incoming calls.
RCRead-only list of recently received calls.
ENRead-only list of emergency numbers set by the network operator.
FDFixed dialing phone book, listing the numbers that can be dialed when the fixed dialing mode is activated with setFixedDialingState().

The ME, MT, and TA phone books mentioned in 3GPP TS 27.007 cannot be accessed using QPhoneBook; use QContactModel instead.

The storages() method can be used to determine which storages are supported on the current SIM.

See also QPhoneBookEntry, QPhoneBookLimits, QPhoneBookEntry, and QContactModel.


Member Function Documentation

QPhoneBook::QPhoneBook ( const QString & service = QString(), QObject * parent = 0, QCommInterface::Mode mode = Client )

Construct a new SIM phone book access object for service and attach it to parent. The object will be created in client mode if mode is Client, or server mode otherwise.

If service is empty, this class will use the first available service that supports SIM phone books. If there is more than one service that supports SIM phone books, the caller should enumerate them with QCommServiceManager::supports() and create separate QPhoneBook objects for each.

See also QCommServiceManager::supports().

QPhoneBook::~QPhoneBook ()

Destroy this SIM phone book access object.

void QPhoneBook::add ( const QPhoneBookEntry & entry, const QString & store = "SM", bool flush = true )   [virtual slot]

Add an entry consisting of number and text to the storage area store. If flush is true, then flush the modifications immediately; otherwise wait for an explicit call to the flush() method. The index field of entry is ignored.

See also remove(), update(), and flush().

void QPhoneBook::clearPassword ( const QString & store )   [virtual slot]

Clear the password on store that was set using setPassword(). This should be called after flush().

See also setPassword() and flush().

void QPhoneBook::entries ( const QString & store, const QList<QPhoneBookEntry> & list )   [signal]

Signal that is emitted to deliver the list of entries in the SIM storage area store. Occurs whenever the list is explicitly requested with getEntries(), or the list is modified by add(), remove(), update(), or flush().

See also getEntries(), add(), remove(), update(), and flush().

void QPhoneBook::fixedDialingState ( bool enabled )   [signal]

Signal that is emitted in response to requestFixedDialingState() to indicate whether the fixed dialing lock on the SIM is enabled or not.

See also requestFixedDialingState() and setFixedDialingState().

void QPhoneBook::flush ( const QString & store = "SM" )   [virtual slot]

Flush all pending operations on the storage area store. This will cause the new list of entries for the storage area to be returned via the entries() signal.

See also add(), remove(), update(), and entries().

void QPhoneBook::getEntries ( const QString & store = "SM" )   [virtual slot]

Get all entries in the storage area store. The most common storage area is called SM, indicating the phone book on the user's SIM card. The entries are returned via the entries() signal.

See also entries().

void QPhoneBook::limits ( const QString & store, const QPhoneBookLimits & value )   [signal]

Signal that is emitted in response to a requestLimits() call for store. The value structure contains the limits. If the limits could not be obtained, value will be null.

See also requestLimits().

void QPhoneBook::ready ()   [signal]

Signal that is emitted when phone books are ready to be read. For example this signal can be emitted from phoneBooksReady().

void QPhoneBook::remove ( uint index, const QString & store = "SM", bool flush = true )   [virtual slot]

Remove the entry at index from the storage area store. If flush is true, then flush the modifications immediately; otherwise wait for an explicit call to the flush() method.

See also add(), update(), and flush().

void QPhoneBook::requestFixedDialingState ()   [virtual slot]

Request the state of the fixed dialing lock on the SIM. The service responds with the fixedDialingState() signal.

See also fixedDialingState() and setFixedDialingState().

void QPhoneBook::requestLimits ( const QString & store = "SM" )   [virtual slot]

Request the field size and index limits for store. The service responds with the limits() signal.

See also limits().

void QPhoneBook::setFixedDialingState ( bool enabled, const QString & pin2 )   [virtual slot]

Sets the fixed dialing lock on the SIM to enabled. The pin2 argument specifies the PIN2 password to access the fixed dialing lock. The service will emit setFixedDialingStateResult() when the operation completes.

See also fixedDialingState(), setFixedDialingStateResult(), and requestFixedDialingState().

void QPhoneBook::setFixedDialingStateResult ( QTelephony::Result result )   [signal]

Signal that is emitted in response to setFixedDialingState() to report the result of the operation.

See also setFixedDialingState().

void QPhoneBook::setPassword ( const QString & store, const QString & password )   [virtual slot]

Sets the password to use to access store to password. This is typically the SIM PIN2 password for the FD (fixed dialing) store. This should be called before the first call on getEntries(), add(), etc.

See also clearPassword(), getEntries(), and add().

QStringList QPhoneBook::storages ()

Request the supported storages.

void QPhoneBook::update ( const QPhoneBookEntry & entry, const QString & store = "SM", bool flush = true )   [virtual slot]

Update the entry in the storage area store with the. If flush is true, then flush the modifications immediately; otherwise wait for an explicit call to the flush() method.

See also add(), remove(), and flush().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3