Version 3.0.290

This commit is contained in:
Oliver Hauff 2022-04-10 17:38:34 +02:00
parent af3c20ea1c
commit ad3cdbcadf
231 changed files with 14555 additions and 7798 deletions

View file

@ -2,9 +2,16 @@
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary>
/// If fired if app is disconnected from bluetooth.
/// </summary>
/// <remarks>
/// Member to determine if app is disconnected: IDevice.State from server Plugin.BLE. If DeviceState.Disconnected exception is fired.
/// All possible states: Disconnected, Connecting, Connected, Limited.
/// </remarks>
public class BluetoothDisconnectedException : StateAwareException
{
public BluetoothDisconnectedException() : base(LockingState.Disconnected, MultilingualResources.Resources.ErrorBluetoothDisconnectedException)
public BluetoothDisconnectedException() : base(LockingState.UnknownDisconnected, MultilingualResources.Resources.ErrorBluetoothDisconnectedException)
{
}
}

View file

@ -0,0 +1,17 @@

using TINK.MultilingualResources;
namespace TINK.Services.BluetoothLock.Exception
{
/// <summary> Exception which is fired when bluetooth is not on. </summary>
/// <remarks>
/// Member to determine if app is disconnected: IBluetoothLE.State from server Plugin.BLE. If current value is not BluetoothState.On exception is fired.
/// All possible states: Unknown, Unavailable, Unauthorized, TurningOn, On, TurningOff, Off.
/// </remarks>
public class ConnectBluetoothNotOnException : System.Exception
{
public ConnectBluetoothNotOnException() : base(Resources.ErrorConnectLockBluetoothOffException) { }
public ConnectBluetoothNotOnException(object state) : base(string.Format(Resources.ErrorConnectLockBluetoothNotOnException, state.ToString())) { }
}
}

View file

@ -0,0 +1,9 @@
using TINK.MultilingualResources;
namespace TINK.Services.BluetoothLock.Exception
{
public class ConnectLocationOffException : System.Exception
{
public ConnectLocationOffException() : base(Resources.ErrorConnectLockLocationOffException) { }
}
}

View file

@ -0,0 +1,9 @@
using TINK.MultilingualResources;
namespace TINK.Services.BluetoothLock.Exception
{
public class ConnectLocationPermissionMissingException : System.Exception
{
public ConnectLocationPermissionMissingException() : base(Resources.ErrorConnectLockLocationPermissingMissingException) { }
}
}

View file

@ -5,7 +5,7 @@ namespace TINK.Services.BluetoothLock.Exception
public class CouldntCloseBoldBlockedException : StateAwareException
{
public CouldntCloseBoldBlockedException() : base(
LockingState.Unknown, // Lock is closed in most cases, but this is not guarnteed according to haveltec.
LockingState.UnknownFromHardwareError, // Lock is closed in most cases, but this is not guaranteed according to haveltec.
MultilingualResources.Resources.ErrorCloseLockBoldBlocked)
{
}

View file

@ -9,7 +9,7 @@ namespace TINK.Services.BluetoothLock.Exception
public CouldntCloseInconsistentStateExecption(LockingState state) :
base(
state,
state != LockingState.Unknown
state != LockingState.UnknownFromHardwareError
? string.Format(Resources.ErrorCloseLockUnexpectedState, state)
: Resources.ErrorCloseLockUnknownPosition)
{

View file

@ -8,7 +8,7 @@ namespace TINK.Services.BluetoothLock.Exception
public class CouldntOpenBoldIsBlockedException : StateAwareException
{
public CouldntOpenBoldIsBlockedException() : base(
LockingState.Unknown,
LockingState.UnknownFromHardwareError,
MultilingualResources.Resources.ErrorOpenLockBoldBlocked)
{
}

View file

@ -8,7 +8,7 @@ namespace TINK.Services.BluetoothLock.Exception
public class CouldntOpenBoldWasBlockedException : StateAwareException
{
public CouldntOpenBoldWasBlockedException() : base(
LockingState.Unknown,
LockingState.UnknownFromHardwareError,
MultilingualResources.Resources.ErrorOpenLockBoldWasBlocked)
{
}

View file

@ -27,7 +27,7 @@ namespace TINK.Model.Bike.BluetoothLock
continue;
}
var state = lockInfoTdo.State.HasValue ? lockInfoTdo.State.Value.GetLockingState() : LockingState.Disconnected;
var state = lockInfoTdo.State.HasValue ? lockInfoTdo.State.Value.GetLockingState() : LockingState.UnknownDisconnected;
locksInfoUpdated.Add(state != lockInfo.State || lockInfoTdo.Guid != lockInfo.Guid
? new LockInfo.Builder(lockInfo) { Guid = lockInfoTdo.Guid, State = state}.Build() // State has changed, update required.
@ -43,7 +43,7 @@ namespace TINK.Model.Bike.BluetoothLock
{
case LockitLockingState.Unknown:
case LockitLockingState.CouldntOpenBoldBlocked: // Lock is closed in most cases, but this is not guarnteed according to haveltec.
return LockingState.Unknown;
return LockingState.UnknownFromHardwareError;
case LockitLockingState.Open:
case LockitLockingState.CouldntCloseMoving:

View file

@ -2,6 +2,7 @@
namespace TINK.Services.BluetoothLock.Tdo
{
/// <summary> Genuine ILOCKIT state.</summary>
public enum LockitLockingState
{
Open = 0x00,