forked from sidorares/dbus-native
-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.d.ts
24 lines (20 loc) · 744 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import * as stream from 'stream';
export function createClient(options: {
stream?: stream.Duplex,
direct?: boolean,
authMethods?: string[]
}): DBusClient;
export interface DBusClient {
setMethodCallHandler: (objectPath: string, iface: string, member: string, handler: [(args: any[]) => void, any]) => void;
getService(name: string): DBusService;
disconnect(): Promise<void>;
}
export interface DBusService {
getInterface<
T // Should be specified to define the methods available in the specific D-Bus interface
>(path: string, name: string): Promise<DBusInterface & T>;
}
export interface DBusInterface {
$name: string;
$methods: { [name: string]: string }; // Name -> D-Bus type definition
}