#ifndef CABLE_ROOM_H #define CABLE_ROOM_H #include "cable.h" #define CABLE_ROOM_CHANNEL_BYTES 64u #define CABLE_ROOM_NICK_BYTES 64u enum cable_room_event_type { CABLE_ROOM_PEER_JOIN = 1, CABLE_ROOM_PEER_LEAVE = 2, CABLE_ROOM_NICK = 3, CABLE_ROOM_CHANNEL_JOIN = 4, CABLE_ROOM_TEXT = 5 }; typedef struct cable_room_event { uint8_t type; uint64_t timestamp_ms; uint8_t sender[CABLE_KEY_BYTES]; char channel[CABLE_ROOM_CHANNEL_BYTES + 1u]; char nick[CABLE_ROOM_NICK_BYTES + 1u]; char text[CABLE_CHAT_TEXT_BYTES + 1u]; size_t text_length; } cable_room_event_t; /* In-memory UI event only. Cable's network records are Cabal Core Hypercore * values and never serialize this C structure. */ #endif