kexi

simplecommandlineapp.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2006 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This library 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 library 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 library; see the file COPYING.LIB.  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_SIMPLECMDLINEAPP_H
00021 #define KEXIDB_SIMPLECMDLINEAPP_H
00022 
00023 #include <kexidb/connection.h>
00024 #include <kexidb/driver.h>
00025 
00026 #include <kaboutdata.h>
00027 
00028 struct KCmdLineOptions;
00029 
00030 namespace KexiDB
00031 {
00033 
00046     class KEXI_DB_EXPORT SimpleCommandLineApp : public KexiDB::Object
00047     {
00048         public:
00049             SimpleCommandLineApp(
00050                 int argc, char** argv, KCmdLineOptions *options, const char *programName, 
00051                 const char *version, const char *shortDescription=0, 
00052                 int licenseType=KAboutData::License_Unknown, 
00053                 const char *copyrightStatement=0, const char *text=0, 
00054                 const char *homePageAddress=0, const char *bugsEmailAddress="submit@bugs.kde.org");
00055 
00056         ~SimpleCommandLineApp();
00057 
00059         KInstance* instance() const;
00060 
00066         bool openDatabase(const QString& databaseName);
00067 
00071         bool closeDatabase();
00072 
00074         KexiDB::ConnectionData* connectionData() const;
00075 
00078         KexiDB::Connection* connection() const;
00079 
00080         protected:
00081             class Private;
00082             Private * const d;
00083     };
00084 }
00085 
00086 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys