#pragma once #include "providers/twitch/EmoteValue.hpp" #include "providers/twitch/TwitchAccount.hpp" #include "providers/twitch/TwitchEmotes.hpp" #include "util/ConcurrentMap.hpp" #include "common/Emotemap.hpp" #include #include namespace chatterino { class TwitchEmotes { public: TwitchEmotes(); util::EmoteData getEmoteById(const QString &id, const QString &emoteName); /// Twitch emotes void refresh(const std::shared_ptr &user); struct TwitchEmote { TwitchEmote(const QString &_id, const QString &_code) : id(_id) , code(_code) { } // i.e. "403921" QString id; // i.e. "forsenE" QString code; }; struct EmoteSet { QString key; QString channelName; QString text; std::vector emotes; }; std::map staticEmoteSets; struct TwitchAccountEmoteData { std::vector> emoteSets; std::vector emoteCodes; util::EmoteMap emotes; bool filled = false; }; // Key is the user ID std::map emotes; private: void loadSetData(std::shared_ptr emoteSet); // emote code util::ConcurrentMap _twitchEmotes; // emote id util::ConcurrentMap _twitchEmoteFromCache; }; } // namespace chatterino