kpilot
IDMapping Class Reference
#include <idmapping.h>
Detailed Description
Definition at line 37 of file idmapping.h.
Public Member Functions | |
| void | archiveRecord (const QString &hhRecordId) |
| void | changeHHId (const QString &from, const QString &to) |
| void | changePCId (const QString &from, const QString &to) |
| bool | commit () |
| bool | containsHHId (const QString &hhRecordId) const |
| bool | containsPCId (const QString &pcRecordId) const |
| QString | hhCategory (const QString &hhRecordId) const |
| QString | hhRecordId (const QString &pcRecordId) const |
| IDMapping (const IDMapping &other) | |
| IDMapping (const QString &userName, const QString &conduit) | |
| IDMapping () | |
| bool | isArchivedRecord (const QString &pcRecordId) const |
| bool | isValid (const QList< QString > &recordIds) const |
| QDateTime | lastSyncedDate () const |
| void | map (const QString &hhRecordId, const QString &pcRecordId) |
| IDMapping & | operator= (const IDMapping &other) |
| QStringList | pcCategories (const QString &pcRecordId) const |
| QString | pcRecordId (const QString &hhRecordId) const |
| QStringList | pcRecordIds () const |
| void | removeHHId (const QString &hhRecordId) |
| void | removePCId (const QString &pcRecordId) |
| bool | rollback () |
| void | setLastSyncedDate (const QDateTime &dateTime) |
| void | setLastSyncedPC (const QString &pc) |
| void | storeHHCategory (const QString &hhRecordId, const QString &category) |
| void | storePCCategories (const QString &pcRecordId, const QStringList &categories) |
| ~IDMapping () | |
Constructor & Destructor Documentation
| IDMapping::IDMapping | ( | ) |
Creates a new mapping object for given user and conduit.
Definition at line 59 of file idmapping.cc.
| IDMapping::IDMapping | ( | const IDMapping & | other | ) |
| IDMapping::~IDMapping | ( | ) |
Member Function Documentation
| void IDMapping::archiveRecord | ( | const QString & | hhRecordId | ) |
Marks the pcRecord to which hhRecordId is mapped as archived.
Does nothing if there exists no mapping.
Definition at line 75 of file idmapping.cc.
| bool IDMapping::commit | ( | ) |
| bool IDMapping::containsHHId | ( | const QString & | hhRecordId | ) | const |
Method to find out whether or not there is a mapping for hh record with hhRecordId.
Definition at line 110 of file idmapping.cc.
| bool IDMapping::containsPCId | ( | const QString & | pcRecordId | ) | const |
Method to find out whether or not there is a mapping for pc record with pcRecordId.
Definition at line 117 of file idmapping.cc.
Returns the category for the given record or QString() if no category is set.
Definition at line 124 of file idmapping.cc.
Searches for a mapping which contains pcRecordId and returns the id to which it is mapped.
Returns QString() if no mapping is found.
Definition at line 131 of file idmapping.cc.
| bool IDMapping::isArchivedRecord | ( | const QString & | pcRecordId | ) | const |
Returns true when the record from the pc data store with pcRecordId is marked as an archived record.
This means that there was once a record on the handheld, which is deleted by the user, but was marked to be archived on the pc.
Definition at line 138 of file idmapping.cc.
Validates the mapping file with given dataproxy.
The mapping is considered valid if: 1. The number of mappings matches the number of records in ids. 2. Every id that is in recordIds has a mapping.
NOTE: The list of id's should be a list of handheld ids or a list of pc ids. Not a mix of them.
Definition at line 145 of file idmapping.cc.
| QDateTime IDMapping::lastSyncedDate | ( | ) | const |
Deletes any mapping that exists for hhRecordId and pcRecordId and then creates a new mapping between hhRecordId and pcRecordId.
Definition at line 228 of file idmapping.cc.
| QStringList IDMapping::pcCategories | ( | const QString & | pcRecordId | ) | const |
Returns the categories for the given record or QString() if no category is set.
Definition at line 249 of file idmapping.cc.
Searches for a mapping which contains hhRecordId and returns the id to which it is mapped.
Returns QString() if no mapping is found.
Definition at line 256 of file idmapping.cc.
| QStringList IDMapping::pcRecordIds | ( | ) | const |
| void IDMapping::removeHHId | ( | const QString & | hhRecordId | ) |
Search for a mapping for which the hh id == hhRecordId and if one is found it will be removed.
Definition at line 270 of file idmapping.cc.
| void IDMapping::removePCId | ( | const QString & | pcRecordId | ) |
Search for a mapping for which the pc id == pcRecordId and if one is found it will be removed.
Definition at line 277 of file idmapping.cc.
| bool IDMapping::rollback | ( | ) |
| void IDMapping::setLastSyncedDate | ( | const QDateTime & | dateTime | ) |
Sets the date/time on which the last sync is executed to dateTime.
Definition at line 296 of file idmapping.cc.
| void IDMapping::setLastSyncedPC | ( | const QString & | pc | ) |
Stores the category for the record with hhRecordId in the mapping.
Does nothing when there is no mapping for hhRecordId.
Definition at line 310 of file idmapping.cc.
| void IDMapping::storePCCategories | ( | const QString & | pcRecordId, | |
| const QStringList & | categories | |||
| ) |
Stores the categories for the record with pcRecordId in the mapping.
Does nothing when there is no mapping for pcRecordId.
Definition at line 321 of file idmapping.cc.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference