#pragma once #include "channel.hpp" #include "channeldata.hpp" #include "twitch/twitchchannel.hpp" #include namespace chatterino { namespace singletons { class IrcManager; class ChannelManager { explicit ChannelManager(); public: static ChannelManager &getInstance(); const std::vector getItems(); SharedChannel addTwitchChannel(const QString &channel); SharedChannel 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 SharedChannel whispersChannel; const SharedChannel mentionsChannel; const SharedChannel emptyChannel; private: std::map usernameToID; std::map channelDatas; QMutex channelsMutex; QMap, int>> twitchChannels; pajlada::Signals::Signal ircJoin; pajlada::Signals::Signal ircPart; friend class singletons::IrcManager; }; } // namespace chatterino }