Akonadi

dbconfigsqlite.h
1 /*
2  Copyright (c) 2010 Tobias Koenig <[email protected]>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  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 the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef DBCONFIGSQLITE_H
21 #define DBCONFIGSQLITE_H
22 
23 #include "dbconfig.h"
24 
25 namespace Akonadi
26 {
27 namespace Server
28 {
29 
30 class DbConfigSqlite : public DbConfig
31 {
32 public:
33  enum Version {
34  Default,
35  Custom
36  };
37 
38 public:
39  explicit DbConfigSqlite(Version driver);
40 
44  QString driverName() const override;
45 
49  QString databaseName() const override;
50 
58  bool init(QSettings &settings) override;
59 
64  void apply(QSqlDatabase &database) override;
65 
69  bool useInternalServer() const override;
70 
74  void setup() override;
75 private:
76  bool setPragma(QSqlDatabase &db, QSqlQuery &query, const QString &pragma);
77 
78  Version mDriverVersion;
79  QString mDatabaseName;
80  QString mHostName;
81  QString mUserName;
82  QString mPassword;
83  QString mConnectionOptions;
84 };
85 
86 } // namespace Server
87 } // namespace Akonadi
88 
89 #endif
QUICKADDONS_EXPORT void init()
Helper integration between Akonadi and Qt.
KGuiItem apply()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon May 25 2020 22:46:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.