C# Class Plugin.BLE.Abstractions.AdapterBase

Inheritance: IAdapter
Mostra file Open project: xabre/xamarin-bluetooth-le

Public Methods

Method Description
ConnectToDeviceAsync ( IDevice device, bool autoconnect = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
ConnectToKnownDeviceAsync ( System.Guid deviceGuid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
DisconnectDeviceAsync ( IDevice device ) : Task
GetSystemConnectedOrPairedDevices ( System.Guid services = null ) : List
HandleConnectedDevice ( IDevice device ) : void
HandleConnectionFail ( IDevice device, string errorMessage ) : void
HandleDisconnectedDevice ( bool disconnectRequested, IDevice device ) : void
HandleDiscoveredDevice ( IDevice device ) : void
StartScanningForDevicesAsync ( System.Guid serviceUuids = null, bool>.Func deviceFilter = null, bool allowDuplicatesKey = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
StopScanningForDevicesAsync ( ) : Task

Protected Methods

Method Description
AdapterBase ( ) : System
ConnectToDeviceNativeAsync ( IDevice device, bool autoconnect, CancellationToken cancellationToken ) : Task
DisconnectDeviceNative ( IDevice device ) : void
StartScanningForDevicesNativeAsync ( System.Guid serviceUuids, bool allowDuplicatesKey, CancellationToken scanCancellationToken ) : Task
StopScanNative ( ) : void

Private Methods

Method Description
CleanupScan ( ) : void

Method Details

AdapterBase() protected method

protected AdapterBase ( ) : System
return System

ConnectToDeviceAsync() public method

public ConnectToDeviceAsync ( IDevice device, bool autoconnect = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
device IDevice
autoconnect bool
cancellationToken System.Threading.CancellationToken
return Task

ConnectToDeviceNativeAsync() protected abstract method

protected abstract ConnectToDeviceNativeAsync ( IDevice device, bool autoconnect, CancellationToken cancellationToken ) : Task
device IDevice
autoconnect bool
cancellationToken System.Threading.CancellationToken
return Task

ConnectToKnownDeviceAsync() public abstract method

public abstract ConnectToKnownDeviceAsync ( System.Guid deviceGuid, CancellationToken cancellationToken = default(CancellationToken) ) : Task
deviceGuid System.Guid
cancellationToken System.Threading.CancellationToken
return Task

DisconnectDeviceAsync() public method

public DisconnectDeviceAsync ( IDevice device ) : Task
device IDevice
return Task

DisconnectDeviceNative() protected abstract method

protected abstract DisconnectDeviceNative ( IDevice device ) : void
device IDevice
return void

GetSystemConnectedOrPairedDevices() public abstract method

public abstract GetSystemConnectedOrPairedDevices ( System.Guid services = null ) : List
services System.Guid
return List

HandleConnectedDevice() public method

public HandleConnectedDevice ( IDevice device ) : void
device IDevice
return void

HandleConnectionFail() public method

public HandleConnectionFail ( IDevice device, string errorMessage ) : void
device IDevice
errorMessage string
return void

HandleDisconnectedDevice() public method

public HandleDisconnectedDevice ( bool disconnectRequested, IDevice device ) : void
disconnectRequested bool
device IDevice
return void

HandleDiscoveredDevice() public method

public HandleDiscoveredDevice ( IDevice device ) : void
device IDevice
return void

StartScanningForDevicesAsync() public method

public StartScanningForDevicesAsync ( System.Guid serviceUuids = null, bool>.Func deviceFilter = null, bool allowDuplicatesKey = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
serviceUuids System.Guid
deviceFilter bool>.Func
allowDuplicatesKey bool
cancellationToken System.Threading.CancellationToken
return Task

StartScanningForDevicesNativeAsync() protected abstract method

protected abstract StartScanningForDevicesNativeAsync ( System.Guid serviceUuids, bool allowDuplicatesKey, CancellationToken scanCancellationToken ) : Task
serviceUuids System.Guid
allowDuplicatesKey bool
scanCancellationToken System.Threading.CancellationToken
return Task

StopScanNative() protected abstract method

protected abstract StopScanNative ( ) : void
return void

StopScanningForDevicesAsync() public method

public StopScanningForDevicesAsync ( ) : Task
return Task