kexi
connectiondata.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXIDB_CONNECTION_DATA_H
00021 #define KEXIDB_CONNECTION_DATA_H
00022
00023 #include <kexidb/kexidb_export.h>
00024
00025 #include <qobject.h>
00026 #include <qstring.h>
00027 #include <qptrlist.h>
00028
00029 namespace KexiDB {
00030
00038 class ConnectionDataBase
00039 {
00040 public:
00041 ConnectionDataBase();
00042
00049 QString caption;
00050
00054 QString description;
00055
00063 int id;
00064
00076 QString driverName;
00077
00083 QString hostName;
00084
00090 unsigned short int port;
00091
00102 bool useLocalSocketFile;
00103
00110 QString localSocketFileName;
00111
00118 QString password;
00119
00127 bool savePassword;
00128
00133 QString userName;
00134
00135 protected:
00142 QString m_fileName;
00143
00149 QString m_dbPath;
00150
00156 QString m_dbFileName;
00157 };
00158
00160
00162 class KEXI_DB_EXPORT ConnectionData : public QObject, public ConnectionDataBase
00163 {
00164 public:
00165 typedef QPtrList<ConnectionData> List;
00166 typedef QPtrListIterator<ConnectionData> ListIterator;
00167
00168 ConnectionData();
00169
00170 ConnectionData(const ConnectionData&);
00171
00172 ~ConnectionData();
00173
00174 ConnectionData& operator=(const ConnectionData& cd);
00175
00183 void setFileName( const QString& fn );
00184
00192 QString fileName() const { return m_fileName; }
00193
00199 QString dbPath() const { return m_dbPath; }
00200
00206 QString dbFileName() const { return m_dbFileName; }
00207
00221 QString serverInfoString(bool addUser = true) const;
00222
00228 uint formatVersion;
00229
00230 protected:
00231 class Private;
00232 Private *priv;
00233
00234 friend class Connection;
00235 };
00236
00237 }
00238
00239 #endif
|