Class Privilege

Definition

Namespace:
Tizen.Security
Assembly:
Tizen.Security.dll

Stores the information on the given privilege and the API version.

C#
Copy
public static class Privilege
Inheritance
object
Privilege

Methods

View Source

GetDescription(string, string, PackageType)

Gets the description of the given privilege by type of application package.

Declaration
C#
Copy
public static string GetDescription(string apiVersion, string privilege, PackageType packageType)
Parameters
Type Name Description
string apiVersion

API version of the application.

string privilege

Given privilege.

PackageType packageType

Type of application package.

Returns
Type Description
string

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. Since Tizen 6.0, if there's no matching privilege then it returns ArgumentException.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when there is a null parameter.

System.ArgumentException

Thrown when there is an invalid parameter, such as a non-existing privilege.

System.OutOfMemoryException

Thrown when out of memory.

System.InvalidOperationException

Thrown when an internal error occurs.

View Source

GetDescription(string, string)

Gets the description of the given privilege.

Declaration
C#
Copy
public static string GetDescription(string apiVersion, string privilege)
Parameters
Type Name Description
string apiVersion

API version of the application.

string privilege

Given privilege.

Returns
Type Description
string

Description of given privilege at the given API version

Remarks

If there's no matching privilege, then it returns description string for undefined privilege. Since Tizen 6.0, if there's no matching privilege then it returns ArgumentException.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when there is a null parameter.

System.ArgumentException

Thrown when there is an invalid parameter, such as a non-existing privilege.

System.OutOfMemoryException

Thrown when out of memory.

System.InvalidOperationException

Thrown when an internal error occurs.

View Source

GetDisplayName(string, string, PackageType)

Gets the display name of the given privilege by type of application package.

Declaration
C#
Copy
public static string GetDisplayName(string apiVersion, string privilege, PackageType packageType)
Parameters
Type Name Description
string apiVersion

API version of the application.

string privilege

Given privilege.

PackageType packageType

Type of application package.

Returns
Type Description
string

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. Since Tizen 6.0, if there's no matching privilege then it returns ArgumentException.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when there is a null parameter.

System.ArgumentException

Thrown when there is an invalid parameter, such as a non-existing privilege.

System.OutOfMemoryException

Thrown when out of memory.

System.InvalidOperationException

Thrown when an internal error occurs.

View Source

GetDisplayName(string, string)

Gets the display name of the given privilege.

Declaration
C#
Copy
public static string GetDisplayName(string apiVersion, string privilege)
Parameters
Type Name Description
string apiVersion

API version of the application.

string privilege

Given privilege.

Returns
Type Description
string

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. Since Tizen 6.0, if there's no matching privilege then it returns ArgumentException.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when there is a null parameter.

System.ArgumentException

Thrown when there is an invalid parameter, such as a non-existing privilege.

System.OutOfMemoryException

Thrown when out of memory.

System.InvalidOperationException

Thrown when an internal error occurs.

View Source

GetPrivacyDisplayName(string)

[Obsolete("Please do not use! This method is deprecated")]

Declaration
C#
Copy
[Obsolete("Deprecated since API level 11.")] public static string GetPrivacyDisplayName(string privilege)
Parameters
Type Name Description
string privilege

Given privilege.

Returns
Type Description
string

Privacy group's display name in which the given privilege is included.

Remarks

Given privilege must be privacy related.

Exceptions
Type Condition
System.NotSupportedException

Thrown when required feature is not supported.

System.ArgumentNullException

Thrown when there is a null parameter.

System.ArgumentException

Thrown when there is an invalid parameter, such as a non-existing privilege.

System.OutOfMemoryException

Thrown when out of memory.

System.InvalidOperationException

Thrown when an internal error occurs.