diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kexi/migration/migratemanager.h | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/migration/migratemanager.h')
-rw-r--r-- | kexi/migration/migratemanager.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/kexi/migration/migratemanager.h b/kexi/migration/migratemanager.h new file mode 100644 index 00000000..c876ab91 --- /dev/null +++ b/kexi/migration/migratemanager.h @@ -0,0 +1,82 @@ +/* This file is part of the KDE project + Copyright (C) 2003 Jaroslaw Staniek <[email protected]> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#ifndef KEXI_MIGRATION_MNGR_H +#define KEXI_MIGRATION_MNGR_H + +#include <qobject.h> +#include <qcstring.h> +#include <qmap.h> +#include <qdict.h> + +#include <klibloader.h> +#include <kservice.h> + +#include "keximigrate.h" + +namespace KexiMigration { + +class MigrateManagerInternal; + +//! @short Migration library management, for finding and loading mogration drivers. +class KEXIMIGR_EXPORT MigrateManager : public QObject, public KexiDB::Object +{ + public: + typedef QMap<QString, KService::Ptr> ServicesMap; + + MigrateManager(); + virtual ~MigrateManager(); + + /*! Tries to load db driver with named name \a name. + The name is case insensitive. + \return db driver, or 0 if error (then error message is also set) */ + KexiMigrate* driver(const QString& name); + + /*! returns list of available drivers names. + That drivers can be loaded by first use of driver() method. */ + const QStringList driverNames(); + + /*! Looks up a drivers list by MIME type of database file. + Only file-based database drivers are checked. + The lookup is case insensitive. + \return driver name or null string if no driver found. + */ + QString driverForMimeType(const QString &mimeType); + + //! server error is set if there is error at KService level (useful for debugging) + virtual QString serverErrorMsg(); + virtual int serverResult(); + virtual QString serverResultName(); + +//! @todo copied from KexiDB::DriverManager, merge it. + /*! HTML information about possible problems encountered. + It's displayed in 'details' section, if an error encountered. + Currently it contains a list of incompatible migration drivers. */ + QString possibleProblemsInfoMsg() const; + + protected: + virtual void drv_clearServerResult(); + + private: + MigrateManagerInternal *d_int; +}; + +} //namespace KexiMigrate + +#endif |