2022-04-10 17:38:34 +02:00
|
|
|
|
using Plugin.BLE.Abstractions.Contracts;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using TINK.Model.Device;
|
2021-05-13 17:25:46 +02:00
|
|
|
|
|
|
|
|
|
namespace TINK.Services.BluetoothLock.BLE
|
|
|
|
|
{
|
|
|
|
|
public class LockItByScanServiceEventBased : LockItByScanServiceBase, ILocksService
|
|
|
|
|
{
|
2022-04-10 17:38:34 +02:00
|
|
|
|
public LockItByScanServiceEventBased(ICipher cipher, IBluetoothLE bluetoothLE, Func<Task<bool>> isLocationPermissionMissingDelegate, Func<bool> isLocationRequiredAndOffDelegate) : base(
|
2021-05-13 17:25:46 +02:00
|
|
|
|
cipher,
|
2022-04-10 17:38:34 +02:00
|
|
|
|
(bleDevice, authInfo, adapter) => LockItEventBased.Authenticate(bleDevice, authInfo, adapter, cipher),
|
|
|
|
|
bluetoothLE,
|
|
|
|
|
isLocationPermissionMissingDelegate,
|
|
|
|
|
isLocationRequiredAndOffDelegate) { }
|
2021-05-13 17:25:46 +02:00
|
|
|
|
}
|
|
|
|
|
}
|