You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
597cd2402f
* Outgoing 9110-9116: find-room-by-id, search-rooms (exact|prefix), room-state (open|close toggle), mute-room, kick-all-from-room, transfer-room-ownership, delete-room. * Incoming 9202 HousekeepingRoomDetailEvent + 9203 RoomListEvent. * HousekeepingRoomData parser data class with the 11 IHousekeepingRoom fields. Single-room and list events share the same data class via composition. `yarn compile:fast` clean.
31 lines
791 B
TypeScript
31 lines
791 B
TypeScript
import { IMessageDataWrapper, IMessageParser } from '@nitrots/api';
|
|
import { HousekeepingRoomData } from './HousekeepingRoomData';
|
|
|
|
export class HousekeepingRoomDetailParser implements IMessageParser
|
|
{
|
|
private _found: boolean = false;
|
|
private _room: HousekeepingRoomData | null = null;
|
|
|
|
public flush(): boolean
|
|
{
|
|
this._found = false;
|
|
this._room = null;
|
|
|
|
return true;
|
|
}
|
|
|
|
public parse(wrapper: IMessageDataWrapper): boolean
|
|
{
|
|
if(!wrapper) return false;
|
|
|
|
this._found = wrapper.readBoolean();
|
|
|
|
if(this._found) this._room = new HousekeepingRoomData(wrapper);
|
|
|
|
return true;
|
|
}
|
|
|
|
public get found(): boolean { return this._found; }
|
|
public get room(): HousekeepingRoomData | null { return this._room; }
|
|
}
|