23 #ifndef __IRCCHATADAPTER_H__ 24 #define __IRCCHATADAPTER_H__ 26 #include "irc/ircadapterbase.h" 27 #include <QStringList> 73 virtual void emitChatMessage(
const QString& sender,
const QString& content);
77 return this->pNetwork;
80 QString recipient()
const {
return this->recipientName; }
91 QString
title()
const;
97 virtual void userChangesNickname(
const QString& oldNickname,
const QString& newNickname) = 0;
102 virtual void userJoins(
const QString& nickname,
const QString& fullSignature) = 0;
107 virtual void userLeaves(
const QString& nickname,
const QString& farewellMessage, IRCQuitType quitType) = 0;
113 const QList<char> &addedFlags,
const QList<char> &removedFlags) = 0;
117 QString recipientName;
129 void sendChatMessage(
const QString& message);
130 void setRecipient(
const QString& name);
Interprets communication between the client and the IRC server.
void setNetwork(IRCNetworkAdapter *pNetwork)
Sets IRCNetworkAdapter for this chat window. This adapter is not detached from the old network...
Provides an unified communication interface between a client and IRC network entities.
virtual void emitChatMessage(const QString &sender, const QString &content)
Emits message() signal formatting it to present sender's message.
Handles chatting through IRC.
virtual void userModeChanges(const QString &nickname, const QList< char > &addedFlags, const QList< char > &removedFlags)=0
Use this to register the fact that user MODE flags have changed.
IRCNetworkAdapter * network()
The idea of the adapter system is that each adapter is either a network or is a child of a network...
QString title() const
For chat adapters this will return recipientName.
virtual void userChangesNickname(const QString &oldNickname, const QString &newNickname)=0
Use this to register the fact that user has changed his/hers nickname.
IRCChatAdapter(IRCNetworkAdapter *pNetwork, const QString &recipient)
virtual void userJoins(const QString &nickname, const QString &fullSignature)=0
Use this to register the fact that user has joined the chat.
QString extractMessageLine(QStringList &words, int maxLength)
void doSendMessage(const QString &message, IRCAdapterBase *pOrigin)
virtual void userLeaves(const QString &nickname, const QString &farewellMessage, IRCQuitType quitType)=0
Use this to register the fact that user has left the chat.