Files
dat-thang/extra/dat-dpi/inc/cable_room.h
T
divorce b735900f2e 0.0.002
ddat interop with dat js
cable interop with cabal js
ddat's frontend = dat-thang
cable fe = cable-thang
dillo support based on cel's dillo-dat
bootstrap node
xplatform support

Signed-off-by: divo <418@cryspace.space>
2026-10-19 00:17:02 -04:00

31 lines
709 B
C

#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