UNPKG

emberplus-connection

Version:

Javascript implementation of the Ember+ automation protocol

31 lines 1.13 kB
import { EventEmitter } from 'eventemitter3'; import { Parameter } from '../../model/Parameter'; import { EmberValue } from '../../types'; import { Collection } from '../../types/types'; import { StreamEntry } from '../../model'; export type StreamManagerEvents = { streamUpdate: [path: string, value: EmberValue]; }; interface StreamInfo { parameter: Parameter; path: string; streamIdentifier: number; offset: number; } export declare class StreamManager extends EventEmitter<StreamManagerEvents> { /** Maps path -> StreamInfo */ private registeredStreams; /** Maps streamIdentifier -> Set<path> */ private streamsByIdentifier; constructor(); registerParameter(parameter: Parameter, path: string): void; unregisterParameter(path: string): void; getStreamInfoByPath(path: string): StreamInfo | undefined; hasStream(identifier: string): boolean; updateStreamValues(streamEntries: Collection<StreamEntry>): void; private updateStreamValue; getAllRegisteredPaths(): string[]; printStreamState(): void; } export {}; //# sourceMappingURL=StreamManager.d.ts.map