diff options
author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-03-03 22:56:04 +0100 |
---|---|---|
committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-03-03 22:56:04 +0100 |
commit | eb629f8fa6f7edd3ba9f3e76146d71f62dafff57 (patch) | |
tree | a7d5264c5e4931d1ff6d6b9d456488b90f3f8553 /src/permissionmanager.hpp | |
parent | 1101c88ac7f5c4fbfbabf7d4206d40736562ed29 (diff) |
refractor and add permission manager without save
Diffstat (limited to 'src/permissionmanager.hpp')
-rw-r--r-- | src/permissionmanager.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/permissionmanager.hpp b/src/permissionmanager.hpp new file mode 100644 index 0000000..70c17e9 --- /dev/null +++ b/src/permissionmanager.hpp @@ -0,0 +1,28 @@ +#ifndef PERMISSION_MANAGER_HPP +#define PERMISSION_MANAGER_HPP + +#include <QtWebEngineCore/QWebEnginePage> +#include <filesystem> +#include <fstream> + +class PermissionManager +{ +private: + std::string path; + bool _lock_mouse = false; + bool _location = false; + bool _notification = false; + bool _media_audio_capture = false; + bool _media_video_capture = false; + bool _desktop_video_capture = false; + bool _desktop_audio_video_capture = false; + +public: + PermissionManager(std::string path); + ~PermissionManager(); + void save(); + bool get(QWebEnginePage::Feature feature); + void set(QWebEnginePage::Feature feature, bool value); +}; + +#endif |