aboutsummaryrefslogtreecommitdiff
path: root/jobs/generated/login.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-19 19:36:10 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-10-19 19:36:10 +0900
commitba620ee07989aff134fec6b5d6f058cab3377ecc (patch)
treec9e6f0e434acf36efb61d5a28824f583f2c048e2 /jobs/generated/login.h
parente4fabf6e618b5045efec2629cb5d7b5bf73677e8 (diff)
downloadlibquotient-ba620ee07989aff134fec6b5d6f058cab3377ecc.tar.gz
libquotient-ba620ee07989aff134fec6b5d6f058cab3377ecc.zip
Introduce device_id and initial_device_name support; switch to generated LoginJob
This is _almost_ a backwards-compatible change, except that connect*() and other relevant methods in Connection are no more virtual (that wasn't much useful anyway). Otherwise it's a matter of passing initial_device_name to connectToServer(), saving device_id (along with access_token) from the result of LoginJob and then passing device_id (along with access_token, again) to connectWithToken() upon the next run.
Diffstat (limited to 'jobs/generated/login.h')
-rw-r--r--jobs/generated/login.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/jobs/generated/login.h b/jobs/generated/login.h
new file mode 100644
index 00000000..dc89206d
--- /dev/null
+++ b/jobs/generated/login.h
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
+ */
+
+
+#pragma once
+
+#include "../basejob.h"
+
+#include <QtCore/QString>
+
+
+namespace QMatrixClient
+{
+
+ // Operations
+
+ class LoginJob : public BaseJob
+ {
+ public:
+ explicit LoginJob(QString type, QString user = {}, QString medium = {}, QString address = {}, QString password = {}, QString token = {}, QString device_id = {}, QString initial_device_display_name = {});
+
+ ~LoginJob() override;
+
+ const QString& user_id() const;
+ const QString& access_token() const;
+ const QString& home_server() const;
+ const QString& device_id() const;
+
+ protected:
+ Status parseJson(const QJsonDocument& data) override;
+
+ private:
+ class Private;
+ Private* d;
+ };
+
+} // namespace QMatrixClient