2017-09-16 00:05:06 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "channel.hpp"
|
|
|
|
#include "concurrentmap.hpp"
|
|
|
|
#include "ircmanager.hpp"
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace twitch {
|
|
|
|
|
|
|
|
class TwitchChannel : public Channel
|
|
|
|
{
|
2017-11-04 14:57:29 +01:00
|
|
|
QTimer *liveStatusTimer;
|
|
|
|
|
2017-09-16 00:05:06 +02:00
|
|
|
public:
|
|
|
|
explicit TwitchChannel(EmoteManager &emoteManager, IrcManager &ircManager,
|
2017-11-04 14:57:29 +01:00
|
|
|
const QString &channelName, bool _isSpecial = false);
|
|
|
|
~TwitchChannel();
|
2017-09-16 00:05:06 +02:00
|
|
|
|
|
|
|
void reloadChannelEmotes();
|
|
|
|
|
|
|
|
bool isEmpty() const override;
|
|
|
|
bool canSendMessage() const override;
|
|
|
|
void sendMessage(const QString &message) override;
|
|
|
|
|
2017-11-04 14:57:29 +01:00
|
|
|
const QString subscriptionURL;
|
|
|
|
const QString channelURL;
|
|
|
|
const QString popoutPlayerURL;
|
2017-09-16 00:05:06 +02:00
|
|
|
|
2017-11-04 14:57:29 +01:00
|
|
|
void setRoomID(const QString &_roomID);
|
2017-09-16 00:05:06 +02:00
|
|
|
boost::signals2::signal<void()> roomIDchanged;
|
2017-11-04 14:57:29 +01:00
|
|
|
boost::signals2::signal<void()> onlineStatusChanged;
|
2017-09-16 00:05:06 +02:00
|
|
|
|
2017-11-04 14:57:29 +01:00
|
|
|
QString roomID;
|
2017-09-16 00:05:06 +02:00
|
|
|
bool isLive;
|
|
|
|
QString streamViewerCount;
|
|
|
|
QString streamStatus;
|
|
|
|
QString streamGame;
|
|
|
|
QString streamUptime;
|
|
|
|
|
|
|
|
const std::shared_ptr<EmoteMap> bttvChannelEmotes;
|
|
|
|
const std::shared_ptr<EmoteMap> ffzChannelEmotes;
|
|
|
|
|
|
|
|
private:
|
2017-11-04 14:57:29 +01:00
|
|
|
void setLive(bool newLiveStatus);
|
|
|
|
void refreshLiveStatus();
|
|
|
|
|
2017-09-16 00:05:06 +02:00
|
|
|
EmoteManager &emoteManager;
|
|
|
|
IrcManager &ircManager;
|
|
|
|
|
|
|
|
bool isSpecial;
|
|
|
|
};
|
2017-11-04 14:57:29 +01:00
|
|
|
|
|
|
|
} // namespace twitch
|
|
|
|
} // namespace chatterino
|