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; } /// /// Connects the lock. /// /// View model to process connect notifications. Task ConnectAsync(IConnectAndGetStateCommandListener listener); /// /// Disconnects the lock. /// /// View model to process disconnect notifications. Task DisconnectAsync(IDisconnectCommandListener listener); /// /// Opens the lock. /// /// View model to process opening notifications. /// Task which stops polling to be awaited before updating bike object and copri communication. Task OpenLockAsync(IOpenCommandListener listener, Task stopPollingTask); /// /// Closes the lock. /// /// View model to process closing notifications. /// Task which stops polling to be awaited before updating bike object and copri communication. Task CloseLockAsync(ICloseCommandListener listener, Task stopPollingTask); /// /// Reserves the bike. /// /// View model to process reservation notifications. Task ReserveBikeAsync(IStartReservationCommandListener listener); /// /// Cancels the reservation. /// /// View model to process reservation notifications. Task CancelReservationAsync(ICancelReservationCommandListener listener); /// /// Authenticates the user. /// /// View model to process reservation notifications. Task AuthAsync(IAuthCommandListener listener); /// /// Rents the bike. /// /// View model to process renting notifications. Task RentBikeAsync(IStartRentalCommandListener listener); /// /// Returns the bike. /// /// View model to process notifications. /// Task ReturnBikeAsync(IEndRentalCommandListener listener); } }