Detailed Description
The QContactContext class represents a storage context of contact data.
This includes storage contexts such as SIM Card contacts or contacts stored on the phone in the system PIM database. The class can be used to perform operations that relate to a specific context of PIM data.
Currently there is no way for applications to implement their own contexts. This feature is being considered for future versions of Qtopia.
See also QContactModel and Pim Library.
Member Function Documentation
QContactContext::QContactContext ( QObject * parent = 0 ) [protected]
Constructs a QContactContext with parent parent.
QUniqueId QContactContext::addContact ( const QContact & contact, const QPimSource & source ) [virtual]
Adds the contact to the PIM data source if it is controlled by this context. If the contact is successfully added, returns the new unique id for this contact, otherwise returns a null id.
QContact QContactContext::exportContact ( const QUniqueId & id, bool & ok ) const [virtual]
Exports a single contact identified by id. If successful sets ok to true, otherwise sets ok to false.
See also exportContacts().
QList<QContact> QContactContext::exportContacts ( const QPimSource & source, bool & ok ) const [virtual]
Exports the contacts stored in the PIM data source and returns them as a list. The source must be controlled by this context. If successful sets ok to true, otherwise sets ok to false.
There isn't necessarily going to be a one to one match to contacts in the PIM data source. Contacts may be merged or split over multiple contacts to form the list.
bool QContactContext::importContact ( const QPimSource & source, const QContact & contact ) [virtual]
Imports a single contact to the PIM data source. If successful returns true, otherwise returns false.
See also importContacts().
bool QContactContext::importContacts ( const QPimSource & source, const QList<QContact> & contacts ) [virtual]
Imports the contacts and merges them with the contacts listed in the PIM data source. The source must be controlled by this context. If successful returns true, otherwise returns false.
There isn't necessarily going to be a one to one match to contacts in the PIM data source. Contacts may be merged or split over multiple contacts. Also contacts that match in name will be updated from the list rather than additional contacts created.
bool QContactContext::removeContact ( const QUniqueId & id ) [virtual]
Removes the contact with the identifier id if it exists in this context. Returns true upon success; otherwise returns false.
bool QContactContext::updateContact ( const QContact & contact ) [virtual]
Updates the contact with the same identifier as contact if it exists in this context. Returns true upon success; otherwise returns false.