KDE PIM / Developers / API Docs / libemailfunctions

KPIM::IdMapper Class Reference

An Id Mapper maps Ids. More...

#include <idmapper.h>

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

An Id Mapper maps Ids.

What to or what for is not entirely clear, but maps have categories. This is probably an adjoint functor, since adjoint functors are everywhere.


Constructor & Destructor Documentation

IdMapper::IdMapper  ) 
 

Create Id mapper.

You have to set path and identifier before you can call load() or save().

IdMapper::IdMapper const QString &  path,
const QString &  identifier = QString::null
 

Create Id mapper.

The path specifies the category of mapping, the identifier the concrete object.

If you don't pass an identifier you have to set it before calling load() or save().

The current implementation stores the data at /share/apps/<path>/<identifier>.


Member Function Documentation

void IdMapper::setPath const QString &  path  ) 
 

Set id map path.

QString KPIM::IdMapper::path  )  const [inline]
 

Return id map path.

void IdMapper::setIdentifier const QString &  identifier  ) 
 

Set id map identifier.

QString KPIM::IdMapper::identifier  )  const [inline]
 

Return id map identifier.

bool IdMapper::load  ) 
 

Loads the map.

bool IdMapper::save  ) 
 

Saves the map.

void IdMapper::clear  ) 
 

Clears the map.

void IdMapper::setRemoteId const QString &  localId,
const QString &  remoteId
 

Stores the remote id for the given local id.

void IdMapper::removeRemoteId const QString &  remoteId  ) 
 

Removes the remote id.

QString IdMapper::remoteId const QString &  localId  )  const
 

Returns the remote id of the given local id.

QString IdMapper::localId const QString &  remoteId  )  const
 

Returns the local id for the given remote id.

void IdMapper::setFingerprint const QString &  localId,
const QString &  fingerprint
 

Stores a fingerprint for an id which can be used to detect if the locally held version differs from what is on the server.

This can be a sequence number of an md5 hash depending on what the server provides

QString IdMapper::asString  )  const
 

Returns a string representation of the id pairs, that's usefull for debugging.


The documentation for this class was generated from the following files: