digiKam
Loading...
Searching...
No Matches
wstoolutils.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2014-09-12
7 * Description : Web Service tool utils methods
8 *
9 * SPDX-FileCopyrightText: 2014-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QSettings>
20#include <QString>
21#include <QDir>
22
23// Local includes
24
25#include "digikam_export.h"
26
27namespace Digikam
28{
29
30class DIGIKAM_EXPORT WSToolUtils
31{
32public:
33
34 WSToolUtils() = default;
35 ~WSToolUtils() = default;
36
37 static QString decodeKey(const QString& key);
38
42 static QString randomString(const int& length);
43
44 static QDir makeTemporaryDir(const char* prefix);
45 static void removeTemporaryDir(const char* prefix);
46
47 static QSettings* getOauthSettings(QObject* const parent);
48
49 static void saveToken(const QString& name, const QString& token);
50
51 static QString readToken(const QString& name);
52
53 static void clearToken(const QString& name);
54
55private:
56
57 static QString oauthConfigFile();
58 static QString possibleCharacters();
59};
60
61} // namespace Digikam
Definition wstoolutils.h:31
QStringView prefix
Definition itemviewutilities.cpp:586
Definition datefolderview.cpp:34