Cross-platform permission status and request interface.
More...
#include <filesystem>
#include <string>
#include <string_view>
#include <vector>
Go to the source code of this file.
Cross-platform permission status and request interface.
◆ can_access_directory()
| bool platf::can_access_directory |
( |
const std::filesystem::path & | path | ) |
|
Check whether this process can list and create files in a directory.
- Parameters
-
| path | Directory to check without modifying its contents. |
- Returns
- True when the directory is present and accessible.
◆ get_permission_statuses()
| std::vector< permission_status_t > platf::get_permission_statuses |
( |
| ) |
|
Query access needed by Sunshine on the current platform.
- Returns
- Permission status records for the Web UI.
◆ request_permission()
| bool platf::request_permission |
( |
std::string_view | id | ) |
|
Initiate a native request or settings action for an access item.
On macOS, Local Network opens Privacy & Security, where the user selects Local Network.
- Parameters
-
| id | Stable identifier of the access item. |
- Returns
- True when the action was recognized and initiated.
◆ required_permissions_granted()
| bool platf::required_permissions_granted |
( |
const std::vector< permission_status_t > & | permissions | ) |
|
Determine whether all verifiable required permissions are granted.
- Parameters
-
| permissions | Current permission status records. |
- Returns
- True when no verifiable required permission is missing.