Debian Codegraph @

snap-standard-paths/SnapStandardPaths.h

raw symbols SCIP
1 /* Copyright (C) 2017 Dan Chapman <[email protected]>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef SNAPSTANDARDPATHS_H
19 #define SNAPSTANDARDPATHS_H
20
21 #include <QStringList>
22
23 class Q_CORE_EXPORT SnapStandardPaths
24 {
25 public:
26
27 enum StandardLocation {
28 HomeLocation,
29 CommonHomeLocation,
30 CacheLocation,
31 CommonCacheLocation,
32 AppCacheLocation,
33 CommonAppCacheLocation,
34 DataLocation,
35 CommonDataLocation,
36 AppDataLocation,
37 CommonAppDataLocation,
38 ConfigLocation,
39 CommonConfigLocation,
40 AppConfigLocation,
41 CommonAppConfigLocation
42 };
43
44 enum LocateOption {
45 LocateFile = 0x0,
46 LocateDirectory = 0x1
47 };
48 Q_DECLARE_FLAGS(LocateOptions, LocateOption)
49
50 static QString writableLocation(StandardLocation location);
51 static QStringList standardLocations(StandardLocation location);
52
53 static void setTestModeEnabled(bool testMode);
54 static bool isTestModeEnabled();
55
56 private:
57 // prevent construction
58 SnapStandardPaths();
59 ~SnapStandardPaths();
60 };
61
62 #endif // SNAPSTANDARDPATHS_H