1 #ifndef CHANNELSMANAGER_H 2 #define CHANNELSMANAGER_H 5 #include "server/log/logger.h" 33 void join(subscriber_ptr subscriber, identifier_t room_id, database_ptr db);
38 void send(text_response_ptr);
43 void leave(subscriber_ptr);
51 std::unordered_map<identifier_t, iroom_ptr> channels;
52 std::unordered_map<identifier_t, identifier_t> clients_in_room;
53 std::unordered_map<identifier_t, std::string> clientid_to_login;
57 #endif // CHANNELSMANAGER_H void join(subscriber_ptr subscriber, identifier_t room_id, database_ptr db)
Join user to room by room_id.
Definition: channels_manager.cpp:8
void send(text_response_ptr)
Send message to specific room and specific user.
Definition: channels_manager.cpp:37
ChannelsManager.
Definition: channels_manager.h:12
void leave(subscriber_ptr)
Leave user from the room.
Definition: channels_manager.cpp:46
static ChannelsManager & Instance()
Getter of singleton instance.
Definition: channels_manager.h:20