HarmattanSyncApplications
|
Harmattan Contact storage plugin backend interface class. More...
#include <ContactsBackend.h>
Public Member Functions | |
ContactsBackend (QVersitDocument::VersitType aVerType, const QString &syncTarget, const QString &originId) | |
Constructor. | |
~ContactsBackend () | |
Destructor. | |
bool | init () |
Searches for available storage plugins and sets the manager to that plugin. | |
bool | uninit () |
releases the resources held. | |
QList< QContactLocalId > | getAllContactIds () |
Return ids of all contacts retrieved from the backend. | |
QList< QContactLocalId > | getAllNewContactIds (const QDateTime &aTimeStamp) |
Return all new contacts ids in a QList of QStrings. | |
QList< QContactLocalId > | getAllModifiedContactIds (const QDateTime &aTimeStamp) |
Return all modified contact ids in a QList of QStrings. | |
QList< QContactLocalId > | getAllDeletedContactIds (const QDateTime &aTimeStamp) |
Return all deleted contacts ids in a QList of QStrings. | |
void | getContact (const QContactLocalId &aContactId, QContact &aContact) |
Get contact data for a given gontact ID as a QContact object. | |
void | getContacts (const QList< QContactLocalId > &aContactIDs, QMap< QString, QString > &aContactData) |
Get multiple contacts at once as vcards. | |
void | getContacts (const QList< QContactLocalId > &aContactIds, QList< QContact > &aContacts) |
Get multiple contacts at once as QContact objects. | |
bool | addContacts (const QStringList &aContactDataList, QMap< int, ContactsStatus > &aStatusMap) |
Batch addition of contacts. | |
QContactManager::Error | modifyContact (const QString &id, const QString &contactdata) |
Modify a contact that whose data and ID are given as Input. | |
QMap< int, ContactsStatus > | modifyContacts (const QStringList &aContactDataList, const QStringList &aContactsIdList) |
Batch modification. | |
QMap< int, ContactsStatus > | deleteContacts (const QStringList &aContactIDList) |
Batch deletion of contacts. | |
bool | batchUpdatesEnabled () |
Tells if batch updates are enabled. | |
QDateTime | lastModificationTime (const QContactLocalId &aContactId) |
Returns the last time the contact was modified. | |
QDateTime | getCreationTime (const QContact &aContact) |
Return creation time of single contact. | |
QList< QDateTime > | getCreationTimes (const QList< QContactLocalId > &aContactIds) |
Returns creation times of the contacts. | |
QString | convertQContactToVCard (const QContact &aContact) |
Converts a QContact to a VCard. | |
Harmattan Contact storage plugin backend interface class.
This class interfaces with the backend implementation of contact manager on harmattan device
ContactsBackend::ContactsBackend | ( | QVersitDocument::VersitType | aVerType, |
const QString & | syncTarget, | ||
const QString & | originId ) |
Constructor.
aVerType |
bool ContactsBackend::addContacts | ( | const QStringList & | aContactDataList, |
QMap< int, ContactsStatus > & | aStatusMap ) |
Batch addition of contacts.
aContactDataList | Contact data |
aStatusMap | Returned status data |
|
inline |
Tells if batch updates are enabled.
QString ContactsBackend::convertQContactToVCard | ( | const QContact & | aContact | ) |
Converts a QContact to a VCard.
aContact | Contact |
QMap< int, ContactsStatus > ContactsBackend::deleteContacts | ( | const QStringList & | aContactIDList | ) |
Batch deletion of contacts.
aContactIDList | Contact IDs |
QList< QContactLocalId > ContactsBackend::getAllContactIds | ( | ) |
Return ids of all contacts retrieved from the backend.
QList< QContactLocalId > ContactsBackend::getAllDeletedContactIds | ( | const QDateTime & | aTimeStamp | ) |
Return all deleted contacts ids in a QList of QStrings.
aTimeStamp | Timestamp of the oldest contact ID to be returned |
QList< QContactLocalId > ContactsBackend::getAllModifiedContactIds | ( | const QDateTime & | aTimeStamp | ) |
Return all modified contact ids in a QList of QStrings.
aTimeStamp | Timestamp of the oldest contact ID to be returned |
QList< QContactLocalId > ContactsBackend::getAllNewContactIds | ( | const QDateTime & | aTimeStamp | ) |
Return all new contacts ids in a QList of QStrings.
aTimeStamp | Timestamp of the oldest contact ID to be returned |
void ContactsBackend::getContact | ( | const QContactLocalId & | aContactId, |
QContact & | aContact ) |
Get contact data for a given gontact ID as a QContact object.
aContactId | The ID of the contact |
aContact | The returned data of the contact |
void ContactsBackend::getContacts | ( | const QList< QContactLocalId > & | aContactIds, |
QList< QContact > & | aContacts ) |
Get multiple contacts at once as QContact objects.
aContactIds | List of contact IDs |
aContacts | List of returned contact data |
void ContactsBackend::getContacts | ( | const QList< QContactLocalId > & | aContactIDs, |
QMap< QString, QString > & | aContactData ) |
Get multiple contacts at once as vcards.
aContactIDs | List of contact IDs to be returned |
aContactData | Returned contact data |
QDateTime ContactsBackend::getCreationTime | ( | const QContact & | aContact | ) |
Return creation time of single contact.
aContact | Contact |
QList< QDateTime > ContactsBackend::getCreationTimes | ( | const QList< QContactLocalId > & | aContactIds | ) |
Returns creation times of the contacts.
aContactIds | Ids of the contacts |
bool ContactsBackend::init | ( | ) |
Searches for available storage plugins and sets the manager to that plugin.
QDateTime ContactsBackend::lastModificationTime | ( | const QContactLocalId & | aContactId | ) |
Returns the last time the contact was modified.
aContactId | Id of the contact |
QContactManager::Error ContactsBackend::modifyContact | ( | const QString & | id, |
const QString & | contactdata ) |
Modify a contact that whose data and ID are given as Input.
id | Contact ID |
contactdata | Contact data |
QMap< int, ContactsStatus > ContactsBackend::modifyContacts | ( | const QStringList & | aContactDataList, |
const QStringList & | aContactsIdList ) |
Batch modification.
aContactDataList | Contact data |
aContactsIdList | Contact IDs |
bool ContactsBackend::uninit | ( | ) |
releases the resources held.