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

44 lines
1 KiB
C#
Raw Permalink Normal View History

2021-11-07 19:42:59 +01:00
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,
}
}