mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-15 06:36:38 +01:00
67 lines
2.2 KiB
C#
67 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
|
using TINK.Services.BluetoothLock.Tdo;
|
|
|
|
namespace TINK.Services.BluetoothLock
|
|
{
|
|
public interface ILocksService
|
|
{
|
|
/// <summary> Holds timeout values for series of connecting attemps to a lock or multiple locks. </summary>
|
|
ITimeOutProvider TimeOut { get; set; }
|
|
|
|
/// <summary> Gets lock info for all lock in reach./// </summary>
|
|
/// <param name="connectTimeout">Timeout for connect operation of a single lock.</param>
|
|
Task<IEnumerable<LockInfoTdo>> GetLocksStateAsync(
|
|
IEnumerable<LockInfoAuthTdo> locksInfo,
|
|
TimeSpan connectTimeout);
|
|
|
|
/// <summary> Connects to lock.</summary>
|
|
/// <param name="authInfo"> Info required to connect to lock.</param>
|
|
/// <param name="connectTimeout">Timeout for connect operation.</param>
|
|
Task<LockInfoTdo> ConnectAsync(
|
|
LockInfoAuthTdo authInfo,
|
|
TimeSpan connectTimeout);
|
|
|
|
/// <summary>Gets a lock by bike Id.</summary>
|
|
/// <param name="bikeId"></param>
|
|
/// <returns>Lock object</returns>
|
|
ILockService this[int bikeId] { get; }
|
|
|
|
/// <summary> Disconnects lock.</summary>
|
|
/// <param name="bikeId"> Id of lock to disconnect.</param>
|
|
/// <param name="bikeGuid"> Guid of lock to disconnect.</param>
|
|
/// <returns> State disconnected it lock is already disconneced or after successfully disconnecting.</returns>
|
|
Task<LockingState> DisconnectAsync(int bikeId, Guid bikeGuid);
|
|
}
|
|
|
|
/// <summary> Alarm types types. </summary>
|
|
/// <remarks> Api-doc v29.0 </remarks>
|
|
public enum AlarmSettings
|
|
{
|
|
SmallSensivity = 2,
|
|
SmallSensivitySilent = 3,
|
|
SmallSensitivityPrealarm = 22,
|
|
MediumSensivity = 4,
|
|
MediumSensivitySilent = 0x05,
|
|
MediumSensivityPrealarm = 0x24,
|
|
HightestSensivity = 0x10,
|
|
HightestSensivitySilent = 0x11,
|
|
HightestSensivityPrealarm = 0x30,
|
|
}
|
|
|
|
/// <summary> Sound types. </summary>
|
|
/// <remarks> Api-doc v29.0 </remarks>
|
|
public enum SoundSettings
|
|
{
|
|
OnLockingStartedWarn = 0x00,
|
|
Warn = 0x01,
|
|
LockingStarted = 0x02,
|
|
AllOff = 0x03, // Mute
|
|
OpenedSuccessfully = 0x04,
|
|
LockingStartedOpenedSuccessfully = 0x05,
|
|
AllOn = 0x06, // All sounds on
|
|
OpenedSuccessfullyWarn = 0x07,
|
|
}
|
|
}
|