blob: ca69b1a21ee2d1786aba1b5e2ffd6da48ccf1682 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#ifndef ENV_SECURITY_H
#define ENV_SECURITY_H
#include <QString>
#include <QUuid>
namespace env
{
// represents a security product, such as an antivirus or a firewall
//
class SecurityProduct
{
public:
SecurityProduct(QUuid guid, QString name, int provider, bool active, bool upToDate);
// guid
//
const QUuid& guid() const;
// display name of the product
//
const QString& name() const;
// a bunch of _WSC_SECURITY_PROVIDER flags
//
int provider() const;
// whether the product is active
//
bool active() const;
// whether its definitions are up-to-date
//
bool upToDate() const;
// string representation of the above
//
QString toString() const;
private:
QUuid m_guid;
QString m_name;
int m_provider;
bool m_active;
bool m_upToDate;
QString providerToString() const;
};
std::vector<SecurityProduct> getSecurityProducts();
struct FileRights
{
QStringList list;
bool hasExecute = false;
bool normalRights = false;
};
struct FileSecurity
{
QString owner;
FileRights rights;
QString error;
};
FileSecurity getFileSecurity(const QString& file);
} // namespace env
#endif // ENV_SECURITY_H
|