swift
datastoreutility.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_DB_DATASTOREUTILITY_H
7 #define SWIFT_MISC_DB_DATASTOREUTILITY_H
8 
9 #include <QDateTime>
10 #include <QString>
11 
12 #include "misc/logcategories.h"
13 #include "misc/swiftmiscexport.h"
14 
15 namespace swift::misc
16 {
17  class CStatusMessageList;
18 
19  namespace db
20  {
25  {
26  public:
28  static const QStringList &getLogCategories();
29 
31  CDatastoreUtility() = delete;
32 
34  static bool dbBoolStringToBool(const QString &dbBool);
35 
37  static const QString &boolToDbYN(bool v);
38 
40  static int extractIntegerKey(const QString &stringWithKey);
41 
43  static QString stripKeyInParentheses(const QString &valueWithKey);
44 
46  static QDateTime parseTimestamp(const QString &timestamp);
47 
49  static bool parseAutoPublishResponse(const QString &jsonResponse, CStatusMessageList &messages);
50  };
51  } // namespace db
52 } // namespace swift::misc
53 
54 #endif // SWIFT_MISC_DB_DATASTOREUTILITY_H
Status messages, e.g. from Core -> GUI.
Class with datastore related utilities.
CDatastoreUtility()=delete
No constructor.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.