mirror-chatterino2/accountmanager.h
Rasmus Karlsson d113115822 added message-sending through channel->sendMessage
doesn't do anything with the user input box on enter yet though
2017-05-27 17:45:40 +02:00

37 lines
713 B
C++

#ifndef ACCOUNTMANAGER_H
#define ACCOUNTMANAGER_H
#include "twitch/twitchaccount.h"
#include <mutex>
#include <vector>
namespace chatterino {
class AccountManager
{
public:
static AccountManager &getInstance()
{
static AccountManager instance;
return instance;
}
twitch::TwitchUser &getTwitchAnon();
std::vector<twitch::TwitchUser> getTwitchUsers();
bool removeTwitchUser(const QString &userName);
void addTwitchUser(const twitch::TwitchUser &user);
private:
AccountManager();
twitch::TwitchUser _twitchAnon;
std::vector<twitch::TwitchUser> _twitchUsers;
std::mutex _twitchUsersMutex;
};
} // namespace chatterino
#endif // ACCOUNTMANAGER_H