mirror-chatterino2/channel.h

62 lines
1.1 KiB
C
Raw Normal View History

#ifndef CHANNEL_H
#define CHANNEL_H
#include "QString"
2017-01-03 21:19:33 +01:00
#include "QMap"
2017-01-05 16:07:20 +01:00
#include "QMutex"
#include "QVector"
class Message;
class Channel
{
public:
static const Channel whispers;
static const Channel mentions;
2017-01-03 21:19:33 +01:00
static Channel* addChannel(const QString &channel);
static Channel* getChannel(const QString &channel);
static void removeChannel(const QString &channel);
2017-01-01 18:43:52 +01:00
public:
QString getSubLink();
QString getChannelLink();
QString getPopoutPlayerLink();
bool getIsLive();
int getStreamViewerCount();
QString getStreamStatus();
QString getStreamGame();
2017-01-05 16:07:20 +01:00
void addMessage(Message* message);
// ~Channel();
QVector<Message*>* getMessagesClone();
private:
Channel(QString channel);
2017-01-05 16:07:20 +01:00
QMutex* messageMutex;
2017-01-03 21:19:33 +01:00
static QMap<QString, Channel*> channels;
int referenceCount = 1;
QString name;
int roomID;
2017-01-05 16:07:20 +01:00
QVector<Message*>* messages = new QVector<Message*>();
QString subLink = "";
QString channelLink = "";
QString popoutPlayerLink = "";
bool isLive = false;
int streamViewerCount = 0;
QString streamStatus = "";
QString streamGame = "";
};
#endif // CHANNEL_H