UNPKG

@tanislav000/bluez

Version:

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

60 lines (59 loc) 2.36 kB
/// <reference types="node" /> import * as DBus from "dbus-next"; import { LooselyTypedEmitter, EventListenerSignature } from "../utilts"; /***** Signals for org.bluez.GattCharacteristic1 *****/ interface OrgBluezGattCharacteristic1Events { PropertiesChanged: (iface: string, changedProperties: { [key: string]: any; }, invalidatedProperties: string[]) => void; } /***** Properties of org.bluez.GattCharacteristic1 *****/ export interface OrgBluezGattCharacteristic1Props { UUID: string; Service: DBus.ObjectPath; Value: Buffer; Notifying: boolean; Flags: Array<string>; WriteAcquired: boolean; NotifyAcquired: boolean; } /** * Service: org.bluez * ObjectPath: /org/bluez/hci0/dev_80_E1_26_08_94_85/-/- * Interface: org.bluez.GattCharacteristic1 */ export declare class OrgBluezGattCharacteristic1<L extends EventListenerSignature<L> = {}> extends LooselyTypedEmitter<OrgBluezGattCharacteristic1Events & L> { static readonly DbusInterfaceName = "org.bluez.GattCharacteristic1"; dbusObject: DBus.ProxyObject; propertiesDBusInterface: DBus.ClientInterface; thisDBusInterface: DBus.ClientInterface; static Connect(bus: DBus.MessageBus, objectPath: string, xml?: string): Promise<OrgBluezGattCharacteristic1>; constructor(dbusObject: DBus.ProxyObject); /***** Properties *****/ getProperties(): Promise<Partial<OrgBluezGattCharacteristic1Props>>; getProperty<T extends keyof OrgBluezGattCharacteristic1Props>(name: T): Promise<OrgBluezGattCharacteristic1Props[T]>; setProperty<T extends keyof OrgBluezGattCharacteristic1Props>(name: T, value: OrgBluezGattCharacteristic1Props[T]): Promise<void>; UUID(): Promise<string>; Service(): Promise<DBus.ObjectPath>; Value(): Promise<Buffer>; Notifying(): Promise<boolean>; Flags(): Promise<Array<string>>; WriteAcquired(): Promise<boolean>; NotifyAcquired(): Promise<boolean>; /***** Methods *****/ ReadValue(options: { [key: string]: any; }): Promise<Buffer>; WriteValue(value: Buffer, options: { [key: string]: any; }): Promise<void>; AcquireWrite(options: { [key: string]: any; }): Promise<any>; AcquireNotify(options: { [key: string]: any; }): Promise<any>; StartNotify(): Promise<void>; StopNotify(): Promise<void>; } export {};