HarmattanSyncApplications
Public Member Functions | Protected Member Functions | Friends | List of all members
ItemIdMapper Class Reference

Storage for persistently mapping ID's supplied by storage plugins to formats suitable for remote SyncML parties. More...

#include <ItemIdMapper.h>

Public Member Functions

 ItemIdMapper ()
 Constructor.
 
virtual ~ItemIdMapper ()
 Destructor.
 
bool init (const QString &aDbFile, const QString &aStorageId)
 Initializes ID mapper for storage.
 
void uninit ()
 Uninitializes ID mapper for storage.
 
QString key (const QString &aValue)
 Maps the specified value to key.
 
QString value (const QString &aKey)
 Maps the specified key to value.
 
 ItemIdMapper ()
 Constructor.
 
virtual ~ItemIdMapper ()
 Destructor.
 
bool init (const QString &aDbFile, const QString &aStorageId)
 Initializes ID mapper for storage.
 
void uninit ()
 Uninitializes ID mapper for storage.
 
QString key (const QString &aValue)
 Maps the specified value to key.
 
QString value (const QString &aKey)
 Maps the specified key to value.
 

Protected Member Functions

QString add (const QString &aKey)
 Adds a new key.
 
QString add (const QString &aKey)
 Adds a new key.
 

Friends

class ItemIdMapperTest
 

Detailed Description

Storage for persistently mapping ID's supplied by storage plugins to formats suitable for remote SyncML parties.

Member Function Documentation

◆ add() [1/2]

QString ItemIdMapper::add ( const QString &  aKey)
protected

Adds a new key.

Parameters
aKeyKey
Returns
Mapped value

◆ add() [2/2]

QString ItemIdMapper::add ( const QString &  aKey)
protected

Adds a new key.

Parameters
aKeyKey
Returns
Mapped value

◆ init() [1/2]

bool ItemIdMapper::init ( const QString &  aDbFile,
const QString &  aStorageId 
)

Initializes ID mapper for storage.

Parameters
aDbFilePath to database to use as persistent storage
aStorageIdIdentifier for storage
Returns
True if successfully initialized, otherwise false

◆ init() [2/2]

bool ItemIdMapper::init ( const QString &  aDbFile,
const QString &  aStorageId 
)

Initializes ID mapper for storage.

Parameters
aDbFilePath to database to use as persistent storage
aStorageIdIdentifier for storage
Returns
True if successfully initialized, otherwise false

◆ key() [1/2]

QString ItemIdMapper::key ( const QString &  aValue)

Maps the specified value to key.

Parameters
aValueValue
Returns
Key

◆ key() [2/2]

QString ItemIdMapper::key ( const QString &  aValue)

Maps the specified value to key.

Parameters
aValueValue
Returns
Key

◆ value() [1/2]

QString ItemIdMapper::value ( const QString &  aKey)

Maps the specified key to value.

Parameters
aKeyKey
Returns
Value

◆ value() [2/2]

QString ItemIdMapper::value ( const QString &  aKey)

Maps the specified key to value.

Parameters
aKeyKey
Returns
Value

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