![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
The Phonebook Synchroniser synchronises the two stores of address information on a Symbian OS phone, the phonebooks on the phone's ICC (on GSM phones called the SIM card), and the Contacts Database.
To do this, the Phonebook Synchroniser monitors the ICC phonebook, and dynamically maintains a cache of its entries in the Contacts Database. Applications can then access this cache through the Contacts Model API. Applications can also use the Contacts Model API to add and change ICC phonebook entries: the Contacts Model passes such requests to the Phonebook Synchroniser, which handles the interfacing to the phonebook itself.
This architecture gives a unified and simple-to-use approach to accessing all address information on the device. The underlying ETel phonebook interface returns entries as tagged byte-streams, which require considerable parsing effort, which would not be simple for each application to code itself.
The Phonebook Synchroniser uses the ETel Server in order to read, write and delete the ICC phonebook entries. ETel will also provide phone or network driven notifications of changes in ICC phonebook entries.
The Phonebook Synchroniser also uses the Contacts Model in order to read, write and delete contacts items from the Contacts Database.
The diagram below shows the Phonebook Synchroniser and related components.
Note that:
The Phonebook Synchroniser has a client/server architecture, so that synchronisation requests from multiple clients can be handled. The expected primary use is through the Contacts Model, but applications can also use the Phonebook Synchroniser's API directly (illustrated by Application B above).
To allow products that use the Contacts Model, but not the Phonebook Synchroniser, the Model only has an optional dynamic dependency on the Synchroniser. This is achieved by encapsulating the use of the Synchroniser in a Contacts plug-in, which may or may not be provided on a given device.
The Phonebook Synchroniser API has a single client class
RPhoneBookSession
. This is a session to the Phonebook
Synchroniser server, and provides functions to:
read, write, and delete entries
synchronise on request
validate an operation before it is performed
get and set the synchronisation mode. Synchronisation can be performed automatically, automatically only if the current ICC is the same ICC as when the last synchronisation was performed, or on request.
The Contacts Model class that allows access to ICC entries is
CContactICCEntry
.