#pragma once #include "channel.hpp" #include "channeldata.hpp" #include namespace chatterino { class WindowManager; class EmoteManager; class IrcManager; class ChannelManager { WindowManager &windowManager; EmoteManager &emoteManager; IrcManager &ircManager; public: explicit ChannelManager(WindowManager &_windowManager, EmoteManager &_emoteManager, IrcManager &_ircManager); const std::vector> getItems(); std::shared_ptr addChannel(const QString &channel); std::shared_ptr getChannel(const QString &channel); void removeChannel(const QString &channel); const std::string &getUserID(const std::string &username); // Special channels const std::shared_ptr whispersChannel; const std::shared_ptr mentionsChannel; const std::shared_ptr emptyChannel; private: std::map usernameToID; std::map channelDatas; QMutex channelsMutex; QMap, int>> channels; }; } // namespace chatterino