sharee.bike-App/TINKLib/Services/Permissions/ILocationPermission.cs

44 lines
903 B
C#
Raw Normal View History

2021-11-07 19:42:59 +01:00
using System.Threading.Tasks;
namespace TINK.Services.Permissions
{
2022-09-06 16:08:19 +02:00
public interface ILocationPermission
{
/// <summary> Checks the permission status.</summary>
/// <returns>Current permission status.</returns>
Task<Status> CheckStatusAsync();
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
/// <summary> Requests location permission.</summary>
/// <returns>Permission status after request.</returns>
Task<Status> RequestAsync();
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
bool OpenAppSettings();
}
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
/// <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,
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
//
// Summary:
// The user has denied the permission and .
DeniedRequiresSettingsUI = 8,
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
//
// Summary:
// The user has granted permission.
Granted = 3,
2021-11-07 19:42:59 +01:00
2022-09-06 16:08:19 +02:00
}
2021-11-07 19:42:59 +01:00
}