mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
53 lines
733 B
C++
53 lines
733 B
C++
#ifndef ACCOUNT_H
|
|
#define ACCOUNT_H
|
|
|
|
#include <QString>
|
|
|
|
namespace chatterino {
|
|
|
|
class Account
|
|
{
|
|
public:
|
|
Account(QString username, QString oauthToken, QString oauthClient);
|
|
|
|
static const Account *
|
|
getAnon()
|
|
{
|
|
return &anon;
|
|
}
|
|
|
|
const QString &
|
|
getUsername() const
|
|
{
|
|
return username;
|
|
}
|
|
|
|
const QString &
|
|
getOauthToken() const
|
|
{
|
|
return oauthToken;
|
|
}
|
|
|
|
const QString &
|
|
getOauthClient() const
|
|
{
|
|
return oauthClient;
|
|
}
|
|
|
|
bool
|
|
isAnon() const
|
|
{
|
|
return username.startsWith("justinfan");
|
|
}
|
|
|
|
private:
|
|
static Account anon;
|
|
|
|
QString username;
|
|
QString oauthClient;
|
|
QString oauthToken;
|
|
};
|
|
}
|
|
|
|
#endif // ACCOUNT_H
|