AusweisApp
Lade ...
Suche ...
Keine Treffer
DiagnosisFirewallDetection.h
gehe zur Dokumentation dieser Datei
1
5#pragma once
6
7#include <QList>
8#include <QObject>
9#include <QSharedPointer>
10
11#if defined(Q_OS_WIN)
12 #include <QProcess>
13#endif
14
15class test_DiagnosisFirewallDetection;
16
17namespace governikus
18{
19
21{
22 private:
23 const QString mName;
24 const bool mEnabled;
25
26 public:
27 FirewallProfile(const QString& pName, bool pEnabled);
28
29 [[nodiscard]] const QString& getName() const
30 {
31 return mName;
32 }
33
34
35 [[nodiscard]] bool getEnabled() const
36 {
37 return mEnabled;
38 }
39
40
41};
42
44{
45 private:
46 QString mName;
47 bool mEnabled;
48 bool mUpToDate;
49
50 public:
51 FirewallSoftware(const QString& pName, bool pEnabled, bool pUpToDate);
52
53 [[nodiscard]] const QString& getName() const
54 {
55 return mName;
56 }
57
58
59 [[nodiscard]] bool getEnabled() const
60 {
61 return mEnabled;
62 }
63
64
65 [[nodiscard]] bool getUpToDate() const
66 {
67 return mUpToDate;
68 }
69
70
71};
72
74 : public QObject
75{
77 friend class ::test_DiagnosisFirewallDetection;
78
79 private:
80 bool mFirstFirewallRuleExists;
81 bool mFirstFirewallRuleEnabled;
82 bool mSecondFirewallRuleExists;
83 bool mSecondFirewallRuleEnabled;
84 QList<QSharedPointer<FirewallSoftware>> mDetectedFirewalls;
85 QList<QSharedPointer<FirewallProfile>> mFirewallProfiles;
86
87 bool mFirstRuleDone;
88 bool mSecondRuleDone;
89 bool mProfilesDone;
90 bool mInstalledFirewallsDone;
91
92#if defined(Q_OS_WIN)
97
103
104 private Q_SLOTS:
105 void onFirstRuleDone(int exitCode, QProcess::ExitStatus exitStatus);
106 void onFirstRuleError(QProcess::ProcessError pError);
107 void onSecondRuleDone(int exitCode, QProcess::ExitStatus exitStatus);
108 void onSecondRuleError(QProcess::ProcessError pError);
109 void onProfilesDone(int exitCode, QProcess::ExitStatus exitStatus);
110 void onProfilesError(QProcess::ProcessError pError);
111 void onInstalledFirewallSoftwareDone(int exitCode, QProcess::ExitStatus exitStatus);
112 void onInstalledFirewallSoftwareError(QProcess::ProcessError pError);
113#endif
114
115 public:
117 void startDetection();
118
120 {
121 return mFirstFirewallRuleExists;
122 }
123
124
126 {
127 return mFirstFirewallRuleEnabled;
128 }
129
130
132 {
133 return mSecondFirewallRuleExists;
134 }
135
136
138 {
139 return mSecondFirewallRuleEnabled;
140 }
141
142
143 [[nodiscard]] const QList<QSharedPointer<FirewallProfile>>& getFirewallProfiles() const
144 {
145 return mFirewallProfiles;
146 }
147
148
149 [[nodiscard]] const QList<QSharedPointer<FirewallSoftware>>& getDetectedFirewalls() const
150 {
151 return mDetectedFirewalls;
152 }
153
154 Q_SIGNALS:
157};
158
159
160} // namespace governikus
Definition DiagnosisFirewallDetection.h:75
void startDetection()
Definition DiagnosisFirewallDetection.cpp:308
bool getFirstRuleEnabled() const
Definition DiagnosisFirewallDetection.h:125
bool getSecondRuleEnabled() const
Definition DiagnosisFirewallDetection.h:137
const QList< QSharedPointer< FirewallSoftware > > & getDetectedFirewalls() const
Definition DiagnosisFirewallDetection.h:149
const QList< QSharedPointer< FirewallProfile > > & getFirewallProfiles() const
Definition DiagnosisFirewallDetection.h:143
DiagnosisFirewallDetection()
Definition DiagnosisFirewallDetection.cpp:286
bool getSecondRuleExists() const
Definition DiagnosisFirewallDetection.h:131
bool getFirstRuleExists() const
Definition DiagnosisFirewallDetection.h:119
Definition DiagnosisFirewallDetection.h:21
FirewallProfile(const QString &pName, bool pEnabled)
Definition DiagnosisFirewallDetection.cpp:402
const QString & getName() const
Definition DiagnosisFirewallDetection.h:29
bool getEnabled() const
Definition DiagnosisFirewallDetection.h:35
Definition DiagnosisFirewallDetection.h:44
FirewallSoftware(const QString &pName, bool pEnabled, bool pUpToDate)
Definition DiagnosisFirewallDetection.cpp:394
bool getEnabled() const
Definition DiagnosisFirewallDetection.h:59
const QString & getName() const
Definition DiagnosisFirewallDetection.h:53
bool getUpToDate() const
Definition DiagnosisFirewallDetection.h:65
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114