The Privacy Privilege Manager API provides functions for retrieving and determining application's permissions for privacy privileges.
Required Header
#include <privacy_privilege_manager.h>
Overview
This library allows an application to check if it has permission to use a given privilege. Furthermore, it allows an application to determine permission by displaying a UI dialogue box (pop-up) and requesting a user response.
Typedef Documentation
Enumeration Type Documentation
Enumeration for status codes of a permission request.
- Since :
- 4.0
- Enumerator:
PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ANSWER |
Callback was called with a valid answer.
|
PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ERROR |
Callback was called because of an error.
|
Enumeration for results of a permission check.
- Since :
- 4.0
- Enumerator:
PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ALLOW |
The application has permission to use a privilege.
|
PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_DENY |
The application doesn't have permission to use a privilege.
|
PRIVACY_PRIVILEGE_MANAGER_CHECK_RESULT_ASK |
The user has to be asked whether to grant permission to use a privilege.
|
Enumeration for error codes of Privacy Privilege Manager.
- Since :
- 4.0
- Enumerator:
PRIVACY_PRIVILEGE_MANAGER_ERROR_NONE |
Successful
|
PRIVACY_PRIVILEGE_MANAGER_ERROR_IO_ERROR |
I/O error
|
PRIVACY_PRIVILEGE_MANAGER_ERROR_INVALID_PARAMETER |
Invalid parameter
|
PRIVACY_PRIVILEGE_MANAGER_ERROR_ALREADY_IN_PROGRESS |
Operation already in progress
|
PRIVACY_PRIVILEGE_MANAGER_ERROR_OUT_OF_MEMORY |
Out of memory
|
PRIVACY_PRIVILEGE_MANAGER_ERROR_UNKNOWN |
Unknown error
|
Enumeration for results of a permission request.
- Since :
- 4.0
- Enumerator:
PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_ALLOW_FOREVER |
The user granted permission to use a privilege for an indefinite period of time.
|
PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_FOREVER |
The user denied granting permission to use a privilege for an indefinite period of time.
|
PRIVACY_PRIVILEGE_MANAGER_REQUEST_RESULT_DENY_ONCE |
The user denied granting permission to use a privilege once.
|
Function Documentation
Checks if an application, which calls this function, has permission to use the given privilege.
- Since :
- 4.0
- Parameters:
-
[in] | privilege | The privilege that is to be checked. |
[out] | result | The result of the privilege check. |
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-