12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections.ObjectModel;
- using System.Security.Cryptography.X509Certificates;
- using InABox.Core;
- namespace InABox.Avalonia.Platform;
- public interface IBluetoothDevice
- {
- String ID { get; }
-
- String Name { get; }
- }
- public interface IConnectedBluetoothDevice : IBluetoothDevice
- {
- Task<bool> WriteAsync(Guid serviceid, Guid characteristicid, byte[] data);
-
- Task<byte[]?> ReadAsync(Guid serviceid, Guid characteristicid);
-
- }
- public interface IBluetooth : ILoggable
- {
- Logger? Logger { get; set; }
- Task<bool> IsAvailable();
- //Task<IBluetoothDevice?> FindDevice(Guid serviceId, TimeSpan timeout);
-
- Task<bool> StartScanningAsync(Guid serviceId);
-
- Task<bool> StopScanningAsync();
-
- Task<IConnectedBluetoothDevice?> Connect(IBluetoothDevice deviceid);
-
- Task<bool> Disconnect(IConnectedBluetoothDevice device);
- event EventHandler? Changed;
-
- CoreObservableCollection<IBluetoothDevice> Devices { get; }
-
- }
|