Add logout button
Logout from the current session and invalidate the current token
This commit is contained in:
parent
f50fb34fb6
commit
239780557f
17 changed files with 166 additions and 41 deletions
|
|
@ -44,9 +44,11 @@ public:
|
|||
inline QString getHomeServer();
|
||||
inline void incrementTransactionId();
|
||||
|
||||
void reset();
|
||||
|
||||
public slots:
|
||||
// Profile
|
||||
void getOwnProfile();
|
||||
void logout();
|
||||
|
||||
inline void setServer(const QString &server);
|
||||
inline void setAccessToken(const QString &token);
|
||||
|
|
@ -56,6 +58,8 @@ signals:
|
|||
void loginError(const QString &error);
|
||||
void registerError(const QString &error);
|
||||
|
||||
void loggedOut();
|
||||
|
||||
void loginSuccess(const QString &userid, const QString &homeserver, const QString &token);
|
||||
void registerSuccess(const QString &userid, const QString &homeserver, const QString &token);
|
||||
|
||||
|
|
@ -74,6 +78,7 @@ private:
|
|||
GetProfile,
|
||||
InitialSync,
|
||||
Login,
|
||||
Logout,
|
||||
Register,
|
||||
SendTextMessage,
|
||||
Sync,
|
||||
|
|
@ -82,6 +87,7 @@ private:
|
|||
|
||||
// Response handlers.
|
||||
void onLoginResponse(QNetworkReply *reply);
|
||||
void onLogoutResponse(QNetworkReply *reply);
|
||||
void onRegisterResponse(QNetworkReply *reply);
|
||||
void onVersionsResponse(QNetworkReply *reply);
|
||||
void onGetOwnProfileResponse(QNetworkReply *reply);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue