Chatterino
Classes | Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
chatterino::TwitchChannel Class Reference

#include <TwitchChannel.hpp>

Inheritance diagram for chatterino::TwitchChannel:
[legend]
Collaboration diagram for chatterino::TwitchChannel:
[legend]

Classes

struct  RoomModes
 
struct  StreamStatus
 

Public Member Functions

 TwitchChannel (const QString &channelName)
 
void initialize ()
 
virtual bool isEmpty () const override
 
virtual bool canSendMessage () const override
 
virtual void sendMessage (const QString &message) override
 
virtual void sendReply (const QString &message, const QString &replyId)
 
virtual bool isMod () const override
 
bool isVip () const
 
bool isStaff () const
 
virtual bool isBroadcaster () const override
 
virtual bool hasHighRateLimit () const override
 
virtual bool canReconnect () const override
 
virtual void reconnect () override
 
void refreshTitle ()
 
void createClip ()
 
const QString & subscriptionUrl ()
 
const QString & channelUrl ()
 
const QString & popoutPlayerUrl ()
 
int chatterCount ()
 
virtual bool isLive () const override
 
QString roomId () const
 
SharedAccessGuard< const RoomModesaccessRoomModes () const
 
SharedAccessGuard< const StreamStatusaccessStreamStatus () const
 
boost::optional< EmotePtrbttvEmote (const EmoteName &name) const
 
boost::optional< EmotePtrffzEmote (const EmoteName &name) const
 
boost::optional< EmotePtrseventvEmote (const EmoteName &name) const
 
std::shared_ptr< const EmoteMapbttvEmotes () const
 
std::shared_ptr< const EmoteMapffzEmotes () const
 
std::shared_ptr< const EmoteMapseventvEmotes () const
 
virtual void refreshBTTVChannelEmotes (bool manualRefresh)
 
virtual void refreshFFZChannelEmotes (bool manualRefresh)
 
virtual void refreshSevenTVChannelEmotes (bool manualRefresh)
 
const QString & seventvUserID () const
 
const QString & seventvEmoteSetID () const
 
void addSeventvEmote (const SeventvEventAPIEmoteAddDispatch &dispatch)
 
void updateSeventvEmote (const SeventvEventAPIEmoteUpdateDispatch &dispatch)
 
void removeSeventvEmote (const SeventvEventAPIEmoteRemoveDispatch &dispatch)
 
void updateSeventvUser (const SeventvEventAPIUserConnectionUpdateDispatch &dispatch)
 
void updateSeventvData (const QString &newUserID, const QString &newEmoteSetID)
 
boost::optional< EmotePtrffzCustomModBadge () const
 
boost::optional< EmotePtrffzCustomVipBadge () const
 
boost::optional< EmotePtrtwitchBadge (const QString &set, const QString &version) const
 
boost::optional< CheerEmotecheerEmote (const QString &string)
 
void addReplyThread (const std::shared_ptr< MessageThread > &thread)
 
const std::unordered_map< QString, std::weak_ptr< MessageThread > > & threads () const
 
void addChannelPointReward (const ChannelPointReward &reward)
 
bool isChannelPointRewardKnown (const QString &rewardId)
 
boost::optional< ChannelPointRewardchannelPointReward (const QString &rewardId) const
 
- Public Member Functions inherited from chatterino::Channel
 Channel (const QString &name, Type type)
 
virtual ~Channel ()
 
Type getType () const
 
const QString & getName () const
 
bool isTwitchChannel () const
 
LimitedQueueSnapshot< MessagePtrgetMessageSnapshot ()
 
void addMessage (MessagePtr message, boost::optional< MessageFlags > overridingFlags=boost::none)
 
void addMessagesAtStart (const std::vector< MessagePtr > &messages_)
 
void fillInMissingMessages (const std::vector< MessagePtr > &messages)
 Inserts the given messages in order by Message::serverReceivedTime. More...
 
void addOrReplaceTimeout (MessagePtr message)
 
void disableAllMessages ()
 
void replaceMessage (MessagePtr message, MessagePtr replacement)
 
void replaceMessage (size_t index, MessagePtr replacement)
 
