-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathqaplatformutils.h
53 lines (44 loc) · 1.54 KB
/
qaplatformutils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Copyright (C) 2024-2025 QuasarApp.
* Distributed under the lgplv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#ifndef PLATFORMUTILS_H
#define PLATFORMUTILS_H
#include <QString>
#include "quasarapp_global.h"
namespace QuasarAppUtils {
/**
* @brief The iPlatformUtils class bas interface for get access platform dependet functions and constants.
*/
class QUASARAPPSHARED_EXPORT PlatformUtils
{
public:
PlatformUtils();
/**
* @brief isSnap This method check destribution type. true if the application packed as a snap.
* @return true if the application packaged as a snap else false.
*/
static bool isSnap();
/**
* @brief snapRootFS returns root file system of main OS (available read only)
* @return path ro main os root.
*/
static QString snapRootFS();
/**
* @brief transportPathToSnapRoot change path to snap avaialble.
* @param path source path of main OS.
* @return readable path location for snap pacakge.
* @note this method is not a fast, so not invoke it too offten.
*/
static QString transportPathToSnapRoot(const QString &path);
/**
* @brief checkSystemBakupSnapInterface This method check access to bakcup permision of snap pacakge.
* This permision required to get access to rootfs of main OS.
* @return true if the app have this accesss.
*/
static bool checkSystemBakupSnapInterface();
};
}
#endif // IPLATFORMUTILS_H