#pragma once #include "channel.hpp" #include "channeldata.hpp" #include "twitch/twitchchannel.hpp" #include namespace chatterino { class WindowManager; class IrcManager; class ChannelManager { public: explicit ChannelManager(WindowManager &_windowManager, IrcManager &_ircManager); static ChannelManager *instance; WindowManager &windowManager; IrcManager &ircManager; const std::vector> getItems(); std::shared_ptr addTwitchChannel(const QString &channel); std::shared_ptr getTwitchChannel(const QString &channel); void removeTwitchChannel(const QString &channel); const std::string &getUserID(const std::string &username); void doOnAll(std::function)> func); // 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>> twitchChannels; }; } // namespace chatterino