1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef LANGUAGE_H
6#define LANGUAGE_H
7
8#include "common/type/menuext.h"
9
10#include <QString>
11#include <QSet>
12
13namespace support_file {
14
15struct Language
16{
17 enum_def(Key_2, QString)
18 {
19 enum_exp suffix = "suffix";
20 enum_exp base = "base";
21 enum_exp mimeType = "mimeType";
22 enum_exp tokenWords = "tokenWords";
23 };
24
25 static QString globalPath();
26 static QString userPath();
27
28 static void initialize();
29 static bool recovery();
30
31 static QStringList ids();
32 static QString id(const QString &filePath);
33 static QString idAlias(const QString &id);
34 static QMap<int, QString> tokenWords(const QString &id);
35 static QSet<QString> suffixs(const QString &id);
36 static QSet<QString> bases(const QString &id);
37 static QSet<QString> mimeTypes(const QString &id);
38};
39
40}
41
42#endif // LANGUAGE_H
43