mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-03-12 02:26:50 +01:00
77 lines
3.1 KiB
C#
77 lines
3.1 KiB
C#
|
using System.Threading.Tasks;
|
||
|
using ShareeBike.Repository.Request;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock.Command.ConnectAndGetStateCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock.Command.DisconnectCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock.Command.OpenCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock.Command.CloseCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BikeNS.Command.StartReservationCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BikeNS.Command.CancelReservationCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BikeNS.Command.AuthCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BikeNS.Command.StartRentalCommand;
|
||
|
using static ShareeBike.Model.Bikes.BikeInfoNS.BikeNS.Command.EndRentalCommand;
|
||
|
|
||
|
namespace ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock
|
||
|
{
|
||
|
public interface IBikeInfoMutable : BC.IBikeInfoMutable
|
||
|
{
|
||
|
ILockInfoMutable LockInfo { get; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Connects the lock.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process connect notifications.</param>
|
||
|
Task ConnectAsync(IConnectAndGetStateCommandListener listener);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Disconnects the lock.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process disconnect notifications.</param>
|
||
|
Task DisconnectAsync(IDisconnectCommandListener listener);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Opens the lock.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process opening notifications.</param>
|
||
|
/// <param name="stopPollingTask">Task which stops polling to be awaited before updating bike object and copri communication.</param>
|
||
|
Task OpenLockAsync(IOpenCommandListener listener, Task stopPollingTask);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Closes the lock.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process closing notifications.</param>
|
||
|
/// <param name="stopPollingTask">Task which stops polling to be awaited before updating bike object and copri communication.</param>
|
||
|
Task CloseLockAsync(ICloseCommandListener listener, Task stopPollingTask);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Reserves the bike.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process reservation notifications.</param>
|
||
|
Task ReserveBikeAsync(IStartReservationCommandListener listener);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Cancels the reservation.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process reservation notifications.</param>
|
||
|
Task CancelReservationAsync(ICancelReservationCommandListener listener);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Authenticates the user.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process reservation notifications.</param>
|
||
|
Task AuthAsync(IAuthCommandListener listener);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Rents the bike.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process renting notifications.</param>
|
||
|
Task RentBikeAsync(IStartRentalCommandListener listener);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns the bike.
|
||
|
/// </summary>
|
||
|
/// <param name="listener">View model to process notifications.</param>
|
||
|
/// <returns></returns>
|
||
|
Task<BookingFinishedModel> ReturnBikeAsync(IEndRentalCommandListener listener);
|
||
|
}
|
||
|
}
|