Warning, file /network/ruqola/src/core/managerdatapaths.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002    SPDX-FileCopyrightText: 2018-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqolacore_export.h"
0010 #include <QHash>
0011 #include <QString>
0012 
0013 class LIBRUQOLACORE_EXPORT ManagerDataPaths
0014 {
0015 public:
0016     enum PathType {
0017         Config = 0,
0018         Cache = 1,
0019         Picture = 2,
0020         Video = 3,
0021         PreviewUrl = 4,
0022     };
0023     ManagerDataPaths();
0024     static ManagerDataPaths *self();
0025 
0026     [[nodiscard]] QString path(PathType type, const QString &accountName, const QString &subdirectory = QString()) const;
0027 
0028     [[nodiscard]] QString accountConfigFileName(const QString &accountName) const;
0029     [[nodiscard]] QString accountAvatarConfigPath(const QString &accountName) const;
0030 
0031 private:
0032     LIBRUQOLACORE_NO_EXPORT void initializePaths();
0033     [[nodiscard]] LIBRUQOLACORE_NO_EXPORT QString accountConfigPath(const QString &accountName) const;
0034     QHash<ManagerDataPaths::PathType, QString> mPathTypeHash;
0035 };