sharee.bike-App/SharedBusinessLogic/Services/Geolocation/IGeolocationService.cs
2024-04-09 12:53:23 +02:00

20 lines
936 B
C#

using System;
using System.Threading;
using System.Threading.Tasks;
using ShareeBike.Model.Device;
namespace ShareeBike.Services.Geolocation
{
/// <summary> Query geolocation. </summary>
public interface IGeolocationService : 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>
/// <param name="timeStamp">Time when geolocation is of interest. Is used to determine for some implementations whether cached geolocation can be used or not.</param>
/// <returns></returns>
Task<IGeolocation> GetAsync(CancellationToken? cancellationToken = null, DateTime? timeStamp = null);
/// <summary> If true location data returned is simulated.</summary>
bool IsSimulation { get; }
}
}