void deleteMessage (QString messageID)
 
MessagePtr findMessage (QString messageID)
 
bool hasMessages () const
 
virtual bool isWritable () const
 
virtual bool hasModRights () const
 
virtual bool shouldIgnoreHighlights () const
 
- Public Member Functions inherited from chatterino::ChannelChatters
 ChannelChatters (Channel &channel)
 
virtual ~ChannelChatters ()=default
 
SharedAccessGuard< const ChatterSetaccessChatters () const
 
void addRecentChatter (const QString &user)
 
void addJoinedUser (const QString &user)
 
void addPartedUser (const QString &user)
 
const QColor getUserColor (const QString &user)
 
void setUserColor (const QString &user, const QColor &color)
 
void updateOnlineChatters (const std::unordered_set< QString > &usernames)
 
size_t colorsSize () const
 

Public Attributes

pajlada::Signals::NoArgSignal roomIdChanged
 
pajlada::Signals::NoArgSignal userStateChanged
 
pajlada::Signals::NoArgSignal liveStatusChanged
 
pajlada::Signals::NoArgSignal roomModesChanged
 
pajlada::Signals::SelfDisconnectingSignal< ChannelPointRewardchannelPointRewardAdded
 
- Public Attributes inherited from chatterino::Channel
pajlada::Signals::Signal< const QString &, const QString &, bool & > sendMessageSignal
 
pajlada::Signals::Signal< const QString &, const QString &, const QString &, bool & > sendReplySignal
 
pajlada::Signals::Signal< MessagePtr & > messageRemovedFromStart
 
pajlada::Signals::Signal< MessagePtr &, boost::optional< MessageFlags > > messageAppended
 
pajlada::Signals::Signal< std::vector< MessagePtr > & > messagesAddedAtStart
 
pajlada::Signals::Signal< size_t, MessagePtr & > messageReplaced
 
pajlada::Signals::Signal< const std::vector< MessagePtr > & > filledInMessages
 Invoked when some number of messages were filled in using time received. More...
 
pajlada::Signals::NoArgSignal destroyed
 
pajlada::Signals::NoArgSignal displayNameChanged
 
pajlada::Signals::NoArgSignal connected
 Invoked when AbstractIrcServer::onReadConnected occurs. More...
 
CompletionModel completionModel
 
QDate lastDate_
 

Protected Attributes

Atomic< std::shared_ptr< const EmoteMap > > bttvEmotes_
 
Atomic< std::shared_ptr< const EmoteMap > > ffzEmotes_
 
Atomic< std::shared_ptr< const EmoteMap > > seventvEmotes_
 
Atomic< boost::optional< EmotePtr > > ffzCustomModBadge_
 
Atomic< boost::optional< EmotePtr > > ffzCustomVipBadge_
 

Friends

class TwitchIrcServer
 
class TwitchMessageBuilder
 
class IrcMessageHandler
 

Additional Inherited Members

- Public Types inherited from chatterino::Channel
enum  Type {
  Type::None, Type::Direct, Type::Twitch, Type::TwitchWhispers,
  Type::TwitchWatching, Type::TwitchMentions, Type::TwitchLive, Type::TwitchEnd,
  Type::Irc, Type::Misc
}
 
- Static Public Member Functions inherited from chatterino::Channel
static std::shared_ptr< ChannelgetEmpty ()
 
- Static Public Attributes inherited from chatterino::ChannelChatters
static constexpr int maxChatterColorCount = 5000
 
- Protected Member Functions inherited from chatterino::Channel
virtual void onConnected ()
 

Constructor & Destructor Documentation

◆ TwitchChannel()

chatterino::TwitchChannel::TwitchChannel ( const QString &  channelName)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ accessRoomModes()

SharedAccessGuard< const TwitchChannel::RoomModes > chatterino::TwitchChannel::accessRoomModes ( ) const
Here is the caller graph for this function:

◆ accessStreamStatus()

SharedAccessGuard< const TwitchChannel::StreamStatus > chatterino::TwitchChannel::accessStreamStatus ( ) const
Here is the caller graph for this function:

