From 498225debdb22d83e591635dbd172cca12476279 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 25 Feb 2013 13:24:46 -0600 Subject: Rewrote the settings system. It may still need some work. --- data/loginresponse.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 6 deletions(-) (limited to 'data/loginresponse.h') diff --git a/data/loginresponse.h b/data/loginresponse.h index bcb77d56..c30897c3 100644 --- a/data/loginresponse.h +++ b/data/loginresponse.h @@ -18,28 +18,75 @@ #include +/*! + * \brief The LoginResponse class represents a response received from Minecraft's login servers. + */ class LoginResponse : public QObject { Q_OBJECT public: + /*! + * \brief Creates a new instance of the LoginResponse class. + * \param username The user's username. + * \param sessionID The user's session ID. + * \param latestVersion The latest version of Minecraft. + * \param parent The parent object. + */ explicit LoginResponse(const QString &username, const QString &sessionID, qint64 latestVersion, QObject *parent = 0); LoginResponse(); LoginResponse(const LoginResponse& other); - QString getUsername() const; + /*! + * \brief Gets the username. + * This one should go without saying. + * \return The username. + * \sa setUsername() + */ + QString username() const; + + /*! + * \brief setUsername Sets the username. + * \param username The new username. + * \sa username() + */ void setUsername(const QString& username); - QString getSessionID() const; + + /*! + * \brief Gets the session ID. + * \return The session ID. + * \sa setSessionID() + */ + QString sessionID() const; + + /*! + * \brief Sets the session ID. + * \param sessionID The new session ID. + * \sa sessionID() + */ void setSessionID(const QString& sessionID); - qint64 getLatestVersion() const; + + /*! + * \brief Gets the latest version. + * This is a value returned by the login servers when a user logs in. + * \return The latest version. + * \sa setLatestVersion() + */ + qint64 latestVersion() const; + + /*! + * \brief Sets the latest version. + * \param v The new latest version. + * \sa latestVersion() + */ void setLatestVersion(qint64 v); private: - QString username; - QString sessionID; - qint64 latestVersion; + QString m_username; + QString m_sessionID; + qint64 m_latestVersion; }; Q_DECLARE_METATYPE(LoginResponse) -- cgit v1.2.3