mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 23:26:26 +01:00
44 lines
1.8 KiB
C#
44 lines
1.8 KiB
C#
using System;
|
|
using ShareeBike.Model.State;
|
|
using ShareeBike.Repository;
|
|
using ShareeBike.Repository.Response;
|
|
using ShareeBike.Repository.Response.Stations;
|
|
|
|
namespace ShareeBike.Model.Services.CopriApi
|
|
{
|
|
public interface ICopriCache : ICopriServer
|
|
{
|
|
/// <summary> Gets a value indicating whether stations are expired or not.</summary>
|
|
bool IsStationsExpired { get; }
|
|
|
|
/// <summary> Adds a stations all response to cache.</summary>
|
|
/// <param name="stations">Stations to add.</param>
|
|
void AddToCache(StationsAvailableResponse stations);
|
|
|
|
/// <summary> Gets a value indicating whether stations are expired or not.</summary>
|
|
bool IsBikesAvailableExpired { get; }
|
|
|
|
/// <summary> Adds a bikes response to cache.</summary>
|
|
/// <param name="bikes">Bikes to add.</param>
|
|
/// <param name="operatorUri">Uri of the operator host to get bikes from or null if bikes have to be gotten form primary host.</param>
|
|
/// <param name="stationId"> Id of station which is used for filtering bikes. Null if no filtering should be applied.</param>
|
|
/// <param name="bikeId"> Id of bike to get.</param>
|
|
void AddToCache(BikesAvailableResponse bikes, Uri operatorUri = null, string stationId = null, string bikeId = null);
|
|
|
|
/// <summary> Gets a value indicating whether stations are expired or not.</summary>
|
|
bool IsBikesOccupiedExpired { get; }
|
|
|
|
/// <summary> Adds a bikes response to cache.</summary>
|
|
/// <param name="bikes">Bikes to add.</param>
|
|
void AddToCache(BikesReservedOccupiedResponse bikes);
|
|
|
|
/// <summary>
|
|
/// Updates cache from bike which changed rental state.
|
|
/// </summary>
|
|
/// <param name="response"></param>
|
|
void Update(BikeInfoReservedOrBooked response);
|
|
|
|
/// <summary> Updates cache from bike which changed rental state (reservation/ booking canceled). </summary>
|
|
void Update(BookingActionResponse response);
|
|
}
|
|
}
|