import EventEmitter from 'events'; import { type PlayerStatus } from './PlayerStatusProvider'; import { type UnsetVolatileInfo, type TrackInfo } from './VolumioStateManager'; export declare abstract class Service extends EventEmitter { abstract start(): Promise; abstract quit(): Promise; abstract isActive(): boolean; abstract getStatus(): S | null; /** * * @param track * @param start Position from which to start playback (seconds) */ abstract play(track: TrackInfo, start?: number): Promise; abstract pause(): Promise; abstract stop(): Promise; abstract resume(): Promise; abstract next(): Promise; abstract previous(): Promise; abstract setRandom(value: boolean): void; abstract setRepeat(value: boolean, repeatSingle: boolean): Promise; abstract pushState(): void; /** * * @param position Position to seek to in seconds */ abstract seek(position: number): Promise; protected forwardStatusEvent(status: S): void; protected forwardVolatileEvent(eventName: 'setVolatile'): void; protected forwardVolatileEvent(eventName: 'unsetVolatile', info: UnsetVolatileInfo): void; emit(eventName: 'setVolatile'): boolean; emit(eventName: 'unsetVolatile', info: UnsetVolatileInfo): boolean; emit(eventName: 'close', code: number | null, signal: NodeJS.Signals | null): boolean; emit(eventName: 'status', status: S): boolean; on(eventName: 'setVolatile', listener: () => void): this; on(eventName: 'unsetVolatile', listener: (info: UnsetVolatileInfo) => void): this; on(eventName: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; on(eventName: 'status', listener: (status: S) => void): this; once(eventName: 'setVolatile', listener: () => void): this; once(eventName: 'unsetVolatile', listener: (info: UnsetVolatileInfo) => void): this; once(eventName: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; once(eventName: 'status', listener: (status: S) => void): this; off(eventName: 'setVolatile', listener: () => void): this; off(eventName: 'unsetVolatile', listener: (info: UnsetVolatileInfo) => void): this; off(eventName: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; off(eventName: 'status', listener: (status: S) => void): this; } //# sourceMappingURL=Service.d.ts.map