refactored irc

This commit is contained in:
fourtf
2018-02-05 15:11:50 +01:00
parent 12b30eb2ed
commit b351c40d29
56 changed files with 1397 additions and 1154 deletions
+39
View File
@@ -0,0 +1,39 @@
#pragma once
#include <QString>
namespace chatterino {
namespace providers {
namespace twitch {
class TwitchAccount
{
public:
TwitchAccount(const QString &username, const QString &oauthToken, const QString &oauthClient);
const QString &getUserName() const;
const QString &getOAuthToken() const;
const QString &getOAuthClient() const;
const QString &getUserId() const;
void setUserId(const QString &id);
// Attempts to update the users OAuth Client ID
// Returns true if the value has changed, otherwise false
bool setOAuthClient(const QString &newClientID);
// Attempts to update the users OAuth Token
// Returns true if the value has changed, otherwise false
bool setOAuthToken(const QString &newOAuthToken);
bool isAnon() const;
private:
QString oauthClient;
QString oauthToken;
QString userId;
QString userName;
const bool _isAnon;
};
} // namespace twitch
} // namespace providers
} // namespace chatterino