UNPKG

@tanislav000/bluez

Version:

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

55 lines (45 loc) 1.82 kB
import * as DBus from "dbus-next"; import { Bluez } from "./bluez"; import { Profile } from "./profile"; export declare class ProfileWrapper extends DBus.interface.Interface { private impl; private bluez; constructor(profile: Profile, bluez: Bluez); /** void Release() [noreply] This method gets called when the service daemon unregisters the profile. A profile can use it to do cleanup tasks. There is no need to unregister the profile, because when this method gets called it has already been unregistered. */ Release(): Promise<void> | undefined; /** void NewConnection(object device, fd, dict fd_properties) This method gets called when a new service level connection has been made and authorized. Common fd_properties: uint16 Version Profile version (optional) uint16 Features Profile features (optional) Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled */ NewConnection(device: DBus.ObjectPath, fd: number, options: { [name: string]: any; }): Promise<void>; /** void RequestDisconnection(object device) This method gets called when a profile gets disconnected. The file descriptor is no longer owned by the service daemon and the profile implementation needs to take care of cleaning up all connections. If multiple file descriptors are indicated via NewConnection, it is expected that all of them are disconnected before returning from this method call. Possible errors: org.bluez.Error.Rejected org.bluez.Error.Canceled */ RequestDisconnection(device: DBus.ObjectPath): Promise<void>; }