kexi

drivermanager.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Daniel Molkentin <molkentin@kde.org>
3 Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
4 Copyright (C) 2003-2006 Jaroslaw Staniek <js@iidea.pl>
5
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this program; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KEXIDB_DRIVER_MNGR_H
23#define KEXIDB_DRIVER_MNGR_H
24
25#include <tqobject.h>
26#include <tqcstring.h>
27#include <tqmap.h>
28#include <tqdict.h>
29
30#include <klibloader.h>
31#include <kservice.h>
32
33#include <kexidb/driver.h>
34
35namespace KexiDB {
36
37class DriverManagerInternal;
38class Connection;
39class ConnectionData;
40
42class KEXI_DB_EXPORT DriverManager : public TQObject, public KexiDB::Object
43{
44 public:
45 typedef TQMap<TQString, KService::Ptr> ServicesMap;
46
48 virtual ~DriverManager();
49
53 Driver* driver(const TQString& name);
54
57 const TQStringList driverNames();
58
61 const KexiDB::Driver::InfoMap driversInfo();
62
67 KexiDB::Driver::Info driverInfo(const TQString &name);
68
72 KService::Ptr serviceInfo(const TQString &name);
73
75 const ServicesMap& services();
76
82 TQString lookupByMime(const TQString &mimeType);
83
85 virtual TQString serverErrorMsg();
86 virtual int serverResult();
87 virtual TQString serverResultName();
88
93 TQString possibleProblemsInfoMsg() const;
94
95 protected:
96 virtual void drv_clearServerResult();
97
98 private:
99 DriverManagerInternal *d_int;
100};
101
102} //namespace KexiDB
103
104#endif
Database driver management, e.g. finding and loading drivers.
Generic database abstraction.
Definition driver.h:67
High-level database connectivity library with database backend drivers.