mirror-chatterino2/src/twitch/twitchchannel.hpp

54 lines
1.2 KiB
C++
Raw Normal View History

#pragma once
#include "channel.hpp"
2017-12-31 00:50:07 +01:00
#include "singletons/emotemanager.hpp"
#include "singletons/ircmanager.hpp"
2017-12-31 22:58:35 +01:00
#include "util/concurrentmap.hpp"
namespace chatterino {
namespace twitch {
class TwitchChannel : public Channel
{
QTimer *liveStatusTimer;
public:
2017-12-31 00:50:07 +01:00
explicit TwitchChannel(const QString &channelName);
~TwitchChannel();
void reloadChannelEmotes();
bool isEmpty() const override;
bool canSendMessage() const override;
void sendMessage(const QString &message) override;
2017-12-31 22:58:35 +01:00
const std::shared_ptr<chatterino::util::EmoteMap> bttvChannelEmotes;
const std::shared_ptr<chatterino::util::EmoteMap> ffzChannelEmotes;
const QString subscriptionURL;
const QString channelURL;
const QString popoutPlayerURL;
void setRoomID(const QString &_roomID);
boost::signals2::signal<void()> roomIDchanged;
boost::signals2::signal<void()> onlineStatusChanged;
pajlada::Signals::NoArgBoltSignal fetchMessages;
QString roomID;
bool isLive;
QString streamViewerCount;
QString streamStatus;
QString streamGame;
QString streamUptime;
private:
void setLive(bool newLiveStatus);
void refreshLiveStatus();
void fetchRecentMessages();
};
} // namespace twitch
} // namespace chatterino