#pragma once #include "logging/loggingchannel.hpp" #include "messages/lazyloadedimage.hpp" #include "messages/limitedqueue.hpp" #include "util/concurrentmap.hpp" #include #include #include #include #include #include #include namespace chatterino { namespace messages { class Message; } class Channel { public: explicit Channel(const QString &_name); boost::signals2::signal messageRemovedFromStart; boost::signals2::signal messageAppended; virtual bool isEmpty() const; messages::LimitedQueueSnapshot getMessageSnapshot(); void addMessage(messages::SharedMessage message); void addRecentChatter(const std::shared_ptr &message); struct NameOptions { QString displayName; QString localizedName; }; std::vector getUsernamesForCompletions(); QString name; QStringList modList; // Key = login name std::map recentChatters; std::mutex recentChattersMutex; virtual bool canSendMessage() const; virtual void sendMessage(const QString &message); bool dontAddMessages = false; private: messages::LimitedQueue messages; // std::shared_ptr loggingChannel; }; } // namespace chatterino