/* * Copyright (c) 2016-2017 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #pragma once #include #include #include namespace Swift { class EmojiMapper { public: static std::string shortnameToUnicode(const std::string& shortname); static std::string unicodeToShortname(const std::string& unicode); static std::vector categoryNameToEmojis(const std::string& category); static std::string categoryToFlagshipUnicodeEmoji(const std::string& category); static std::vector getCategories(); public: // \ref shortnameUnicode maps ASCII shortnames (e.g. joy, grin, smiley, …) to a emoji UTF-8 encoded unicode sequence. static const std::unordered_map shortnameUnicode; // \ref unicodeShortname is the reverse mapping of \ref shortnameUnicode. static const std::unordered_map unicodeShortname; // \ref emojisInCategory maps an emoji category name to a \ref std::vector of UTF-8 encoded unicode sequence strings. static const std::unordered_map> emojisInCategory; }; }