◆ addChannelPointReward()

void chatterino::TwitchChannel::addChannelPointReward ( const ChannelPointReward reward)
Here is the call graph for this function:

◆ addReplyThread()

void chatterino::TwitchChannel::addReplyThread ( const std::shared_ptr< MessageThread > &  thread)

Stores the given thread in this channel.

Note: This method not take ownership of the MessageThread; this TwitchChannel instance will store a weak_ptr to the thread.

Here is the caller graph for this function:

◆ addSeventvEmote()

void chatterino::TwitchChannel::addSeventvEmote ( const SeventvEventAPIEmoteAddDispatch dispatch)

Adds a 7TV channel emote to this channel.

Here is the call graph for this function:

◆ bttvEmote()

boost::optional< EmotePtr > chatterino::TwitchChannel::bttvEmote ( const EmoteName &  name) const
Here is the caller graph for this function:

◆ bttvEmotes()

std::shared_ptr< const EmoteMap > chatterino::TwitchChannel::bttvEmotes ( ) const
Here is the caller graph for this function:

◆ canReconnect()

bool chatterino::TwitchChannel::canReconnect ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

◆ canSendMessage()

bool chatterino::TwitchChannel::canSendMessage ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

Here is the call graph for this function:

◆ channelPointReward()

boost::optional< ChannelPointReward > chatterino::TwitchChannel::channelPointReward ( const QString &  rewardId) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ channelUrl()

const QString & chatterino::TwitchChannel::channelUrl ( )

◆ chatterCount()

int chatterino::TwitchChannel::chatterCount ( )
Here is the call graph for this function:

◆ cheerEmote()

boost::optional< CheerEmote > chatterino::TwitchChannel::cheerEmote ( const QString &  string)
Here is the caller graph for this function:

◆ createClip()

void chatterino::TwitchChannel::createClip ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffzCustomModBadge()

boost::optional< EmotePtr > chatterino::TwitchChannel::ffzCustomModBadge ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffzCustomVipBadge()

boost::optional< EmotePtr > chatterino::TwitchChannel::ffzCustomVipBadge ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ffzEmote()

boost::optional< EmotePtr > chatterino::TwitchChannel::ffzEmote ( const EmoteName &  name) const
Here is the caller graph for this function:

◆ ffzEmotes()

std::shared_ptr< const EmoteMap > chatterino::TwitchChannel::ffzEmotes ( ) const
Here is the caller graph for this function:

◆ hasHighRateLimit()

bool chatterino::TwitchChannel::hasHighRateLimit ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

void chatterino::TwitchChannel::initialize ( )

◆ isBroadcaster()

bool chatterino::TwitchChannel::isBroadcaster ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isChannelPointRewardKnown()

bool chatterino::TwitchChannel::isChannelPointRewardKnown ( const QString &  rewardId)
Here is the caller graph for this function:

◆ isEmpty()

bool chatterino::TwitchChannel::isEmpty ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLive()

bool chatterino::TwitchChannel::isLive ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

Here is the caller graph for this function:

◆ isMod()

bool chatterino::TwitchChannel::isMod ( ) const
overridevirtual

Reimplemented from chatterino::Channel.

Here is the caller graph for this function:

◆ isStaff()

bool chatterino::TwitchChannel::isStaff ( ) const

◆ isVip()

bool chatterino::TwitchChannel::isVip ( ) const
Here is the caller graph for this function:

◆ popoutPlayerUrl()

const QString & chatterino::TwitchChannel::popoutPlayerUrl ( )

◆ reconnect()

void chatterino::TwitchChannel::reconnect ( )
overridevirtual

Reimplemented from chatterino::Channel.

Here is the call graph for this function:

◆ refreshBTTVChannelEmotes()

void chatterino::TwitchChannel::refreshBTTVChannelEmotes ( bool  manualRefresh)
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshFFZChannelEmotes()

void chatterino::TwitchChannel::refreshFFZChannelEmotes ( bool  manualRefresh)
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshSevenTVChannelEmotes()

void chatterino::TwitchChannel::refreshSevenTVChannelEmotes ( bool  manualRefresh)
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshTitle()

