Class BluetoothRemoteGATTServer
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalBluetoothRemoteGATTServer interface of the Web Bluetooth API represents a GATTServer on a remote device.
[Value("BluetoothRemoteGATTServer")]
public class BluetoothRemoteGATTServer
- Inheritance
-
BluetoothRemoteGATTServer
- Inherited Members
Remarks
Constructors
BluetoothRemoteGATTServer()
public BluetoothRemoteGATTServer()
Properties
Connected
NOTE
ExperimentalBluetoothRemoteGATTServer.connected read-onlyproperty returns a boolean value that returns true while this script execution
environment is connected to
this.device. It can be false while the useragent is physically connected.
[Value("connected")]
public bool Connected { get; }
Property Value
- bool
A
boolean.
Remarks
Device
NOTE
ExperimentalBluetoothRemoteGATTServer.device read-only propertyreturns a reference to the BluetoothDevice running the server.
[Value("device")]
public BluetoothDevice Device { get; }
Property Value
- BluetoothDevice
A reference to the BluetoothDevice.
Remarks
Methods
Connect()
NOTE
ExperimentalBluetoothRemoteGATTServer.connect() method causes thescript execution environment to connect to
this.device.
[Value("connect")]
public Task<BluetoothRemoteGATTServer> Connect()
Returns
- Task<BluetoothRemoteGATTServer>
A {{jsxref("Promise")}} that resolves to a BluetoothRemoteGATTServer.
Remarks
Disconnect()
NOTE
ExperimentalBluetoothRemoteGATTServer.disconnect() method causesthe script execution environment to disconnect from
this.device.
[Value("disconnect")]
public GlobalObject.Undefined Disconnect()
Returns
Remarks
GetPrimaryService(Union176)
NOTE
ExperimentalBluetoothRemoteGATTServer.getPrimaryService() methodreturns a promise to the primary BluetoothRemoteGATTService offered by the
Bluetooth device for a specified bluetooth service UUID.
[Value("getPrimaryService")]
public Task<BluetoothRemoteGATTService> GetPrimaryService(Union176 service)
Parameters
serviceUnion176
Returns
- Task<BluetoothRemoteGATTService>
A {{jsxref("Promise")}} that resolves to a BluetoothRemoteGATTService object.
Remarks
GetPrimaryServices(Union176)
NOTE
Experimentalpromise to a list of primary BluetoothRemoteGATTService objects offered by the
Bluetooth device for a specified
BluetoothServiceUUID.
[Value("getPrimaryServices")]
public Task<List<BluetoothRemoteGATTService>> GetPrimaryServices(Union176 service = default)
Parameters
serviceUnion176
Returns
- Task<List<BluetoothRemoteGATTService>>
A {{jsxref("Promise")}} that resolves to a list of BluetoothRemoteGATTService
objects.