@tanislav000/bluez
Version:
Bluez5 D-Bus bindings for easy to use bluetooth access in Node.js
37 lines • 2.55 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrgBluezProfileManager1 = void 0;
const utilts_1 = require("../utilts");
/*
* Generated by dbus-next interface generator
* Template: typescript-class-auto.ts.hbs
*/
// Introspection XML of org.bluez at /org/bluez
const XMLObjectData = `
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/></method></interface><interface name="org.bluez.AgentManager1"><method name="RegisterAgent"><arg name="agent" type="o" direction="in"/><arg name="capability" type="s" direction="in"/></method><method name="UnregisterAgent"><arg name="agent" type="o" direction="in"/></method><method name="RequestDefaultAgent"><arg name="agent" type="o" direction="in"/></method></interface><interface name="org.bluez.ProfileManager1"><method name="RegisterProfile"><arg name="profile" type="o" direction="in"/><arg name="UUID" type="s" direction="in"/><arg name="options" type="a{sv}" direction="in"/></method><method name="UnregisterProfile"><arg name="profile" type="o" direction="in"/></method></interface></node>`;
/**
* Service: org.bluez
* ObjectPath: /org/bluez
* Interface: org.bluez.ProfileManager1
*/
class OrgBluezProfileManager1 {
static Connect(bus, objectPath = "/org/bluez", xml = XMLObjectData) {
return bus.getProxyObject("org.bluez", objectPath, xml).then((obj) => new OrgBluezProfileManager1(obj));
}
constructor(dbusObject) {
this.dbusObject = dbusObject;
this.thisDBusInterface = this.dbusObject.getInterface("org.bluez.ProfileManager1");
}
/***** Methods *****/
//@method({ name: 'RegisterProfile', inSignature: 'osa{sv}', outSignature: '' })
RegisterProfile(profile, UUID, options) {
return this.thisDBusInterface.RegisterProfile((0, utilts_1.wrapDbusSignature)(profile, "o"), (0, utilts_1.wrapDbusSignature)(UUID, "s"), (0, utilts_1.wrapDbusSignature)(options, "a{sv}"));
}
//@method({ name: 'UnregisterProfile', inSignature: 'o', outSignature: '' })
UnregisterProfile(profile) {
return this.thisDBusInterface.UnregisterProfile((0, utilts_1.wrapDbusSignature)(profile, "o"));
}
}
exports.OrgBluezProfileManager1 = OrgBluezProfileManager1;
OrgBluezProfileManager1.DbusInterfaceName = "org.bluez.ProfileManager1";
//# sourceMappingURL=ProfileManager1.js.map