mirror-chatterino2/channels.h
Rasmus Karlsson 46f432890f Simple logging implemented
Message now stores a copy of the content string
Use .nick() instead of .account() to get the users lowercase name (login name)
2017-03-11 11:38:47 +01:00

34 lines
753 B
C++

#ifndef CHANNELS_H
#define CHANNELS_H
#include "channel.h"
namespace chatterino {
void initChannels();
class Channels
{
public:
static std::shared_ptr<Channel> getWhispers();
static std::shared_ptr<Channel> getMentions();
static std::shared_ptr<Channel> getEmpty();
const static std::vector<std::shared_ptr<Channel>> getItems();
static std::shared_ptr<Channel> addChannel(const QString &channel);
static std::shared_ptr<Channel> getChannel(const QString &channel);
static void removeChannel(const QString &channel);
private:
Channels()
{
}
static QMap<QString, std::tuple<std::shared_ptr<Channel>, int>> channels;
static QMutex channelsMutex;
};
} // namespace chatterino
#endif // CHANNELS_H