mirror of
https://github.com/inthehand/32feet.git
synced 2026-10-29 07:07:04 +08:00
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="IBluetooth.cs" company="In The Hand Ltd">
|
|
// Copyright (c) 2023 In The Hand Ltd, All rights reserved.
|
|
// This source code is licensed under the MIT License - see License.txt
|
|
// </copyright>
|
|
//-----------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace InTheHand.Bluetooth
|
|
{
|
|
internal interface IBluetooth
|
|
{
|
|
Task<bool> GetAvailabilityAsync();
|
|
|
|
event EventHandler AvailabilityChanged;
|
|
|
|
Task<BluetoothDevice> RequestDeviceAsync(RequestDeviceOptions options);
|
|
|
|
Task<IReadOnlyCollection<BluetoothDevice>> ScanForDevicesAsync(RequestDeviceOptions options, CancellationToken cancellationToken = default);
|
|
|
|
Task<IReadOnlyCollection<BluetoothDevice>> GetPairedDevicesAsync();
|
|
|
|
Task<BluetoothLEScan> RequestLEScanAsync(BluetoothLEScanOptions options);
|
|
|
|
event EventHandler<BluetoothAdvertisingEvent> AdvertisementReceived;
|
|
}
|
|
}
|