kexi

kexidbconnectiondata.h

00001 /***************************************************************************
00002  * kexidbconnectiondata.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
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 KROSS_KEXIDB_KEXIDBCONNECTIONDATA_H
00021 #define KROSS_KEXIDB_KEXIDBCONNECTIONDATA_H
00022 
00023 #include <qstring.h>
00024 
00025 #include <api/object.h>
00026 #include <api/variant.h>
00027 #include <api/list.h>
00028 #include <api/class.h>
00029 
00030 #include <kexidb/connection.h>
00031 #include <kexidb/connectiondata.h>
00032 
00033 namespace Kross { namespace KexiDB {
00034 
00039     class KexiDBConnectionData : public Kross::Api::Class<KexiDBConnectionData>
00040     {
00041         public:
00042 
00049             KexiDBConnectionData(::KexiDB::ConnectionData* data);
00050 
00051             operator ::KexiDB::ConnectionData& () { return *m_data; }
00052             operator ::KexiDB::ConnectionData* () { return m_data; }
00053 
00057             virtual ~KexiDBConnectionData();
00058 
00060             virtual const QString getClassName() const;
00061 
00062             ::KexiDB::ConnectionData* data() { return m_data; }
00063             QString databaseName() { return m_dbname; }
00064             void setDatabaseName(const QString& s) { m_dbname = s; }
00065 
00066         private:
00067             ::KexiDB::ConnectionData* m_data;
00068             QString m_dbname;
00069 
00071             Kross::Api::Object::Ptr caption(Kross::Api::List::Ptr);
00073             Kross::Api::Object::Ptr setCaption(Kross::Api::List::Ptr);
00074 
00076             Kross::Api::Object::Ptr description(Kross::Api::List::Ptr);
00078             Kross::Api::Object::Ptr setDescription(Kross::Api::List::Ptr);
00079 
00081             Kross::Api::Object::Ptr driverName(Kross::Api::List::Ptr);
00083             Kross::Api::Object::Ptr setDriverName(Kross::Api::List::Ptr);
00084 
00086             Kross::Api::Object::Ptr localSocketFileUsed(Kross::Api::List::Ptr);
00088             Kross::Api::Object::Ptr setLocalSocketFileUsed(Kross::Api::List::Ptr);
00090             Kross::Api::Object::Ptr localSocketFileName(Kross::Api::List::Ptr);
00092             Kross::Api::Object::Ptr setLocalSocketFileName(Kross::Api::List::Ptr);
00093 
00094             // For serverbased drivers
00096             Kross::Api::Object::Ptr databaseName(Kross::Api::List::Ptr);
00098             Kross::Api::Object::Ptr setDatabaseName(Kross::Api::List::Ptr);
00099 
00101             Kross::Api::Object::Ptr hostName(Kross::Api::List::Ptr);
00103             Kross::Api::Object::Ptr setHostName(Kross::Api::List::Ptr);
00104 
00106             Kross::Api::Object::Ptr port(Kross::Api::List::Ptr);
00108             Kross::Api::Object::Ptr setPort(Kross::Api::List::Ptr);
00109 
00111             Kross::Api::Object::Ptr password(Kross::Api::List::Ptr);
00113             Kross::Api::Object::Ptr setPassword(Kross::Api::List::Ptr);
00114 
00116             Kross::Api::Object::Ptr userName(Kross::Api::List::Ptr);
00118             Kross::Api::Object::Ptr setUserName(Kross::Api::List::Ptr);
00119 
00120             // For filebased drivers
00121 
00123             Kross::Api::Object::Ptr fileName(Kross::Api::List::Ptr);
00125             Kross::Api::Object::Ptr setFileName(Kross::Api::List::Ptr);
00126 
00128             Kross::Api::Object::Ptr dbPath(Kross::Api::List::Ptr);
00130             Kross::Api::Object::Ptr dbFileName(Kross::Api::List::Ptr);
00131 
00133             Kross::Api::Object::Ptr serverInfoString(Kross::Api::List::Ptr);
00134     };
00135 
00136 }}
00137 
00138 #endif
00139 
KDE Home | KDE Accessibility Home | Description of Access Keys