kpilot/lib

IDMapper Class Reference

#include <idmapper.h>

List of all members.


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.


Public Member Functions

 IDMapper ()
 IDMapper (const QString &file)
 ~IDMapper ()
void registerPCObjectId (const QString &conduit, const QString &uid)
QValueList< QString > getPCObjectIds (const QString &conduit)
void registerHHObjectId (const QString &conduit, recordid_t pid)
QValueList< recordid_t > getHHObjectIds (const QString &conduit)
void setPCObjectId (const QString &conduit, recordid_t pid, const QString &uid)
void setHHObjectId (const QString &conduit, const QString &uid, recordid_t pid)
recordid_t getHHObjectId (const QString &conduit, const QString &uid)
QString getHHObjectId (const QString &conduit, recordid_t pid)
bool hasPCId (const QString &conduit, recordid_t pid)
bool hasHHId (const QString &conduit, const QString &uid)
void setLastSyncTime (const QString &conduit, const QString &uid, const QDateTime &date)
void setLastSyncTime (const QString &conduit, recordid_t pid, const QDateTime &date)
QDateTime lastTimeSynced (const QString &conduit, const QString &uid)
QDateTime lastTimeSynced (const QString &conduit, recordid_t pid)

Protected Member Functions

bool openDatasource (const QString &file)

Constructor & Destructor Documentation

IDMapper::IDMapper (  ) 

Creates a new IDMapper with default datasource.

Definition at line 54 of file idmapper.cc.

IDMapper::IDMapper ( const QString &  file  ) 

Creates a new IDMapper with file as datasource.

Definition at line 70 of file idmapper.cc.


Member Function Documentation

void IDMapper::registerPCObjectId ( const QString &  conduit,
const QString &  uid 
)

Adds an uid for PC objects to the database.

Definition at line 95 of file idmapper.cc.

QValueList< QString > IDMapper::getPCObjectIds ( const QString &  conduit  ) 

Returns all known uid's for given conduit.

Definition at line 117 of file idmapper.cc.

void IDMapper::registerHHObjectId ( const QString &  conduit,
recordid_t  pid 
)

Adds a pid for HH objects to the database.

Definition at line 106 of file idmapper.cc.

QValueList< recordid_t > IDMapper::getHHObjectIds ( const QString &  conduit  ) 

Returns all know pids for given conduit.

Definition at line 144 of file idmapper.cc.

void IDMapper::setPCObjectId ( const QString &  conduit,
recordid_t  pid,
const QString &  uid 
)

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.

void IDMapper::setHHObjectId ( const QString &  conduit,
const QString &  uid,
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.

recordid_t IDMapper::getHHObjectId ( const QString &  conduit,
const QString &  uid 
)

Returns the PC uid for the handheld record with pid.

Returns 0 when no pid exists for given uid.

QString IDMapper::getHHObjectId ( const QString &  conduit,
recordid_t  pid 
)

Returns the HH pid for the PC record with uid.

Returns an empty string when no uid exists for given pid.

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.

bool IDMapper::hasHHId ( const QString &  conduit,
const QString &  uid 
)

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.

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.

void IDMapper::setLastSyncTime ( const QString &  conduit,
recordid_t  pid,
const QDateTime &  date 
)

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.

QDateTime IDMapper::lastTimeSynced ( const QString &  conduit,
const QString &  uid 
)

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.

QDateTime IDMapper::lastTimeSynced ( const QString &  conduit,
recordid_t  pid 
)

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.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys