Class Privilege
Definition
- Namespace:
- Tizen.Security
- Assembly:
- Tizen.Security.dll
- API Level:
- 3
This class provides the information of the given privilege and the API version.
C#Copypublic static class Privilege
- Inheritance
-
Privilege
Methods
Declaration
C#Copypublic static string GetDescription(string apiVersion, string privilege)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiVersion | The API version. |
System.String | privilege | The privilege. |
Returns
Type | Description |
---|---|
System.String | The description of given privilege at the given API version |
Remarks
If there's no matching privilege, then it returns description string for undefined privilege.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
OutOfMemoryException | Thrown when out of memory occurs. |
InvalidOperationException | Thrown when an internal error occurs. |
API Level: 3
GetDescription(String, String, PackageType)
Gets the description of the given privilege.
Declaration
C#Copypublic static string GetDescription(string apiVersion, string privilege, PackageType packageType)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiVersion | The API version. |
System.String | privilege | The privilege. |
PackageType | packageType | The type of application package. |
Returns
Type | Description |
---|---|
System.String | The description of given privilege at the given API version and the package type. |
Remarks
If there's no matching privilege, then it returns description string for undefined privilege.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
OutOfMemoryException | Thrown when out of memory occurs. |
InvalidOperationException | Thrown when an internal error occurs. |
API Level: 3
Declaration
C#Copypublic static string GetDisplayName(string apiVersion, string privilege)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiVersion | The API version. |
System.String | privilege | The privilege. |
Returns
Type | Description |
---|---|
System.String | The display name of the given privilege at the given API version. |
Remarks
If there's no matching privilege, then it returns last token of the given privilege.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
OutOfMemoryException | Thrown when out of memory occurs. |
InvalidOperationException | Thrown when an internal error occurs. |
API Level: 3
GetDisplayName(String, String, PackageType)
Gets the display name of the given privilege.
Declaration
C#Copypublic static string GetDisplayName(string apiVersion, string privilege, PackageType packageType)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiVersion | The API version. |
System.String | privilege | The privilege. |
PackageType | packageType | The type of application package. |
Returns
Type | Description |
---|---|
System.String | The display name of the given privilege at the given API version and the package type. |
Remarks
If there's no matching privilege, then it returns last token of the given privilege.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
OutOfMemoryException | Thrown when out of memory occurs. |
InvalidOperationException | Thrown when an internal error occurs. |
API Level: 3
GetPrivacyDisplayName(String)
Gets the display name of the privacy group in which the given privilege is included.
Declaration
C#Copypublic static string GetPrivacyDisplayName(string privilege)
Parameters
Type | Name | Description |
---|---|---|
System.String | privilege | The privilege. |
Returns
Type | Description |
---|---|
System.String | The privacy group's display name that the given privilege is included in. |
Remarks
The privilege must be privacy related.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
OutOfMemoryException | Thrown when out of memory occurs. |
InvalidOperationException | Thrown when an internal error occurs. |
System.NotSupportedException | The required feature is not supported. |
API Level: 3
Feature: http://tizen.org/feature/security.privacy_privilege
GetPrivacyPrivilegeStatus(String)
Gets the status of the given privacy related privilege.
Declaration
C#Copy[Obsolete("Deprecated since API level 5. Please use PrivacyPrivilegeManager.CheckPermission instead.")] public static bool GetPrivacyPrivilegeStatus(string privilege)
Parameters
Type | Name | Description |
---|---|---|
System.String | privilege | The privilege. |
Returns
Type | Description |
---|---|
Boolean | Status true if the privilege is on and false if the privilege is off. |
Remarks
The privilege must be privacy related.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
OutOfMemoryException | Thrown when out of memory occurs. |
InvalidOperationException | Thrown when an internal error occurs. |
System.NotSupportedException | The required feature is not supported. |