2017-01-16 03:15:07 +01:00
|
|
|
#ifndef CHANNELS_H
|
|
|
|
#define CHANNELS_H
|
|
|
|
|
|
|
|
#include "channel.h"
|
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
|
2017-03-11 11:32:19 +01:00
|
|
|
void initChannels();
|
|
|
|
|
2017-01-16 03:15:07 +01:00
|
|
|
class Channels
|
|
|
|
{
|
|
|
|
public:
|
2017-03-11 11:32:19 +01:00
|
|
|
static std::shared_ptr<Channel> getWhispers();
|
|
|
|
static std::shared_ptr<Channel> getMentions();
|
|
|
|
static std::shared_ptr<Channel> getEmpty();
|
2017-01-30 19:14:25 +01:00
|
|
|
|
|
|
|
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);
|
2017-01-16 03:15:07 +01:00
|
|
|
static void removeChannel(const QString &channel);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Channels()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-01-30 19:14:25 +01:00
|
|
|
static QMap<QString, std::tuple<std::shared_ptr<Channel>, int>> channels;
|
|
|
|
static QMutex channelsMutex;
|
2017-01-16 03:15:07 +01:00
|
|
|
};
|
2017-03-11 11:32:19 +01:00
|
|
|
|
|
|
|
} // namespace chatterino
|
|
|
|
|
2017-01-16 03:15:07 +01:00
|
|
|
#endif // CHANNELS_H
|