sharee.bike-App/TINKLib/Services/Geolocation/IGeolocation.cs

22 lines
1,001 B
C#
Raw Normal View History

2021-05-13 20:03:07 +02:00
using System;
using System.Threading;
2021-05-13 20:03:07 +02:00
using System.Threading.Tasks;
using TINK.Model.Device;
using Xamarin.Essentials;
namespace TINK.Model.Services.Geolocation
{
/// <summary> Query geolocation. </summary>
public interface IGeolocation : IGeolodationDependent
{
/// <summary> Gets the current location.</summary>
/// <param name="cancellationToken">Token to cancel request for geolocation. If null request can not be cancels and times out after GeolocationService.GEOLOCATIONREQUEST_TIMEOUT_MS if geolocation is not available.</param>
2021-05-13 20:03:07 +02:00
/// <param name="timeStamp">Time when geolocation is of interest. Is used to determine for some implementations whether cached geoloation can be used or not.</param>
/// <returns></returns>
Task<Location> GetAsync(CancellationToken? cancellationToken = null, DateTime? timeStamp = null);
2021-05-13 20:03:07 +02:00
/// <summary> If true location data returned is simulated.</summary>
bool IsSimulation { get; }
}
}