//----------------------------------------------------------------------- // // Copyright (c) 2018-20 In The Hand Ltd, All rights reserved. // This source code is licensed under the MIT License - see License.txt // //----------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Threading.Tasks; namespace InTheHand.Bluetooth { [DebuggerDisplay("{Uuid} (Service)")] public sealed partial class GattService { internal GattService(BluetoothDevice device) { Device = device; } public BluetoothDevice Device { get; private set; } public BluetoothUuid Uuid { get { return GetUuid(); } } public bool IsPrimary { get { return GetIsPrimary(); } } public Task GetCharacteristicAsync(BluetoothUuid characteristic) { return PlatformGetCharacteristic(characteristic); } public Task> GetCharacteristicsAsync() { return PlatformGetCharacteristics(); } public Task GetIncludedServiceAsync(BluetoothUuid service) { return PlatformGetIncludedServiceAsync(service); } public Task> GetIncludedServicesAsync() { return PlatformGetIncludedServicesAsync(); } #if DEBUG public event EventHandler ServiceAdded; public event EventHandler ServiceChanged; public event EventHandler ServiceRemoved; #endif } }