The CContactDatabase
class handles all interaction with
a contact database. Most clients create an instance of the class during
initialisation, and destroy it on shutdown. The class allows clients to create
a new contacts database, or open an existing one. Once opened, the database can
be searched, sorted, and items within it can be edited or read, new items can
be added, and existing ones can be deleted.
Client applications which need to be updated dynamically as the
database is altered by other clients should derive from class
MContactDbObserver
. The observer's
HandleDatabaseEventL()
function will be called in response to each
change to the database.
A database can have a view definition
(CContactItemViewDef
). This is used when reading or opening
contact items within the database. Only fields specified in the view definition
will be included. The view definition is optional. If no view definition has
been specified, every field is included in the view. The view definition does
not persist so should be set each time the database is opened.