![]() |
NDEVR
API Documentation
|
Centralized manager for checking and requesting application permissions. More...
Static Public Member Functions | |
| static void | AddPermissionHandler (PermissionHandler *handler) |
| Registers a platform-specific permission handler. | |
| static PermissionState | CheckPermission (StringView permission) |
| Checks whether the specified permission is currently granted. | |
| static bool | HasCamera () |
| Checks whether camera access is currently granted. | |
| static bool | HasLocationWhenInUse () |
| Checks whether location-when-in-use access is currently granted. | |
| static bool | HasMicrophone () |
| Checks whether microphone access is currently granted. | |
| static void | RemovePermissionHandler (PermissionHandler *handler) |
| Unregisters a previously added permission handler. | |
| static bool | RequestCamera () |
| Requests camera access from the user or system. | |
| static bool | RequestLocationWhenInUse () |
| Requests location-when-in-use access from the user or system. | |
| static bool | RequestMicrophone () |
| Requests microphone access from the user or system. | |
| static PermissionState | RequestPermission (StringView permission) |
| Requests the specified permission from all registered handlers. | |
Static Public Attributes | |
| static constexpr StringView | bluetooth_access = "bluetooth_access" |
| Permission identifier for Bluetooth access. | |
| static constexpr StringView | calendar_access = "calendar_access" |
| Permission identifier for calendar access. | |
| static constexpr StringView | camera_access = "camera_access" |
| Permission identifier for camera access. | |
| static constexpr StringView | contacts_access = "contacts_access" |
| Permission identifier for contacts access. | |
| static constexpr StringView | file_access = "file_access" |
| Permission identifier for file system access. | |
| static constexpr StringView | local_network_access = "local_network_access" |
| Permission identifier for local network discovery access. | |
| static constexpr StringView | location_always = "location_always" |
| Permission identifier for persistent location access. | |
| static constexpr StringView | location_when_in_use = "location_when_in_use" |
| Permission identifier for location access while the app is in use. | |
| static constexpr StringView | microphone_access = "microphone_access" |
| Permission identifier for microphone access. | |
| static constexpr StringView | motion_sensors_access = "motion_sensors_access" |
| Permission identifier for motion sensor access. | |
| static constexpr StringView | network_access = "network_access" |
| Permission identifier for network access. | |
| static constexpr StringView | notifications_access = "notifications_access" |
| Permission identifier for push notification access. | |
| static constexpr StringView | photo_library_access = "photo_library_access" |
| Permission identifier for photo library access. | |
| static Buffer< PermissionHandler * > | s_permission_handlers |
| List of registered platform-specific permission handlers. | |
| static constexpr StringView | speech_recognition = "speech_recognition" |
| Permission identifier for speech recognition access. | |
Centralized manager for checking and requesting application permissions.
Provides a static interface for querying and requesting permissions such as camera, microphone, location, and other system capabilities. Delegates to registered PermissionHandler instances for platform-specific behavior.
Definition at line 43 of file PermissionManager.h.
|
static |
Registers a platform-specific permission handler.
| [in] | handler | The PermissionHandler to add to the handler list. |
|
static |
Checks whether the specified permission is currently granted.
| [in] | permission | The identifier of the permission to check. |
Referenced by HasCamera(), HasLocationWhenInUse(), and HasMicrophone().
|
inlinestatic |
Checks whether camera access is currently granted.
Definition at line 88 of file PermissionManager.h.
References camera_access, CheckPermission(), and e_granted.
|
inlinestatic |
Checks whether location-when-in-use access is currently granted.
Definition at line 110 of file PermissionManager.h.
References CheckPermission(), e_granted, and location_when_in_use.
|
inlinestatic |
Checks whether microphone access is currently granted.
Definition at line 99 of file PermissionManager.h.
References CheckPermission(), e_granted, and microphone_access.
|
static |
Unregisters a previously added permission handler.
| [in] | handler | The PermissionHandler to remove from the handler list. |
|
inlinestatic |
Requests camera access from the user or system.
Definition at line 93 of file PermissionManager.h.
References camera_access, e_granted, and RequestPermission().
|
inlinestatic |
Requests location-when-in-use access from the user or system.
Definition at line 115 of file PermissionManager.h.
References e_granted, location_when_in_use, and RequestPermission().
|
inlinestatic |
Requests microphone access from the user or system.
Definition at line 104 of file PermissionManager.h.
References e_granted, microphone_access, and RequestPermission().
|
static |
Requests the specified permission from all registered handlers.
| [in] | permission | The identifier of the permission to request. |
Referenced by RequestCamera(), RequestLocationWhenInUse(), and RequestMicrophone().