Availability: S60.
The contacts module offers an API to address book services allowing the
creation of contact information databases. The contacts module
represents a Symbian contact database as a dictionary-like ContactDb
object, which contains Contact objects and which is indexed using the
unique IDs of those objects. A Contact object is itself a list-like
object, which contains ContactField objects and which is indexed using
the field indices. Unique IDs and field indices are integers. The
ContactDb object supports a limited subset of dictionary functionality.
Therefore, only __iter__
, __getitem__
,
__delitem__
,__len__
, keys
, values
, and items
are included.
ContactDb objects represent a live view into the database. If a contact is changed outside your Python application, the changes are visible immediately, and conversely any changes you commit into the database are visible immediately to other applications. It is possible to lock a contact for editing, which will prevent other applications from modifying the contact for as long as the lock is held. This can be done in, for example, a contacts editor application when a contact is opened for editing, very much like with the Contacts application in your Nokia device. If you try to modify a contact without locking it for editing, the contact is automatically locked before the modification and released immediately afterwards.