CCIMXDesktop
 
Loading...
Searching...
No Matches
DesktopDirentInfoSettings.h
1#ifndef DESKTOPDIRENTINFOSETTINGS_H
2#define DESKTOPDIRENTINFOSETTINGS_H
3#include <QString>
4enum class DesktopDirentType : short {
5 Documents,
6 Downloads,
7 Music,
8 Pictures,
9 Videos,
10 Binaries,
11 Config,
12 Cache,
13 Runtime,
14 Trash,
15};
16
20static constexpr const char* DesktopDirentTypeMETAS[] = {
21 "Documentations", "Downloads", "Music", "Pictures",
22 "Videos", "Binaries", "Config", "Cache", "Runtime", "Trash"
23};
24
25static constexpr unsigned short
26 DesktopDirentTypeMAX
27 = static_cast<unsigned short>(DesktopDirentType::Trash) + 1;
28
29static_assert(
30 sizeof(DesktopDirentTypeMETAS) / sizeof(DesktopDirentTypeMETAS[0])
31 == DesktopDirentTypeMAX,
32 "DesktopServerDirentMetas and Enums are count mismatched!");
33
34enum class DesktopServerType {
35 TOAST_SUMMON,
36 PLUGIN_WIDGET_PLACED,
37};
38
39static constexpr const char* DesktopServerTypeMETAS[] = {
40 "Toast Summon"
41 "Plugin Widget Placed"
42};
43
44static constexpr unsigned short
45 DesktopServerTypeMAX
46 = static_cast<unsigned short>(DesktopServerType::PLUGIN_WIDGET_PLACED) + 1;
47
48static constexpr const char* TOAST_SUMMON_DIRENT = ".__toast_summon_dirent";
49static constexpr const char* PLUGIN_WIDGET_PLACED = "plugins";
50
51enum class ConfigureFileName {
52 UserConfig
53};
54
55static constexpr unsigned short
56 ConfigureFileNameMAX
57 = static_cast<unsigned short>(ConfigureFileName::UserConfig) + 1;
58
59static constexpr std::pair<const char*, const char*>
60 configs_dirent_name_pair[] {
61 // using as dirent in config sub, config name
62 { ".", "user_config.json" }
63 };
64
65static_assert(
66 sizeof(configs_dirent_name_pair) / sizeof(configs_dirent_name_pair[0])
67 == ConfigureFileNameMAX,
68 "configs_dirent_name_pair and Enums are count mismatched!");
69
70#endif // DESKTOPDIRENTINFOSETTINGS_H