• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kpilot

IDMapping Class Reference

#include <idmapping.h>

List of all members.


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 an empty and invalid mapping.

Definition at line 55 of file idmapping.cc.

IDMapping::IDMapping ( const QString &  userName,
const QString &  conduit 
)

Creates a new mapping object for given user and conduit.

Definition at line 59 of file idmapping.cc.

IDMapping::IDMapping ( const IDMapping &  other  ) 

Copy constructor.

Definition at line 67 of file idmapping.cc.

IDMapping::~IDMapping (  ) 

Destructor.

Definition at line 71 of file idmapping.cc.


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.

void IDMapping::changeHHId ( const QString &  from,
const QString &  to 
)

Change the HH id from to to.

Definition at line 86 of file idmapping.cc.

void IDMapping::changePCId ( const QString &  from,
const QString &  to 
)

Change the PC id from to to.

Definition at line 95 of file idmapping.cc.

bool IDMapping::commit (  ) 

Saves the changes to persistent storage.

Definition at line 103 of file idmapping.cc.

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.

QString IDMapping::hhCategory ( const QString &  hhRecordId  )  const

Returns the category for the given record or QString() if no category is set.

Definition at line 124 of file idmapping.cc.

QString IDMapping::hhRecordId ( const QString &  pcRecordId  )  const

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.

bool IDMapping::isValid ( const QList< QString > &  recordIds  )  const

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

Returns the last time that a sync occurred.

Definition at line 222 of file idmapping.cc.

void IDMapping::map ( const QString &  hhRecordId,
const QString &  pcRecordId 
)

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.

IDMapping & IDMapping::operator= ( const IDMapping &  other  ) 

Assignment operator.

Definition at line 332 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.

QString IDMapping::pcRecordId ( const QString &  hhRecordId  )  const

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

Returns a list of all pc ids that are in the mapping.

Definition at line 263 of file idmapping.cc.

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 (  ) 

Tries to undo the changes in persistent storage.

Definition at line 289 of file idmapping.cc.

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  ) 

Sets the pc on which the last sync is executed to pc.

Definition at line 303 of file idmapping.cc.

void IDMapping::storeHHCategory ( const QString &  hhRecordId,
const QString &  category 
)

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:
  • idmapping.h
  • idmapping.cc

kpilot

Skip menu "kpilot"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal