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 <qobject.h>
00024 #include <qstring.h>
00025 #include <qptrlist.h>
00026
00027 namespace KexiDB {
00028
00036 class ConnectionDataBase
00037 {
00038 public:
00039 ConnectionDataBase();
00040
00047 QString caption;
00048
00052 QString description;
00053
00061 int id;
00062
00074 QString driverName;
00075
00081 QString hostName;
00082
00088 unsigned short int port;
00089
00100 bool useLocalSocketFile;
00101
00108 QString localSocketFileName;
00109
00116 QString password;
00117
00125 bool savePassword;
00126
00131 QString userName;
00132
00133 protected:
00140 QString m_fileName;
00141
00147 QString m_dbPath;
00148
00154 QString m_dbFileName;
00155 };
00156
00158
00160 class KEXI_DB_EXPORT ConnectionData : public QObject, public ConnectionDataBase
00161 {
00162 public:
00163 typedef QPtrList<ConnectionData> List;
00164 typedef QPtrListIterator<ConnectionData> ListIterator;
00165
00166 ConnectionData();
00167
00168 ConnectionData(const ConnectionData&);
00169
00170 ~ConnectionData();
00171
00172 ConnectionData& operator=(const ConnectionData& cd);
00173
00181 void setFileName( const QString& fn );
00182
00190 QString fileName() const { return m_fileName; }
00191
00197 QString dbPath() const { return m_dbPath; }
00198
00204 QString dbFileName() const { return m_dbFileName; }
00205
00219 QString serverInfoString(bool addUser = true) const;
00220
00226 uint formatVersion;
00227
00228 protected:
00229 class Private;
00230 Private *priv;
00231
00232 friend class Connection;
00233 };
00234
00235 }
00236
00237 #endif
|