summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/loginresponse.cpp26
-rw-r--r--data/loginresponse.h10
2 files changed, 32 insertions, 4 deletions
diff --git a/data/loginresponse.cpp b/data/loginresponse.cpp
index a3647114..44bc80eb 100644
--- a/data/loginresponse.cpp
+++ b/data/loginresponse.cpp
@@ -15,17 +15,27 @@
#include "loginresponse.h"
-LoginResponse::LoginResponse(const QString& username, const QString& sessionID, QObject *parent) :
+LoginResponse::LoginResponse(const QString& username, const QString& sessionID,
+ qint64 latestVersion, QObject *parent) :
QObject(parent)
{
this->username = username;
this->sessionID = sessionID;
+ this->latestVersion = latestVersion;
+}
+
+LoginResponse::LoginResponse()
+{
+ this->username = "";
+ this->sessionID = "";
+ this->latestVersion = 0;
}
LoginResponse::LoginResponse(const LoginResponse &other)
{
- this->username = other.username;
- this->sessionID = other.sessionID;
+ this->username = other.getUsername();
+ this->sessionID = other.getSessionID();
+ this->latestVersion = other.getLatestVersion();
}
QString LoginResponse::getUsername() const
@@ -47,3 +57,13 @@ void LoginResponse::setSessionID(const QString& sessionID)
{
this->sessionID = sessionID;
}
+
+qint64 LoginResponse::getLatestVersion() const
+{
+ return latestVersion;
+}
+
+void LoginResponse::setLatestVersion(qint64 v)
+{
+ this->latestVersion = v;
+}
diff --git a/data/loginresponse.h b/data/loginresponse.h
index e780750f..bcb77d56 100644
--- a/data/loginresponse.h
+++ b/data/loginresponse.h
@@ -22,7 +22,9 @@ class LoginResponse : public QObject
{
Q_OBJECT
public:
- explicit LoginResponse(const QString &username, const QString &sessionID, QObject *parent = 0);
+ explicit LoginResponse(const QString &username, const QString &sessionID,
+ qint64 latestVersion, QObject *parent = 0);
+ LoginResponse();
LoginResponse(const LoginResponse& other);
QString getUsername() const;
@@ -31,9 +33,15 @@ public:
QString getSessionID() const;
void setSessionID(const QString& sessionID);
+ qint64 getLatestVersion() const;
+ void setLatestVersion(qint64 v);
+
private:
QString username;
QString sessionID;
+ qint64 latestVersion;
};
+Q_DECLARE_METATYPE(LoginResponse)
+
#endif // LOGINRESPONSE_H