Chatterino
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
chatterino::Channel Class Reference

#include <Channel.hpp>

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

Public Types

enum  Type {
  Type::None, Type::Direct, Type::Twitch, Type::TwitchWhispers,
  Type::TwitchWatching, Type::TwitchMentions, Type::TwitchLive, Type::TwitchEnd,
  Type::Irc, Type::Misc
}
 

Public Member Functions

 Channel (const QString &name, Type type)
 
virtual ~Channel ()
 
Type getType () const
 
const QString & getName () const
 
virtual const QString & getDisplayName () const
 
virtual const QString & getLocalizedName () const
 
bool isTwitchChannel () const
 
virtual bool isEmpty () 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 canSendMessage () const
 
virtual bool isWritable () const
 
virtual void sendMessage (const QString &message)
 
virtual bool isMod () const
 
virtual bool isBroadcaster () const
 
virtual bool hasModRights () const
 
virtual bool hasHighRateLimit () const
 
virtual bool isLive () const
 
virtual bool shouldIgnoreHighlights () const
 
virtual bool canReconnect () const
 
virtual void reconnect ()
 

Static Public Member Functions

static std::shared_ptr< ChannelgetEmpty ()
 

Public Attributes

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 Member Functions

virtual void onConnected ()
 

Member Enumeration Documentation

◆ Type

Enumerator
None 
Direct 
Twitch 
TwitchWhispers 
TwitchWatching 
TwitchMentions 
TwitchLive 
TwitchEnd 
Irc 
Misc 

Constructor & Destructor Documentation

◆ Channel()

chatterino::Channel::Channel ( const QString &  name,
Type  type 
)
explicit
Here is the caller graph for this function:

◆ ~Channel()

chatterino::Channel::~Channel ( )
virtual

Member Function Documentation

◆ addMessage()

void chatterino::Channel::addMessage ( MessagePtr  message,
boost::optional< MessageFlags overridingFlags = boost::none 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addMessagesAtStart()

void chatterino::Channel::addMessagesAtStart ( const std::vector< MessagePtr > &  messages_)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addOrReplaceTimeout()

void chatterino::Channel::addOrReplaceTimeout ( MessagePtr  message)
Here is the call graph for this function:

◆ canReconnect()

bool chatterino::Channel::canReconnect ( ) const
virtual

◆ canSendMessage()

bool chatterino::Channel::canSendMessage ( ) const
virtual

Reimplemented in chatterino::TwitchChannel.

◆ deleteMessage()

void chatterino::Channel::deleteMessage ( QString  messageID)
Here is the call graph for this function:

◆ disableAllMessages()

void chatterino::Channel::disableAllMessages ( )
Here is the call graph for this function:

◆ fillInMissingMessages()

void chatterino::Channel::fillInMissingMessages ( const std::vector< MessagePtr > &  messages)

Inserts the given messages in order by Message::serverReceivedTime.

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

◆ findMessage()

MessagePtr chatterino::Channel::findMessage ( QString  messageID)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDisplayName()

const QString & chatterino::Channel::getDisplayName ( ) const
virtual
Here is the call graph for this function:

◆ getEmpty()

std::shared_ptr< Channel > chatterino::Channel::getEmpty ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLocalizedName()

const QString & chatterino::Channel::getLocalizedName ( ) const
virtual
Here is the call graph for this function:

◆ getMessageSnapshot()

LimitedQueueSnapshot< MessagePtr > chatterino::Channel::getMessageSnapshot ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getName()

const QString & chatterino::Channel::getName ( ) const
Here is the caller graph for this function:

◆ getType()

Channel::Type chatterino::Channel::getType ( ) const
Here is the caller graph for this function:

◆ hasHighRateLimit()

bool chatterino::Channel::hasHighRateLimit ( ) const
virtual

Reimplemented in chatterino::TwitchChannel.

Here is the call graph for this function:

◆ hasMessages()

bool chatterino::Channel::hasMessages ( ) const
Here is the call graph for this function:

◆ hasModRights()

bool chatterino::Channel::hasModRights ( ) const
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isBroadcaster()

bool chatterino::Channel::isBroadcaster ( ) const
virtual

Reimplemented in chatterino::TwitchChannel.

Here is the caller graph for this function:

◆ isEmpty()

bool chatterino::Channel::isEmpty ( ) const
virtual

Reimplemented in chatterino::TwitchChannel.

Here is the caller graph for this function:

◆ isLive()

bool chatterino::Channel::isLive ( ) const
virtual

Reimplemented in chatterino::TwitchChannel.

◆ isMod()

bool chatterino::Channel::isMod ( ) const
virtual

Reimplemented in chatterino::TwitchChannel.

Here is the caller graph for this function:

◆ isTwitchChannel()

bool chatterino::Channel::isTwitchChannel ( ) const
Here is the caller graph for this function:

◆ isWritable()

bool chatterino::Channel::isWritable ( ) const
virtual
Here is the call graph for this function:

◆ onConnected()

void chatterino::Channel::onConnected ( )
protectedvirtual

◆ reconnect()

void chatterino::Channel::reconnect ( )
virtual

◆ replaceMessage() [1/2]

void chatterino::Channel::replaceMessage ( MessagePtr  message,
MessagePtr  replacement 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replaceMessage() [2/2]

void chatterino::Channel::replaceMessage ( size_t  index,
MessagePtr  replacement 
)
Here is the call graph for this function:

◆ sendMessage()

void chatterino::Channel::sendMessage ( const QString &  message)
virtual

◆ shouldIgnoreHighlights()

bool chatterino::Channel::shouldIgnoreHighlights ( ) const
virtual

Member Data Documentation

◆ completionModel

CompletionModel chatterino::Channel::completionModel

◆ connected

pajlada::Signals::NoArgSignal chatterino::Channel::connected

Invoked when AbstractIrcServer::onReadConnected occurs.

◆ destroyed

pajlada::Signals::NoArgSignal chatterino::Channel::destroyed

◆ displayNameChanged

pajlada::Signals::NoArgSignal chatterino::Channel::displayNameChanged

◆ filledInMessages

pajlada::Signals::Signal<const std::vector<MessagePtr> &> chatterino::Channel::filledInMessages

Invoked when some number of messages were filled in using time received.

◆ lastDate_

QDate chatterino::Channel::lastDate_

◆ messageAppended

pajlada::Signals::Signal<MessagePtr &, boost::optional<MessageFlags> > chatterino::Channel::messageAppended

◆ messageRemovedFromStart

pajlada::Signals::Signal<MessagePtr &> chatterino::Channel::messageRemovedFromStart

◆ messageReplaced

pajlada::Signals::Signal<size_t, MessagePtr &> chatterino::Channel::messageReplaced

◆ messagesAddedAtStart

pajlada::Signals::Signal<std::vector<MessagePtr> &> chatterino::Channel::messagesAddedAtStart

◆ sendMessageSignal

pajlada::Signals::Signal<const QString &, const QString &, bool &> chatterino::Channel::sendMessageSignal

◆ sendReplySignal

pajlada::Signals::Signal<const QString &, const QString &, const QString &, bool &> chatterino::Channel::sendReplySignal

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