kexi

drivermanager.h

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