#ifndef CHANNEL_H #define CHANNEL_H #include "concurrentmap.h" #include "messages/lazyloadedimage.h" #include "messages/limitedqueue.h" #include #include #include #include #include #include namespace chatterino { namespace messages { class Message; } class Channel { public: Channel(const QString &channel); boost::signals2::signal &)> messageRemovedFromStart; boost::signals2::signal &)> messageAppended; // properties ConcurrentMap & getBttvChannelEmotes() { return bttvChannelEmotes; } ConcurrentMap & getFfzChannelEmotes() { return ffzChannelEmotes; } bool isEmpty() const { return name.isEmpty(); } const QString & getName() const { return name; } int getRoomID() const { return roomID; } const QString & getSubLink() const { return subLink; } const QString & getChannelLink() const { return channelLink; } const QString & getPopoutPlayerLink() const { return popoutPlayerLink; } bool getIsLive() const { return isLive; } int getStreamViewerCount() const { return streamViewerCount; } const QString & getStreamStatus() const { return streamStatus; } const QString & getStreamGame() const { return streamGame; } // methods messages::LimitedQueueSnapshot> getMessageSnapshot() { return messages.getSnapshot(); } void addMessage(std::shared_ptr message); void reloadChannelEmotes() { this->reloadBttvEmotes(); this->reloadFfzEmotes(); } private: messages::LimitedQueue> messages; QString name; int roomID; ConcurrentMap bttvChannelEmotes; ConcurrentMap ffzChannelEmotes; QString subLink; QString channelLink; QString popoutPlayerLink; bool isLive; int streamViewerCount; QString streamStatus; QString streamGame; void reloadBttvEmotes(); void reloadFfzEmotes(); }; } #endif // CHANNEL_H