#pragma once #include "channel.hpp" #include "channeldata.hpp" #include namespace chatterino { class WindowManager; class EmoteManager; class IrcManager; class ChannelManager { public: explicit ChannelManager(WindowManager &_windowManager, EmoteManager &_emoteManager, IrcManager &_ircManager); std::shared_ptr getWhispers(); std::shared_ptr getMentions(); std::shared_ptr getEmpty(); 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); private: WindowManager &windowManager; EmoteManager &emoteManager; IrcManager &ircManager; std::map usernameToID; std::map channelDatas; QMap, int>> _channels; QMutex _channelsMutex; std::shared_ptr _whispers; std::shared_ptr _mentions; std::shared_ptr _empty; }; } // namespace chatterino