void chatterino::TwitchChannel::refreshTitle ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeSeventvEmote()

void chatterino::TwitchChannel::removeSeventvEmote ( const SeventvEventAPIEmoteRemoveDispatch dispatch)

Removes a 7TV channel emote from this channel

Here is the call graph for this function:

◆ roomId()

QString chatterino::TwitchChannel::roomId ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendMessage()

void chatterino::TwitchChannel::sendMessage ( const QString &  message)
overridevirtual

Reimplemented from chatterino::Channel.

Here is the call graph for this function:

◆ sendReply()

void chatterino::TwitchChannel::sendReply ( const QString &  message,
const QString &  replyId 
)
virtual
Here is the call graph for this function:

◆ seventvEmote()

boost::optional< EmotePtr > chatterino::TwitchChannel::seventvEmote ( const EmoteName &  name) const
Here is the caller graph for this function:

◆ seventvEmotes()

std::shared_ptr< const EmoteMap > chatterino::TwitchChannel::seventvEmotes ( ) const
Here is the caller graph for this function:

◆ seventvEmoteSetID()

const QString & chatterino::TwitchChannel::seventvEmoteSetID ( ) const
Here is the caller graph for this function:

◆ seventvUserID()

const QString & chatterino::TwitchChannel::seventvUserID ( ) const
Here is the caller graph for this function:

◆ subscriptionUrl()

const QString & chatterino::TwitchChannel::subscriptionUrl ( )

◆ threads()

const std::unordered_map< QString, std::weak_ptr< MessageThread > > & chatterino::TwitchChannel::threads ( ) const
Here is the call graph for this function:

◆ twitchBadge()

boost::optional< EmotePtr > chatterino::TwitchChannel::twitchBadge ( const QString &  set,
const QString &  version 
) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSeventvData()

void chatterino::TwitchChannel::updateSeventvData ( const QString &  newUserID,
const QString &  newEmoteSetID 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSeventvEmote()

void chatterino::TwitchChannel::updateSeventvEmote ( const SeventvEventAPIEmoteUpdateDispatch dispatch)

Updates a 7TV channel emote's name in this channel

Here is the call graph for this function:

◆ updateSeventvUser()

void chatterino::TwitchChannel::updateSeventvUser ( const SeventvEventAPIUserConnectionUpdateDispatch dispatch)

Updates the current 7TV user. Currently, only the emote-set is updated.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ IrcMessageHandler

friend class IrcMessageHandler
friend

◆ TwitchIrcServer

friend class TwitchIrcServer
friend

◆ TwitchMessageBuilder

friend class TwitchMessageBuilder
friend

Member Data Documentation

◆ bttvEmotes_

Atomic<std::shared_ptr<const EmoteMap> > chatterino::TwitchChannel::bttvEmotes_
protected

◆ channelPointRewardAdded

pajlada::Signals::SelfDisconnectingSignal<ChannelPointReward> chatterino::TwitchChannel::channelPointRewardAdded

◆ ffzCustomModBadge_

Atomic<boost::optional<EmotePtr> > chatterino::TwitchChannel::ffzCustomModBadge_
protected

◆ ffzCustomVipBadge_

Atomic<boost::optional<EmotePtr> > chatterino::TwitchChannel::ffzCustomVipBadge_
protected

◆ ffzEmotes_

Atomic<std::shared_ptr<const EmoteMap> > chatterino::TwitchChannel::ffzEmotes_
protected

◆ liveStatusChanged

pajlada::Signals::NoArgSignal chatterino::TwitchChannel::liveStatusChanged

◆ roomIdChanged

pajlada::Signals::NoArgSignal chatterino::TwitchChannel::roomIdChanged

◆ roomModesChanged

pajlada::Signals::NoArgSignal chatterino::TwitchChannel::roomModesChanged

◆ seventvEmotes_

Atomic<std::shared_ptr<const EmoteMap> > chatterino::TwitchChannel::seventvEmotes_
protected

◆ userStateChanged

pajlada::Signals::NoArgSignal chatterino::TwitchChannel::userStateChanged

The documentation for this class was generated from the following files: