aboutsummaryrefslogtreecommitdiff
path: root/src/permissionmanager.hpp
blob: 70c17e946663cb2bfcd37fec69e84587fa0474a7 (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
#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