| 1 | import AbstractUIService from './AbstractUIService'; |
| 2 | import { |
| 3 | ProcedureName, |
| 4 | type ProtocolRequestHandler, |
| 5 | ProtocolVersion, |
| 6 | } from '../../../types/UIProtocol'; |
| 7 | import type { AbstractUIServer } from '../AbstractUIServer'; |
| 8 | |
| 9 | export default class UIService001 extends AbstractUIService { |
| 10 | constructor(uiServer: AbstractUIServer) { |
| 11 | super(uiServer, ProtocolVersion['0.0.1']); |
| 12 | for (const procedureName of Object.keys( |
| 13 | AbstractUIService.ProcedureNameToBroadCastChannelProcedureNameMap |
| 14 | ) as ProcedureName[]) { |
| 15 | this.requestHandlers.set( |
| 16 | procedureName, |
| 17 | this.handleProtocolRequest.bind(this) as ProtocolRequestHandler |
| 18 | ); |
| 19 | } |
| 20 | } |
| 21 | } |