Requires Header
#include <privilege_information.h>
Overview
A library for reading privilege information of the given privilege and API issue version. It provides the display name or description of privileges. If there's no matching privilege then it shows last token of given privilege or description string for undefined privileges.
Related Features
This API is related with the following features:
- http://tizen.org/feature/security.privacy_privilege
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions |
int | privilege_info_get_display_name (const char *api_version, const char *privilege, char **display_name) |
| Gets the display name of the given privilege.
|
int | privilege_info_get_display_name_by_pkgtype (const char *package_type, const char *api_version, const char *privilege, char **display_name) |
| Gets the display name of the given privilege.
|
int | privilege_info_get_description (const char *api_version, const char *privilege, char **description) |
| Gets the description of the given privilege.
|
int | privilege_info_get_description_by_pkgtype (const char *package_type, const char *api_version, const char *privilege, char **description) |
| Gets the description of the given privilege.
|
int | privilege_info_get_privacy_display_name (const char *privilege, char **privacy_name) |
| Gets the display name of the privacy group in which the given privilege is included.
|
int | privilege_info_get_privacy_privilege_status (const char *privilege, bool *status) |
| Gets the status of the given privacy related privilege.
|
Enumeration Type Documentation
Enumeration for error code for Privilege Information.
- Since :
- 2.3
- Enumerator:
PRVINFO_ERROR_NONE |
Successful
|
PRVINFO_ERROR_INVALID_PARAMETER |
Invalid function parameter
|
PRVINFO_ERROR_OUT_OF_MEMORY |
Out of memory
|
PRVINFO_ERROR_INTERNAL_ERROR |
Unknown error
|
PRVINFO_ERROR_NOT_SUPPORTED |
Not supported (Since 5.0)
|
Function Documentation
Gets the description of the given privilege.
- Since :
- 2.3
- Parameters:
-
[in] | api_version | The API version of the application to get privilege information |
[in] | privilege | The privilege |
[out] | description | The description of the privilege |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the description of the given privilege.
- Since :
- 2.3
- Parameters:
-
[in] | package_type | The type of application package |
[in] | api_version | The API version of the application to get privilege information |
[in] | privilege | The privilege |
[out] | description | The description of the privilege |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the display name of the given privilege.
- Since :
- 2.3
- Parameters:
-
[in] | api_version | The API version of the application to get privilege information |
[in] | privilege | The privilege |
[out] | display_name | The display name of the privilege |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the display name of the given privilege.
- Since :
- 2.3
- Parameters:
-
[in] | package_type | The type of application package |
[in] | api_version | The API version of the application to get privilege information |
[in] | privilege | The privilege |
[out] | display_name | The display name of the privilege |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the display name of the privacy group in which the given privilege is included.
- Since :
- 3.0
- Parameters:
-
[in] | privilege | The privilege |
[out] | privacy_name | The privacy group's display name that the given privilege is included in |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
Gets the status of the given privacy related privilege.
- Deprecated:
- Deprecated since 5.0. Use ppm_check_permission() instead. You can refer to Privacy Privilege Manager.
- Since :
- 3.0
- Parameters:
-
[in] | privilege | The privilege |
[out] | status | true if the privilege is on, and false if the privilege is off |
- Returns:
0
on success, otherwise a negative error value
- Return values:
-