2014-07-29 00:09:00 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2016-04-21 16:48:59 +03:00
|
|
|
[ChromeOnly]
|
2014-07-29 00:09:00 +04:00
|
|
|
interface BluetoothPairingHandle
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* A 6-digit string ranging from decimal 000000 to 999999.
|
|
|
|
* This attribute is an empty string for enterpincodereq and
|
|
|
|
* pairingconsentreq.
|
|
|
|
*/
|
|
|
|
readonly attribute DOMString passkey;
|
|
|
|
|
2015-04-08 08:49:14 +03:00
|
|
|
/**
|
|
|
|
* Reply pin code for enterpincodereq. The promise will be rejected if the
|
|
|
|
* pairing request type is not enterpincodereq or operation fails.
|
|
|
|
*/
|
2015-01-12 19:52:25 +03:00
|
|
|
[NewObject]
|
2014-08-01 07:50:30 +04:00
|
|
|
Promise<void> setPinCode(DOMString aPinCode);
|
2015-04-08 08:49:14 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Accept pairing requests. The promise will be rejected if the pairing
|
|
|
|
* request type is not pairingconfirmationreq or pairingconsentreq or
|
|
|
|
* operation fails.
|
|
|
|
*/
|
|
|
|
[NewObject]
|
|
|
|
Promise<void> accept();
|
|
|
|
|
|
|
|
// Reject pairing requests. The promise will be rejected if operation fails.
|
2015-01-12 19:52:25 +03:00
|
|
|
[NewObject]
|
2015-04-08 08:49:14 +03:00
|
|
|
Promise<void> reject();
|
2014-07-29 00:09:00 +04:00
|
|
|
};
|