Chatterino
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
chatterino::AbstractIrcServer Class Referenceabstract

#include <AbstractIrcServer.hpp>

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

Public Types

enum  ConnectionType { Read = 1, Write = 2, Both = 3 }
 

Public Member Functions

virtual ~AbstractIrcServer ()=default
 
void initializeIrc ()
 
void connect ()
 
void disconnect ()
 
void sendMessage (const QString &channelName, const QString &message)
 
void sendRawMessage (const QString &rawMessage)
 
ChannelPtr getOrAddChannel (const QString &dirtyChannelName)
 
ChannelPtr getChannelOrEmpty (const QString &dirtyChannelName)
 
std::vector< std::weak_ptr< Channel > > getChannels ()
 
void addFakeMessage (const QString &data)
 
void addGlobalSystemMessage (const QString &messageText)
 
void forEachChannel (std::function< void(ChannelPtr)> func)
 

Public Attributes

pajlada::Signals::NoArgSignal connected
 
pajlada::Signals::NoArgSignal disconnected
 

Protected Member Functions

 AbstractIrcServer ()
 
virtual void initializeConnectionSignals (IrcConnection *connection, ConnectionType type)
 
virtual void initializeConnection (IrcConnection *connection, ConnectionType type)=0
 
virtual std::shared_ptr< ChannelcreateChannel (const QString &channelName)=0
 
virtual void privateMessageReceived (Communi::IrcPrivateMessage *message)
 
virtual void readConnectionMessageReceived (Communi::IrcMessage *message)
 
virtual void writeConnectionMessageReceived (Communi::IrcMessage *message)
 
virtual void onReadConnected (IrcConnection *connection)
 
virtual void onWriteConnected (IrcConnection *connection)
 
virtual void onDisconnected ()
 
virtual std::shared_ptr< ChannelgetCustomChannel (const QString &channelName)
 
virtual bool hasSeparateWriteConnection () const =0
 
virtual QString cleanChannelName (const QString &dirtyChannelName)
 
void open (ConnectionType type)
 

Protected Attributes

QMap< QString, std::weak_ptr< Channel > > channels
 
std::mutex channelMutex
 

Member Enumeration Documentation

◆ ConnectionType

Enumerator
Read 
Write 
Both 

Constructor & Destructor Documentation

◆ ~AbstractIrcServer()

virtual chatterino::AbstractIrcServer::~AbstractIrcServer ( )
virtualdefault

◆ AbstractIrcServer()

chatterino::AbstractIrcServer::AbstractIrcServer ( )
protected

Member Function Documentation

◆ addFakeMessage()

void chatterino::AbstractIrcServer::addFakeMessage ( const QString &  data)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addGlobalSystemMessage()

void chatterino::AbstractIrcServer::addGlobalSystemMessage ( const QString &  messageText)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanChannelName()

QString chatterino::AbstractIrcServer::cleanChannelName ( const QString &  dirtyChannelName)
protectedvirtual

Reimplemented in chatterino::TwitchIrcServer.

Here is the caller graph for this function:

◆ connect()

void chatterino::AbstractIrcServer::connect ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createChannel()

virtual std::shared_ptr<Channel> chatterino::AbstractIrcServer::createChannel ( const QString &  channelName)
protectedpure virtual

Implemented in chatterino::TwitchIrcServer, and chatterino::IrcServer.

Here is the caller graph for this function:

◆ disconnect()

void chatterino::AbstractIrcServer::disconnect ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ forEachChannel()

void chatterino::AbstractIrcServer::forEachChannel ( std::function< void(ChannelPtr)>  func)
Here is the caller graph for this function:

◆ getChannelOrEmpty()

ChannelPtr chatterino::AbstractIrcServer::getChannelOrEmpty ( const QString &  dirtyChannelName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChannels()

std::vector< std::weak_ptr< Channel > > chatterino::AbstractIrcServer::getChannels ( )

◆ getCustomChannel()

std::shared_ptr< Channel > chatterino::AbstractIrcServer::getCustomChannel ( const QString &  channelName)
protectedvirtual

Reimplemented in chatterino::TwitchIrcServer.

Here is the caller graph for this function:

◆ getOrAddChannel()

ChannelPtr chatterino::AbstractIrcServer::getOrAddChannel ( const QString &  dirtyChannelName)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasSeparateWriteConnection()

virtual bool chatterino::AbstractIrcServer::hasSeparateWriteConnection ( ) const
protectedpure virtual

Implemented in chatterino::TwitchIrcServer, and chatterino::IrcServer.

Here is the caller graph for this function:

◆ initializeConnection()

virtual void chatterino::AbstractIrcServer::initializeConnection ( IrcConnection connection,
ConnectionType  type 
)
protectedpure virtual

Implemented in chatterino::TwitchIrcServer, and chatterino::IrcServer.

Here is the caller graph for this function:

◆ initializeConnectionSignals()

virtual void chatterino::AbstractIrcServer::initializeConnectionSignals ( IrcConnection connection,
ConnectionType  type 
)
inlineprotectedvirtual

Reimplemented in chatterino::IrcServer.

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

◆ initializeIrc()

void chatterino::AbstractIrcServer::initializeIrc ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onDisconnected()

void chatterino::AbstractIrcServer::onDisconnected ( )
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onReadConnected()

void chatterino::AbstractIrcServer::onReadConnected ( IrcConnection connection)
protectedvirtual

Reimplemented in chatterino::IrcServer.

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

◆ onWriteConnected()

void chatterino::AbstractIrcServer::onWriteConnected ( IrcConnection connection)
protectedvirtual
Here is the caller graph for this function:

◆ open()

void chatterino::AbstractIrcServer::open ( ConnectionType  type)
protected
Here is the caller graph for this function:

◆ privateMessageReceived()

void chatterino::AbstractIrcServer::privateMessageReceived ( Communi::IrcPrivateMessage *  message)
protectedvirtual

Reimplemented in chatterino::TwitchIrcServer, and chatterino::IrcServer.

Here is the caller graph for this function:

◆ readConnectionMessageReceived()

void chatterino::AbstractIrcServer::readConnectionMessageReceived ( Communi::IrcMessage *  message)
protectedvirtual

Reimplemented in chatterino::TwitchIrcServer, and chatterino::IrcServer.

Here is the caller graph for this function:

◆ sendMessage()

void chatterino::AbstractIrcServer::sendMessage ( const QString &  channelName,
const QString &  message 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendRawMessage()

void chatterino::AbstractIrcServer::sendRawMessage ( const QString &  rawMessage)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeConnectionMessageReceived()

void chatterino::AbstractIrcServer::writeConnectionMessageReceived ( Communi::IrcMessage *  message)
protectedvirtual

Reimplemented in chatterino::TwitchIrcServer.

Here is the caller graph for this function:

Member Data Documentation

◆ channelMutex

std::mutex chatterino::AbstractIrcServer::channelMutex
protected

◆ channels

QMap<QString, std::weak_ptr<Channel> > chatterino::AbstractIrcServer::channels
protected

◆ connected

pajlada::Signals::NoArgSignal chatterino::AbstractIrcServer::connected

◆ disconnected

pajlada::Signals::NoArgSignal chatterino::AbstractIrcServer::disconnected

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