2017-01-04 15:12:31 +01:00
|
|
|
#ifndef ACCOUNT_H
|
|
|
|
#define ACCOUNT_H
|
|
|
|
|
|
|
|
#include "QString"
|
|
|
|
|
|
|
|
class Account
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Account(QString username, QString oauthToken, QString oauthClient);
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
static const Account *
|
|
|
|
anon()
|
|
|
|
{
|
2017-01-04 15:12:31 +01:00
|
|
|
return m_anon;
|
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
const QString &
|
|
|
|
username()
|
|
|
|
{
|
2017-01-04 15:12:31 +01:00
|
|
|
return m_username;
|
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
const QString &
|
|
|
|
oauthToken()
|
|
|
|
{
|
2017-01-04 15:12:31 +01:00
|
|
|
return m_oauthToken;
|
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
const QString &
|
|
|
|
oauthClient()
|
|
|
|
{
|
2017-01-04 15:12:31 +01:00
|
|
|
return m_oauthClient;
|
|
|
|
}
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
bool
|
|
|
|
isAnon()
|
|
|
|
{
|
2017-01-04 15:12:31 +01:00
|
|
|
return m_username.startsWith("justinfan");
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2017-01-11 18:52:09 +01:00
|
|
|
const static Account *m_anon;
|
2017-01-04 15:12:31 +01:00
|
|
|
|
|
|
|
QString m_username;
|
|
|
|
QString m_oauthClient;
|
|
|
|
QString m_oauthToken;
|
|
|
|
};
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
#endif // ACCOUNT_H
|