Class IBluetoothDongleExtensions
- Namespace
- Jabra.NET.Sdk.DevicePairing
- Assembly
- Jabra.NET.Sdk.DevicePairing.dll
public static class IBluetoothDongleExtensions
- Inheritance
-
IBluetoothDongleExtensions
- Inherited Members
Fields
DefaultScanDuration
20 seconds
public static readonly TimeSpan DefaultScanDuration
Field Value
DefaultTimeout
10 seconds
public static readonly TimeSpan DefaultTimeout
Field Value
Methods
ConnectTo(IBluetoothDongle, IBluetoothAddress)
public static Task<IBluetoothChildDevice> ConnectTo(this IBluetoothDongle bluetoothDongle, IBluetoothAddress bluetoothAddress)
Parameters
bluetoothDongle
IBluetoothDonglebluetoothAddress
IBluetoothAddress
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Remarks
When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.
Exceptions
- TimeoutException
When the connection could not be established within the allotted time span.
- DeviceNotPairedException
When the specified address is not currently paired with the dongle
- SdkUsageException
ConnectTo(IBluetoothDongle, IPairingListEntry)
Connect to a device that is already paired with the dongle.
public static Task<IBluetoothChildDevice> ConnectTo(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry)
Parameters
bluetoothDongle
IBluetoothDonglepairingListEntry
IPairingListEntry
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Remarks
When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.
Exceptions
- TimeoutException
When the connection could not be established within the allotted time span.
- DeviceNotPairedException
When the specified address is not currently paired with the dongle
- SdkUsageException
ConnectTo(IBluetoothDongle, IPairingListEntry, TimeSpan)
Connect to a device that is already paired with the dongle.
public static Task<IBluetoothChildDevice> ConnectTo(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry, TimeSpan timeout)
Parameters
bluetoothDongle
IBluetoothDonglepairingListEntry
IPairingListEntrytimeout
TimeSpan
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Remarks
When a device is connected successfully, it may not be detected by the SDK. This will happen for 3rd party devices connected to the dongle, and certain Jabra devices that have limited communication capabilities when connected over Bluetooth.
Exceptions
- TimeoutException
When the connection could not be established within the allotted time span.
- DeviceNotPairedException
When the specified address is not currently paired with the dongle
- SdkUsageException
DisconnectFrom(IBluetoothDongle, IBluetoothAddress)
Disconnect from a device with the specified Bluetooth address.
public static Task DisconnectFrom(this IBluetoothDongle bluetoothDongle, IBluetoothAddress bluetoothAddress)
Parameters
bluetoothDongle
IBluetoothDonglebluetoothAddress
IBluetoothAddress
Returns
Exceptions
- TimeoutException
When the disconnect was not reported within the allotted time span.
DisconnectFrom(IBluetoothDongle, IPairingListEntry)
Disconnect from a device with the specified Bluetooth address.
public static Task DisconnectFrom(this IBluetoothDongle bluetoothDongle, IPairingListEntry bluetoothDevice)
Parameters
bluetoothDongle
IBluetoothDonglebluetoothDevice
IPairingListEntry
Returns
Exceptions
- TimeoutException
When the disconnect was not reported within the allotted time span.
DisconnectFrom(IBluetoothDongle, IPairingListEntry, TimeSpan)
Disconnect from a device with the specified Bluetooth address.
public static Task DisconnectFrom(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry, TimeSpan timeout)
Parameters
bluetoothDongle
IBluetoothDonglepairingListEntry
IPairingListEntrytimeout
TimeSpan
Returns
Exceptions
- TimeoutException
When the disconnect was not reported within the allotted time span.
PairAndConnectTo(IBluetoothDongle, IBluetoothAddress)
public static Task<IBluetoothChildDevice> PairAndConnectTo(this IBluetoothDongle bluetoothDongle, IBluetoothAddress bluetoothAddress)
Parameters
bluetoothDongle
IBluetoothDonglebluetoothAddress
IBluetoothAddressThe Bluetooth address of the other device.
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Exceptions
- TimeoutException
When the other device doesn't pair and connect within the allotted time span.
- See Also
PairAndConnectTo(IBluetoothDongle, IScanEntry)
public static Task<IBluetoothChildDevice> PairAndConnectTo(this IBluetoothDongle bluetoothDongle, IScanEntry scanEntry)
Parameters
bluetoothDongle
IBluetoothDonglescanEntry
IScanEntryA result returned from device scanning.
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Exceptions
- TimeoutException
When the other device doesn't pair and connect within the allotted time span.
- See Also
PairAndConnectTo(IBluetoothDongle, IScanEntry, TimeSpan)
Pair with and connect to another Bluetooth device.
public static Task<IBluetoothChildDevice> PairAndConnectTo(this IBluetoothDongle bluetoothDongle, IScanEntry scanEntry, TimeSpan timeout)
Parameters
bluetoothDongle
IBluetoothDonglescanEntry
IScanEntryA result returned from device scanning.
timeout
TimeSpanThe maximum amount of time to wait for the pairing and connection process to complete.
Returns
- Task<IBluetoothChildDevice>
An IBluetoothChildDevice with information about the connected device
Exceptions
- TimeoutException
When the other device doesn't pair and connect within the allotted time span.
- See Also
ScanForDevicesInPairingMode(IBluetoothDongle)
public static IObservable<IScanEntry> ScanForDevicesInPairingMode(this IBluetoothDongle bluetoothDongle)
Parameters
bluetoothDongle
IBluetoothDongle
Returns
- IObservable<IScanEntry>
An observable that emits when new devices are found.
Unpair(IBluetoothDongle, IPairingListEntry)
Remove the pairing to the device with the specified Bluetooth address.
public static Task Unpair(this IBluetoothDongle bluetoothDongle, IPairingListEntry pairingListEntry)
Parameters
bluetoothDongle
IBluetoothDonglepairingListEntry
IPairingListEntry
Returns
Exceptions
- DeviceNotPairedException
When the specified address is not currently paired with the dongle
- UnpairConnectedDeviceException
When the specified device is currently connected to the dongle, it cannot be unpaired.