kexi

simplecommandlineapp.h
1/* This file is part of the KDE project
2 Copyright (C) 2006 Jaroslaw Staniek <js@iidea.pl>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. 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 KEXIDB_SIMPLECMDLINEAPP_H
21#define KEXIDB_SIMPLECMDLINEAPP_H
22
23#include <kexidb/connection.h>
24#include <kexidb/driver.h>
25
26#include <tdeaboutdata.h>
27
28struct TDECmdLineOptions;
29
30namespace KexiDB
31{
33
46 class KEXI_DB_EXPORT SimpleCommandLineApp : public KexiDB::Object
47 {
48 public:
50 int argc, char** argv, TDECmdLineOptions *options, const char *programName,
51 const char *version, const char *shortDescription=0,
52 int licenseType=TDEAboutData::License_Unknown,
53 const char *copyrightStatement=0, const char *text=0,
54 const char *homePageAddress=0, const char *bugsEmailAddress="submit@bugs.kde.org");
55
57
59 TDEInstance* instance() const;
60
66 bool openDatabase(const TQString& databaseName);
67
71 bool closeDatabase();
72
75
79
80 protected:
81 class Private;
82 Private * const d;
83 };
84}
85
86#endif
Database specific connection data, e.g. host, port.
Provides database connection, allowing queries and data modification.
Definition connection.h:62
bool openDatabase(const TQString &databaseName)
KexiDB::ConnectionData * connectionData() const
KexiDB::Connection * connection() const
SimpleCommandLineApp(int argc, char **argv, TDECmdLineOptions *options, const char *programName, const char *version, const char *shortDescription=0, int licenseType=TDEAboutData::License_Unknown, const char *copyrightStatement=0, const char *text=0, const char *homePageAddress=0, const char *bugsEmailAddress="submit@bugs.kde.org")
High-level database connectivity library with database backend drivers.
KEXI_DB_EXPORT DatabaseVersionInfo version()
Definition global.cpp:55