using System.Collections.ObjectModel; using System.Security.Cryptography.X509Certificates; using InABox.Core; namespace InABox.Avalonia.Platform; public interface IBluetoothDevice : IDisposable { String ID { get; } String Name { get; } Guid[] AvailableServices { get; } DateTime LastSeen { get; set; } } public interface IConnectedBluetoothDevice : IBluetoothDevice { Task WriteBytesAsync(Guid serviceid, Guid characteristicid, byte[] data); Task WriteStringAsync(Guid serviceid, Guid characteristicid, string data); Task ReadBytesAsync(Guid serviceid, Guid characteristicid); Task ReadStringAsync(Guid serviceid, Guid characteristicid); } public interface IBluetooth : ILoggable { Logger? Logger { get; set; } Task IsAvailable(); //Task FindDevice(Guid serviceId, TimeSpan timeout); Task StartScanningAsync(Guid configServiceId); Task StopScanningAsync(); Task Connect(IBluetoothDevice deviceid); Task Disconnect(IConnectedBluetoothDevice device); event EventHandler? Changed; CoreObservableCollection Devices { get; } }