kexi

kexidbshortcutfile.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 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 KEXIDBSHORTCUTFILE_H
21#define KEXIDBSHORTCUTFILE_H
22
23#include <tqstring.h>
24
25class KexiProjectData;
26namespace KexiDB { class ConnectionData; }
27
33class KEXICORE_EXPORT KexiDBShortcutFile
34{
35 public:
37 KexiDBShortcutFile( const TQString& fileName );
38
40
46 bool loadProjectData(KexiProjectData& data, TQString* groupKey = 0);
47
56 bool saveProjectData(const KexiProjectData& data, bool savePassword,
57 TQString* groupKey = 0, bool overwriteFirstGroup = true);
58
60 TQString fileName() const;
61
62 protected:
63 class Private;
64 Private *d;
65};
66
72class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
73{
74 public:
76 KexiDBConnShortcutFile( const TQString& fileName );
77
79
84 bool loadConnectionData(KexiDB::ConnectionData& data, TQString* groupKey = 0);
85
94 bool saveConnectionData(const KexiDB::ConnectionData& data,
95 bool savePassword, TQString* groupKey = 0, bool overwriteFirstGroup = true);
96
98 TQString fileName() const { return KexiDBShortcutFile::fileName(); }
99
100 protected:
101};
102
103#if 0
109class KexiDBConnSetShortcutFiles
110{
111 public:
112 KexiDBConnSetShortcutFiles();
113
116 static bool loadConnectionDataSet(KexiDBConnectionSet& set);
117
121 static bool saveConnectionDataSet(const KexiDBConnectionSet& set);
122}
123#endif
124#endif
TQString fileName() const
Database specific connection data, e.g. host, port.
Kexi project core data member.
High-level database connectivity library with database backend drivers.