feat(companion): add platform createHeartbeatLoop helper
This commit is contained in:
@@ -18,6 +18,12 @@ import type {
|
||||
SystemCapabilitiesResult,
|
||||
SystemNodesResult,
|
||||
} from './runtimeClient.js';
|
||||
import {
|
||||
CompanionHeartbeatLoop,
|
||||
} from './heartbeatLoop.js';
|
||||
import type {
|
||||
CompanionHeartbeatLoopOptions,
|
||||
} from './heartbeatLoop.js';
|
||||
|
||||
export interface PlatformClientOptions {
|
||||
runtime: CompanionRuntimeClient;
|
||||
@@ -129,6 +135,10 @@ export class MacOSCompanionClient {
|
||||
});
|
||||
}
|
||||
|
||||
createHeartbeatLoop(options: CompanionHeartbeatLoopOptions = {}): CompanionHeartbeatLoop {
|
||||
return new CompanionHeartbeatLoop(this, options);
|
||||
}
|
||||
|
||||
setLocation(location: SetNodeLocationInput): Promise<NodeLocationSetResult> {
|
||||
return this.runtime.setNodeLocation(location);
|
||||
}
|
||||
@@ -261,6 +271,10 @@ export class IOSCompanionClient {
|
||||
});
|
||||
}
|
||||
|
||||
createHeartbeatLoop(options: CompanionHeartbeatLoopOptions = {}): CompanionHeartbeatLoop {
|
||||
return new CompanionHeartbeatLoop(this, options);
|
||||
}
|
||||
|
||||
setLocation(location: SetNodeLocationInput): Promise<NodeLocationSetResult> {
|
||||
return this.runtime.setNodeLocation(location);
|
||||
}
|
||||
@@ -393,6 +407,10 @@ export class AndroidCompanionClient {
|
||||
});
|
||||
}
|
||||
|
||||
createHeartbeatLoop(options: CompanionHeartbeatLoopOptions = {}): CompanionHeartbeatLoop {
|
||||
return new CompanionHeartbeatLoop(this, options);
|
||||
}
|
||||
|
||||
setLocation(location: SetNodeLocationInput): Promise<NodeLocationSetResult> {
|
||||
return this.runtime.setNodeLocation(location);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user