#pragma once #include #include #include "common/Aliases.hpp" #include "common/UniqueAccess.hpp" #include "providers/twitch/TwitchEmotes.hpp" #define TWITCH_EMOTE_TEMPLATE \ "https://static-cdn.jtvnw.net/emoticons/v1/{id}/{scale}" namespace chatterino { struct Emote; using EmotePtr = std::shared_ptr; class TwitchEmotes { public: TwitchEmotes(); EmotePtr getOrCreateEmote(const EmoteId &id, const EmoteName &name); Url getEmoteLink(const EmoteId &id, const QString &emoteScale); AccessGuard> accessAll(); private: UniqueAccess> twitchEmotes_; UniqueAccess>> twitchEmotesCache_; }; } // namespace chatterino