kpilot
IDMapper Class Reference
Much of the conduits are recordbased. More...
#include <idmapper.h>
Public Member Functions | |
QString | getHHObjectId (const QString &conduit, recordid_t pid) |
recordid_t | getHHObjectId (const QString &conduit, const QString &uid) |
QValueList< recordid_t > | getHHObjectIds (const QString &conduit) |
QValueList< QString > | getPCObjectIds (const QString &conduit) |
bool | hasHHId (const QString &conduit, const QString &uid) |
bool | hasPCId (const QString &conduit, recordid_t pid) |
IDMapper (const QString &file) | |
IDMapper () | |
QDateTime | lastTimeSynced (const QString &conduit, recordid_t pid) |
QDateTime | lastTimeSynced (const QString &conduit, const QString &uid) |
void | registerHHObjectId (const QString &conduit, recordid_t pid) |
void | registerPCObjectId (const QString &conduit, const QString &uid) |
void | setHHObjectId (const QString &conduit, const QString &uid, recordid_t pid) |
void | setLastSyncTime (const QString &conduit, recordid_t pid, const QDateTime &date) |
void | setLastSyncTime (const QString &conduit, const QString &uid, const QDateTime &date) |
void | setPCObjectId (const QString &conduit, recordid_t pid, const QString &uid) |
~IDMapper () | |
Protected Member Functions | |
bool | openDatasource (const QString &file) |
Detailed Description
Much of the conduits are recordbased.This class can be used bij the conduits to keep track of the mapping between records on the handheld and records on the pc.
Definition at line 43 of file idmapper.h.
Constructor & Destructor Documentation
IDMapper::IDMapper | ( | ) |
IDMapper::IDMapper | ( | const QString & | file | ) |
IDMapper::~IDMapper | ( | ) |
Definition at line 82 of file idmapper.cc.
Member Function Documentation
Returns the HH pid for the PC record with uid.
Returns an empty string when no uid exists for given pid.
Returns the PC uid for the handheld record with pid.
Returns 0 when no pid exists for given uid.
QValueList< recordid_t > IDMapper::getHHObjectIds | ( | const QString & | conduit | ) |
QValueList< QString > IDMapper::getPCObjectIds | ( | const QString & | conduit | ) |
Returns true when there is a pid set for given uid.
The conduit itself must determine if the two objects are in sync if this function returns true.
Definition at line 186 of file idmapper.cc.
bool IDMapper::hasPCId | ( | const QString & | conduit, | |
recordid_t | pid | |||
) |
Returns true when there is a uid set for given pid.
The conduit itself must determine if the two objects are in sync if this function returns true.
Definition at line 167 of file idmapper.cc.
Returns the date/time for the last time that the item with pid was synced.
This date is set by:
- setLastSyncTime (uid/pid)
Returns a null datetime when the pid does not excist.
Returns the date/time for the last time that the item with uid was synced.
This date is set by:
- setLastSyncTime (uid/pid)
Returns a null datetime when the pid does not excist.
bool IDMapper::openDatasource | ( | const QString & | file | ) | [protected] |
Definition at line 87 of file idmapper.cc.
void IDMapper::registerHHObjectId | ( | const QString & | conduit, | |
recordid_t | pid | |||
) |
Sets the PC uid for the handheld record with pid.
Does nothing when there is no handheld record with pid.
Definition at line 205 of file idmapper.cc.
Sets the time that the two objects where last synced.
The conduits should call this (or the uid version) method when two objects are synced. When the pid does not exist nothing happens.
void IDMapper::setLastSyncTime | ( | const QString & | conduit, | |
const QString & | uid, | |||
const QDateTime & | date | |||
) |
Sets the time that the two objects where last synced.
The conduits should call this method (or the pid version) when two objects are synced. When the uid does not exist nothing happens.
Sets the PC uid for the handheld record with pid.
Does nothing when there is no handheld record with pid.
Definition at line 227 of file idmapper.cc.
The documentation for this class was generated from the following files: