You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
feat(communication): housekeeping rooms domain — 7 composers + 2 events
* 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.
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user