using System; using System.Threading.Tasks; using TINK.Services.BluetoothLock.Tdo; namespace TINK.Services.BluetoothLock { public enum DeviceState { Disconnected = 0, Connecting = 1, Connected = 2, Limited = 3 /* Mactches Connecting? */ } public interface ILockService { /// Reconnect to lock. Task ReconnectAsync( LockInfoAuthTdo authInfo, TimeSpan connectTimeout); /// Opens lock. /// State of lock after performing open operation. Task OpenAsync(); /// Closes lock. /// State of lock after performing close operation. Task CloseAsync(); string Name { get; } Guid Guid { get; } int Id { get; } /// Gets the device state. DeviceState? GetDeviceState(); /// /// Gets the locking state. /// /// True if to wait and retry in case of failures. /// Task GetLockStateAsync(bool doWaitRetry = false); Task SetSoundAsync(SoundSettings settings); Task GetIsAlarmOffAsync(); Task SetIsAlarmOffAsync(bool isActivated); /// Gets the battery percentage. Task GetBatteryPercentageAsync(); /// Disconnect from lock. Task Disconnect(); } }