/* * session/session.h — domain model: channels, users, streams, permissions, text. * * Design: docs/protocol.md §5, docs/architecture.md §5. Shared by client (local mirror of * server state) and server (authoritative). Text is ephemeral (no history). Accounts are * admin-provisioned. * * STATUS: M0 stub. */ #ifndef VOICECAT_SESSION_SESSION_H #define VOICECAT_SESSION_SESSION_H #include #include #include namespace voicecat::session { struct Channel { uint32_t id = 0; uint32_t parent_id = 0; std::string name; bool password_protected = false; uint32_t max_users = 0; }; struct Stream { uint32_t stream_id = 0; uint32_t ssrc = 0; int kind = 0; // vc_stream_kind std::string label; }; struct User { uint32_t id = 0; std::string nickname; bool is_guest = true; uint32_t channel_id = 0; std::vector streams; }; // Mirror/authority for the channel tree + user list. TODO(M1): snapshot + delta apply. class SessionModel { public: const std::vector& channels() const { return channels_; } const std::vector& users() const { return users_; } private: std::vector channels_; std::vector users_; }; } // namespace voicecat::session #endif // VOICECAT_SESSION_SESSION_H