mirror-chatterino2/src/twitch/twitchmessagebuilder.hpp

46 lines
1.5 KiB
C++
Raw Normal View History

#pragma once
2017-04-12 17:46:44 +02:00
2017-06-11 09:31:45 +02:00
#include "channel.hpp"
#include "messages/messagebuilder.hpp"
2017-06-15 23:13:01 +02:00
#include "resources.hpp"
2017-04-12 17:46:44 +02:00
#include <QString>
#include <QVariant>
2017-04-12 17:46:44 +02:00
2017-04-14 17:52:22 +02:00
namespace chatterino {
class EmoteManager;
class WindowManager;
2017-04-14 17:52:22 +02:00
namespace twitch {
2017-04-12 17:46:44 +02:00
class TwitchMessageBuilder : public messages::MessageBuilder
{
public:
TwitchMessageBuilder();
QString messageId;
QString userName;
static messages::SharedMessage parse(const Communi::IrcPrivateMessage *ircMessage,
Channel *channel, const messages::MessageParseArgs &args,
2017-06-15 23:13:01 +02:00
Resources &resources, EmoteManager &emoteManager,
WindowManager &windowManager);
2017-04-12 17:46:44 +02:00
// static bool sortTwitchEmotes(
// const std::pair<long int, messages::LazyLoadedImage *> &a,
// const std::pair<long int, messages::LazyLoadedImage *> &b);
private:
void appendModerationWords(const Communi::IrcPrivateMessage *ircMessage,
const Resources &resources);
void appendTwitchEmote(const Communi::IrcPrivateMessage *ircMessage, const QString &emote,
std::vector<std::pair<long int, messages::LazyLoadedImage *>> &vec,
EmoteManager &emoteManager);
2017-06-15 23:13:01 +02:00
void appendTwitchBadges(const QStringList &badges, Resources &resources,
EmoteManager &emoteManager, const Resources::Channel &channelResources);
2017-04-12 17:46:44 +02:00
};
} // namespace twitch
} // namespace chatterino