summaryrefslogtreecommitdiff
path: root/src/sessionManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sessionManager.hpp')
-rw-r--r--src/sessionManager.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/sessionManager.hpp b/src/sessionManager.hpp
index 2dd825a..0b447b5 100644
--- a/src/sessionManager.hpp
+++ b/src/sessionManager.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "format.hpp"
#include "session.hpp"
#include <memory>
#include <thread>
@@ -9,11 +10,12 @@ class CSessionManager {
public:
CSessionManager();
~CSessionManager();
- void enterLoop();
- void newSession(Hyprutils::OS::CFileDescriptor sockfd);
- void broadcast(const std::string &message) const;
- void kick(const CSession *session) const;
- void addSession(const CSession &session);
+ void enterLoop();
+ std::pair<std::jthread, std::shared_ptr<CSession>> *newSession(Hyprutils::OS::CFileDescriptor sockfd);
+ void broadcast(const std::string &message, eFormatType type = {}) const;
+ void kick(const CSession *session) const;
+ void addSession(const CSession &session);
+ void removeSession(std::pair<std::jthread, std::shared_ptr<CSession>> *session);
private:
std::vector<std::pair<std::jthread, std::shared_ptr<CSession>>> m_vSessions;