UNPKG

@tanislav000/bluez

Version:

Bluez5 D-Bus bindings for easy to use bluetooth access in Node.js

29 lines 977 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SimpleAgent = void 0; const dbus_next_1 = require("dbus-next"); class SimpleAgent { constructor(pin) { this.pin = pin; this.AgentCapabilities = "KeyboardOnly"; } async DisplayPinCode(device, pincode) { //console.log("Display Code", pincode, device.dbusObject.path); throw new dbus_next_1.DBusError("org.bluez.Error.Rejected", "Not Supported", true); //await new Promise(resolve => setTimeout(resolve, 10000000)); //console.log("OK"); } RequestPinCode(device) { //console.log("Request Pin", device.dbusObject.path); return this.pin; } RequestPasskey(device) { //console.log("Request Pin Int", device.dbusObject.path); return parseInt(this.pin, 10); } Cancel() { //console.log("Cancel"); } } exports.SimpleAgent = SimpleAgent; //# sourceMappingURL=simpleAgent.js.map