1,645 bytes added,
09:25, 14 November 2014 == Overview ==
'''BluetoothGattServer''' provides bluetooth Generic Attribute Profile (GATT) server functionality to create Bluetooth Smart services and characteristics.
== Interfaces ==
[[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattService#BluetoothGattServer|BluetoothGattServer]]
=== BluetoothGattServer ===
[CheckPermissions="bluetooth"]
interface BluetoothGattServer
{
[Cached, Pure]
readonly attribute sequence<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattService#BluetoothGattService|BluetoothGattService]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattServer#services|services]];
attribute EventHandler ondeviceconnectionstatechanged;
attribute EventHandler onattributereadreq;
attribute EventHandler onattributewritereq;
attribute EventHandler onexecutewritereq;
Promise<void> close()
Promise<void> connect(DOMString aDeviceAddr);
Promise<void> disconnect(DOMString aDeviceAddr);
Promise<void> addService(BluetoothGattService aService);
Promise<void> removeService(BluetoothGattService aService);
Promise<void> clearServices();
Promise<void> notifyCharacteristicChanged(DOMString aDeviceAddr, DOMString aUuid, int aInstanceId, bool aConfirm);
Promise<void> sendResponse(DOMString aDeviceAddr, int aStatus, int aRequestId, ArrayBuffer aValue);
};
== Properties ==
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothGattServer#services|BluetoothGattServer.services]]
=== services ===
; Description
: Array of services offered by this device.
; Value Type
: sequence<BluetoothGattService>
; Default Value
: Empty array (array with length = 0)