summaryrefslogtreecommitdiff
path: root/src/sessionManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sessionManager.hpp')
-rw-r--r--src/sessionManager.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp
index eb881a7..ea5fce9 100644
--- a/src/sessionManager.hpp
+++ b/src/sessionManager.hpp
@@ -10,14 +10,18 @@ class CSessionManager {
public:
CSessionManager();
~CSessionManager();
- void enterLoop();
+
std::pair<std::jthread, std::shared_ptr<CSession>> *newSession(Hyprutils::OS::CFileDescriptor sockfd);
- void broadcast(const std::string &message, eFormatType type = NONE) const;
+
+ void enterLoop();
+ void broadcast(const std::string &msg, eFormatType type = NONE) const;
void kick(const CSession *session) const;
void addSession(const CSession &session);
void removeSession(std::pair<std::jthread, std::shared_ptr<CSession>> *session);
private:
+ void broadcastChat(const std::string &msg, const std::string &username) const;
std::vector<std::pair<std::jthread, std::shared_ptr<CSession>>> m_vSessions;
+ friend class CChatManager;
};
inline std::shared_ptr<CSessionManager> g_pSessionManager;