added new function and classes for irc support

This commit is contained in:
fourtf
2019-09-09 22:26:14 +02:00
parent 9f1a5b900e
commit fd0c11964e
7 changed files with 187 additions and 28 deletions
+21 -13
View File
@@ -5,20 +5,28 @@
namespace chatterino {
// class IrcServer
//{
// public:
// IrcServer(const QString &hostname, int port);
struct IrcConnection_;
// void setAccount(std::shared_ptr<IrcAccount> newAccount);
// std::shared_ptr<IrcAccount> getAccount() const;
class IrcServer : public AbstractIrcServer
{
public:
explicit IrcServer(const IrcConnection_ &data);
IrcServer(const IrcConnection_ &data,
const std::vector<std::weak_ptr<Channel>> &restoreChannels);
~IrcServer() override;
// protected:
// virtual void initializeConnection(Communi::IrcConnection *connection, bool
// isReadConnection);
int getId();
// AbstractIrcServer interface
protected:
void initializeConnection(IrcConnection *connection, bool isRead,
bool isWrite) override;
std::shared_ptr<Channel> createChannel(const QString &channelName) override;
bool hasSeparateWriteConnection() const override;
private:
// pointer so we don't have to circle include Irc2.hpp
IrcConnection_ *data_;
};
// virtual void privateMessageReceived(Communi::IrcPrivateMessage *message);
// virtual void messageReceived(Communi::IrcMessage *message);
//};
//
} // namespace chatterino