kexi

kexidbdrivermanager.h
1/***************************************************************************
2 * kexidbdrivermanager.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
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 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_KEXIDB_KEXIDBDRIVERMANAGER_H
21#define KROSS_KEXIDB_KEXIDBDRIVERMANAGER_H
22
23#include <tqstring.h>
24
25#include <api/object.h>
26#include <api/variant.h>
27#include <api/list.h>
28#include <api/class.h>
29
30#include <kexidb/drivermanager.h>
31
32namespace Kross { namespace KexiDB {
33
34 // Forward declarations.
35 class KexiDBDriver;
37 class KexiDBField;
40
59 class KexiDBDriverManager : public Kross::Api::Class<KexiDBDriverManager>
60 {
61 public:
62 KexiDBDriverManager();
63 virtual ~KexiDBDriverManager();
64 virtual const TQString getClassName() const;
65
66 private:
67
69 const TQStringList driverNames();
70
72 KexiDBDriver* driver(const TQString& drivername);
73
75 const TQString lookupByMime(const TQString& mimetype);
76
78 const TQString mimeForFile(const TQString& filename);
79
81 KexiDBConnectionData* createConnectionData();
82
86 KexiDBConnectionData* createConnectionDataByFile(const TQString& filename);
87
89 KexiDBField* field();
90
92 KexiDBTableSchema* tableSchema(const TQString& tablename);
93
95 KexiDBQuerySchema* querySchema();
96
97 private:
98 inline ::KexiDB::DriverManager& driverManager();
99 ::KexiDB::DriverManager m_drivermanager;
100 };
101
102}}
103
104#endif
105
Database driver management, e.g. finding and loading drivers.
A KexiDBConnectionData is used to store the details needed for a connection with a database.
Drivers are the implementations Kexi uses to access the driver-backends.
A field in a record.
Definition kexidbfield.h:38
The KexiDBTableSchema object implements a KexiDBSchema for queries.
The KexiDBTableSchema object implements a KexiDBSchema for tables.
KrossKexiDB provides access to the KexiDB database functionality.