mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 02:26:29 +01:00
43 lines
903 B
C#
43 lines
903 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace TINK.Services.Permissions
|
|
{
|
|
public interface ILocationPermission
|
|
{
|
|
/// <summary> Checks the permission status.</summary>
|
|
/// <returns>Current permission status.</returns>
|
|
Task<Status> CheckStatusAsync();
|
|
|
|
/// <summary> Requests location permission.</summary>
|
|
/// <returns>Permission status after request.</returns>
|
|
Task<Status> RequestAsync();
|
|
|
|
bool OpenAppSettings();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Holds the permission status.
|
|
/// </summary>
|
|
public enum Status
|
|
{
|
|
//
|
|
// Summary:
|
|
// The permission hasn't been granted or requested and is in an unknown state.
|
|
Unknown = 0,
|
|
//
|
|
// Summary:
|
|
// The user has denied the permission.
|
|
Denied = 1,
|
|
|
|
//
|
|
// Summary:
|
|
// The user has denied the permission and .
|
|
DeniedRequiresSettingsUI = 8,
|
|
|
|
//
|
|
// Summary:
|
|
// The user has granted permission.
|
|
Granted = 3,
|
|
|
|
}
|
|
}
|