DefaultBluetooth.cs 961 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections.ObjectModel;
  2. using InABox.Core;
  3. namespace InABox.Avalonia.Platform;
  4. public class DefaultBluetooth : IBluetooth
  5. {
  6. public Logger? Logger { get; set; }
  7. public async Task<bool> IsAvailable()
  8. {
  9. return await Task.FromResult(false);
  10. }
  11. public async Task<bool> StartScanningAsync(Guid configServiceid)
  12. {
  13. return await Task.FromResult(false);
  14. }
  15. public async Task<bool> StopScanningAsync()
  16. {
  17. return await Task.FromResult(false);
  18. }
  19. public async Task<IConnectedBluetoothDevice> Connect(IBluetoothDevice device)
  20. {
  21. return await Task.FromResult<IConnectedBluetoothDevice?>(null);
  22. }
  23. public async Task<bool> Disconnect(IConnectedBluetoothDevice device)
  24. {
  25. return await Task.FromResult<bool>(true);
  26. }
  27. public event EventHandler? Changed;
  28. public CoreObservableCollection<IBluetoothDevice> Devices { get; } = new();
  29. }