diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /kpilot/lib/idmapper.h | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpilot/lib/idmapper.h')
-rw-r--r-- | kpilot/lib/idmapper.h | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/kpilot/lib/idmapper.h b/kpilot/lib/idmapper.h deleted file mode 100644 index b2ff0efe5..000000000 --- a/kpilot/lib/idmapper.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef _KPILOT_IDMAPPER_H -#define _KPILOT_IDMAPPER_H -/* -** Copyright (C) 2006 Bertjan Broeksema <bbroeksema@bluebottle.com> -*/ - -/* -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU Lesser General Public License as published by -** the Free Software Foundation; either version 2.1 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU Lesser General Public License for more details. -** -** You should have received a copy of the GNU Lesser General Public License -** along with this program in a file called COPYING; if not, write to -** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -** MA 02110-1301, USA. -*/ - -/* -** Bug reports and questions can be sent to kde-pim@kde.org -*/ - -#include <tqstring.h> -#include <tqdatetime.h> -#include <tqvaluelist.h> - -#include "pi-macros.h" - -#include <kconfig.h> - -class IDMapperPrivate; - -/** - * 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. - */ -class IDMapper -{ -public: - /** - * Creates a new IDMapper with default datasource. - */ - IDMapper(); - - /** - * Creates a new IDMapper with file as datasource. - */ - IDMapper( const TQString &file ); - - ~IDMapper(); - - /** - * Adds an uid for PC objects to the database. - */ - void registerPCObjectId( const TQString &conduit, const TQString &uid ); - - /** - * Returns all known uid's for given conduit. - */ - TQValueList<TQString> getPCObjectIds( const TQString &conduit ); - - /** - * Adds a pid for HH objects to the database. - */ - void registerHHObjectId( const TQString &conduit, recordid_t pid ); - - /** - * Returns all know pids for given conduit. - */ - TQValueList<recordid_t> getHHObjectIds( const TQString &conduit ); - - /** - * Sets the PC uid for the handheld record with pid. Does nothing when - * there is no handheld record with pid. - */ - void setPCObjectId( const TQString &conduit, recordid_t pid - , const TQString &uid ); - - /** - * Sets the PC uid for the handheld record with pid. Does nothing when - * there is no handheld record with pid. - */ - void setHHObjectId( const TQString &conduit, const TQString &uid - , recordid_t pid ); - - /** - * Returns the PC uid for the handheld record with pid. Returns 0 when no - * pid exists for given uid. - */ - recordid_t getHHObjectId( const TQString &conduit, const TQString &uid ); - - /** - * Returns the HH pid for the PC record with uid. Returns an empty string - * when no uid exists for given pid. - */ - TQString getHHObjectId( const TQString &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. - */ - bool hasPCId( const TQString &conduit, recordid_t pid ); - - /** - * 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. - */ - bool hasHHId( const TQString &conduit, const TQString &uid ); - - /** - * 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 setLastSyncTime( const TQString &conduit, const TQString &uid, - const TQDateTime &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. - */ - void setLastSyncTime( const TQString &conduit, recordid_t pid - , const TQDateTime &date ); - - /** - * 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. - */ - TQDateTime lastTimeSynced( const TQString &conduit, const TQString &uid ); - - /** - * 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. - */ - TQDateTime lastTimeSynced( const TQString &conduit, recordid_t pid ); - -protected: - bool openDatasource( const TQString &file ); - -private: - IDMapperPrivate *fP; -}; - -#endif |