diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-01 12:38:35 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-01 12:38:35 -0400 |
| commit | 7c1ce768ef38dc194583bd3c522596bd124890f2 (patch) | |
| tree | 8d6817f2f4ec99cc82f68bd01be01fd295057089 /src/shared/util.h | |
| parent | 553a4d12a7891a463b87406ec1550b874518b001 (diff) | |
now handles windows firewall, which apparently doens't report itself to wmi
some more error checking
Diffstat (limited to 'src/shared/util.h')
| -rw-r--r-- | src/shared/util.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 2296651c..e0da8a99 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -241,18 +241,25 @@ private: };
-class SecurityFeature
+class SecurityProduct
{
public:
- SecurityFeature(QString name, DWORD state);
+ SecurityProduct(
+ QString name, int provider,
+ bool active, bool upToDate);
const QString& name() const;
+ int provider() const;
+ bool active() const;
+ bool upToDate() const;
QString toString() const;
private:
QString m_name;
- DWORD m_state;
+ int m_provider;
+ bool m_active;
+ bool m_upToDate;
};
@@ -271,17 +278,20 @@ public: //
const WindowsInfo& windowsInfo() const;
- // information about the installed antivirus
+ // information about the installed security products
//
- const std::vector<SecurityFeature>& securityFeatures() const;
+ const std::vector<SecurityProduct>& securityProducts() const;
private:
std::vector<Module> m_modules;
WindowsInfo m_windows;
- std::vector<SecurityFeature> m_security;
+ std::vector<SecurityProduct> m_security;
- void getLoadedModules();
- void getSecurityFeatures();
+ std::vector<Module> getLoadedModules() const;
+ std::vector<SecurityProduct> getSecurityProducts() const;
+
+ std::vector<SecurityProduct> getSecurityProductsFromWMI() const;
+ std::optional<SecurityProduct> getWindowsFirewall() const;
};
|
