mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 03:27:29 +02:00
Version 3.0.290
This commit is contained in:
parent
af3c20ea1c
commit
ad3cdbcadf
231 changed files with 14555 additions and 7798 deletions
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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())) { }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using TINK.MultilingualResources;
|
||||
|
||||
namespace TINK.Services.BluetoothLock.Exception
|
||||
{
|
||||
public class ConnectLocationOffException : System.Exception
|
||||
{
|
||||
public ConnectLocationOffException() : base(Resources.ErrorConnectLockLocationOffException) { }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using TINK.MultilingualResources;
|
||||
|
||||
namespace TINK.Services.BluetoothLock.Exception
|
||||
{
|
||||
public class ConnectLocationPermissionMissingException : System.Exception
|
||||
{
|
||||
public ConnectLocationPermissionMissingException() : base(Resources.ErrorConnectLockLocationPermissingMissingException) { }
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace TINK.Services.BluetoothLock.Exception
|
|||
public class CouldntOpenBoldIsBlockedException : StateAwareException
|
||||
{
|
||||
public CouldntOpenBoldIsBlockedException() : base(
|
||||
LockingState.Unknown,
|
||||
LockingState.UnknownFromHardwareError,
|
||||
MultilingualResources.Resources.ErrorOpenLockBoldBlocked)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace TINK.Services.BluetoothLock.Exception
|
|||
public class CouldntOpenBoldWasBlockedException : StateAwareException
|
||||
{
|
||||
public CouldntOpenBoldWasBlockedException() : base(
|
||||
LockingState.Unknown,
|
||||
LockingState.UnknownFromHardwareError,
|
||||
MultilingualResources.Resources.ErrorOpenLockBoldWasBlocked)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace TINK.Services.BluetoothLock.Tdo
|
||||
{
|
||||
/// <summary> Genuine ILOCKIT state.</summary>
|
||||
public enum LockitLockingState
|
||||
{
|
||||
Open = 0x00,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue