mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using TINK.Services.BluetoothLock.Tdo;
|
|
|
|
namespace TINK.Services.BluetoothLock
|
|
{
|
|
/// <summary>
|
|
/// Represents a not exisitng lock.
|
|
/// </summary>
|
|
public class NullLock : ILockService
|
|
{
|
|
private int BikeId { get; }
|
|
|
|
public NullLock(int bikeId)
|
|
{
|
|
BikeId = bikeId;
|
|
}
|
|
|
|
public Task ReconnectAsync(LockInfoAuthTdo authInfo, TimeSpan connectTimeout) =>
|
|
throw new NotImplementedException();
|
|
|
|
public string Name =>
|
|
throw new NotImplementedException();
|
|
|
|
public Guid Guid =>
|
|
throw new NotImplementedException();
|
|
|
|
public int Id =>
|
|
throw new NotImplementedException();
|
|
|
|
public async Task<LockitLockingState?> OpenAsync() =>
|
|
await Task.FromResult((LockitLockingState?)null);
|
|
|
|
public async Task<LockitLockingState?> CloseAsync() =>
|
|
await Task.FromResult((LockitLockingState?)null);
|
|
|
|
public Task<double> GetBatteryPercentageAsync() =>
|
|
throw new System.Exception($"Can not get battery percentage. Lock {BikeId} not found.");
|
|
|
|
public DeviceState? GetDeviceState() =>
|
|
throw new NotImplementedException();
|
|
|
|
public Task<bool> GetIsAlarmOffAsync() =>
|
|
throw new System.Exception($"Can not get whether alarm is on or off. Lock {BikeId} not found.");
|
|
|
|
public Task<LockInfoTdo> GetLockStateAsync(bool doWaitRetry = false) =>
|
|
throw new NotImplementedException();
|
|
|
|
public Task SetIsAlarmOffAsync(bool isActivated) =>
|
|
throw new System.Exception($"Can not set alarm {isActivated}. Lock {BikeId} not found.");
|
|
|
|
public async Task<bool> SetSoundAsync(SoundSettings settings) =>
|
|
await Task.FromResult(false);
|
|
|
|
public async Task<bool> SetAlarmSettingsAsync(AlarmSettings settings) =>
|
|
await Task.FromResult(false);
|
|
|
|
/// <summary> Disconnect from bluetooth lock. </summary>
|
|
public Task Disconnect() =>
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
}
|