Class Privilege
Definition
- Assembly:
- Tizen.Security.dll
This class provides the information of the given privilege and the API version.
public static class Privilege
- Inheritance
-
objectPrivilege
Methods
View SourceGetDescription(string, string, PackageType)
Gets the description of the given privilege.
Declaration
public static string GetDescription(string apiVersion, string privilege, PackageType packageType)
Parameters
Type | Name | Description |
---|---|---|
string | apiVersion | The API version. |
string | privilege | The privilege. |
PackageType | packageType | The type of application package. |
Returns
Type | Description |
---|---|
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 |
---|---|
System.ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
System.OutOfMemoryException | Thrown when out of memory occurs. |
System.InvalidOperationException | Thrown when an internal error occurs. |
GetDescription(string, string)
Gets the description of the given privilege.
Declaration
public static string GetDescription(string apiVersion, string privilege)
Parameters
Type | Name | Description |
---|---|---|
string | apiVersion | The API version. |
string | privilege | The privilege. |
Returns
Type | Description |
---|---|
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 |
---|---|
System.ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
System.OutOfMemoryException | Thrown when out of memory occurs. |
System.InvalidOperationException | Thrown when an internal error occurs. |
GetDisplayName(string, string, PackageType)
Gets the display name of the given privilege.
Declaration
public static string GetDisplayName(string apiVersion, string privilege, PackageType packageType)
Parameters
Type | Name | Description |
---|---|---|
string | apiVersion | The API version. |
string | privilege | The privilege. |
PackageType | packageType | The type of application package. |
Returns
Type | Description |
---|---|
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 |
---|---|
System.ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
System.OutOfMemoryException | Thrown when out of memory occurs. |
System.InvalidOperationException | Thrown when an internal error occurs. |
GetDisplayName(string, string)
Gets the display name of the given privilege.
Declaration
public static string GetDisplayName(string apiVersion, string privilege)
Parameters
Type | Name | Description |
---|---|---|
string | apiVersion | The API version. |
string | privilege | The privilege. |
Returns
Type | Description |
---|---|
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 |
---|---|
System.ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
System.OutOfMemoryException | Thrown when out of memory occurs. |
System.InvalidOperationException | Thrown when an internal error occurs. |
GetPrivacyDisplayName(string)
Gets the display name of the privacy group in which the given privilege is included.
Declaration
public static string GetPrivacyDisplayName(string privilege)
Parameters
Type | Name | Description |
---|---|---|
string | privilege | The privilege. |
Returns
Type | Description |
---|---|
string | The privacy group's display name that the given privilege is included in. |
Remarks
The privilege must be privacy related.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
System.OutOfMemoryException | Thrown when out of memory occurs. |
System.InvalidOperationException | Thrown when an internal error occurs. |
GetPrivacyPrivilegeStatus(string)
Gets the status of the given privacy related privilege.
Declaration
public static bool GetPrivacyPrivilegeStatus(string privilege)
Parameters
Type | Name | Description |
---|---|---|
string | privilege | The privilege. |
Returns
Type | Description |
---|---|
bool | Status true if the privilege is on and false if the privilege is off. |
Remarks
The privilege must be privacy related.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when there is a null parameter. |
System.ArgumentException | Thrown when there is an invalid parameter. |
System.OutOfMemoryException | Thrown when out of memory occurs. |
System.InvalidOperationException | Thrown when an internal error occurs. |