kexi

drivermanager.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
00003    Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
00005 
00006    This program is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this program; see the file COPYING.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KEXIDB_DRIVER_MNGR_H
00023 #define KEXIDB_DRIVER_MNGR_H
00024 
00025 #include <qobject.h>
00026 #include <qcstring.h>
00027 #include <qmap.h>
00028 #include <qdict.h>
00029 
00030 #include <klibloader.h>
00031 #include <kservice.h>
00032 
00033 #include <kexidb/driver.h>
00034 
00035 namespace KexiDB {
00036 
00037 class DriverManagerInternal;
00038 class Connection;
00039 class ConnectionData;
00040 
00042 class KEXI_DB_EXPORT DriverManager : public QObject, public KexiDB::Object
00043 {
00044     public:
00045         typedef QMap<QString, KService::Ptr> ServicesMap;
00046 
00047         DriverManager();
00048         virtual ~DriverManager();
00049 
00053         Driver* driver(const QString& name);
00054 
00057         const QStringList driverNames();
00058 
00061         const KexiDB::Driver::InfoMap driversInfo();
00062 
00067         KexiDB::Driver::Info driverInfo(const QString &name);
00068 
00072         KService::Ptr serviceInfo(const QString &name);
00073 
00075         const ServicesMap& services();
00076 
00082         QString lookupByMime(const QString &mimeType);
00083 
00085         virtual QString serverErrorMsg();
00086         virtual int serverResult();
00087         virtual QString serverResultName();
00088 
00093         QString possibleProblemsInfoMsg() const;
00094 
00095     protected:
00096         virtual void drv_clearServerResult();
00097 
00098     private:
00099         DriverManagerInternal *d_int;
00100 };
00101 
00102 } //namespace KexiDB
00103 
00104 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys