aboutsummaryrefslogtreecommitdiff
path: root/jobs/generated/login.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-30 03:36:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2017-11-30 03:36:29 +0900
commitbcdede472add732c49c95564034c8cfa1c38c725 (patch)
treef8a67ed14c6439633ec4ddc7f2bb16e235ce97fd /jobs/generated/login.cpp
parent357625eb55e2f4569bb487ffe14a9236188e25f3 (diff)
downloadlibquotient-bcdede472add732c49c95564034c8cfa1c38c725.tar.gz
libquotient-bcdede472add732c49c95564034c8cfa1c38c725.zip
Generated jobs: Apply naming convention to parameters
It's now camelCase everywhere, even if The Spec uses snake_case (it is not consistent in that respect).
Diffstat (limited to 'jobs/generated/login.cpp')
-rw-r--r--jobs/generated/login.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/jobs/generated/login.cpp b/jobs/generated/login.cpp
index 0c57c684..7bd905ee 100644
--- a/jobs/generated/login.cpp
+++ b/jobs/generated/login.cpp
@@ -15,14 +15,14 @@ static const auto basePath = QStringLiteral("/_matrix/client/r0");
class LoginJob::Private
{
public:
- QString user_id;
- QString access_token;
- QString home_server;
- QString device_id;
+ QString userId;
+ QString accessToken;
+ QString homeServer;
+ QString deviceId;
};
-LoginJob::LoginJob(QString type, QString user, QString medium, QString address, QString password, QString token, QString device_id, QString initial_device_display_name)
+LoginJob::LoginJob(QString type, QString user, QString medium, QString address, QString password, QString token, QString deviceId, QString initialDeviceDisplayName)
: BaseJob(HttpVerb::Post, "LoginJob",
basePath % "/login",
Query { }, Data { }, false
@@ -40,10 +40,10 @@ LoginJob::LoginJob(QString type, QString user, QString medium, QString address,
_data.insert("password", toJson(password));
if (!token.isEmpty())
_data.insert("token", toJson(token));
- if (!device_id.isEmpty())
- _data.insert("device_id", toJson(device_id));
- if (!initial_device_display_name.isEmpty())
- _data.insert("initial_device_display_name", toJson(initial_device_display_name));
+ if (!deviceId.isEmpty())
+ _data.insert("device_id", toJson(deviceId));
+ if (!initialDeviceDisplayName.isEmpty())
+ _data.insert("initial_device_display_name", toJson(initialDeviceDisplayName));
setRequestData(_data);
}
@@ -52,37 +52,37 @@ LoginJob::~LoginJob()
delete d;
}
-const QString& LoginJob::user_id() const
+const QString& LoginJob::userId() const
{
- return d->user_id;
+ return d->userId;
}
-const QString& LoginJob::access_token() const
+const QString& LoginJob::accessToken() const
{
- return d->access_token;
+ return d->accessToken;
}
-const QString& LoginJob::home_server() const
+const QString& LoginJob::homeServer() const
{
- return d->home_server;
+ return d->homeServer;
}
-const QString& LoginJob::device_id() const
+const QString& LoginJob::deviceId() const
{
- return d->device_id;
+ return d->deviceId;
}
BaseJob::Status LoginJob::parseJson(const QJsonDocument& data)
{
auto json = data.object();
- d->user_id = fromJson<QString>(json.value("user_id"));
+ d->userId = fromJson<QString>(json.value("user_id"));
- d->access_token = fromJson<QString>(json.value("access_token"));
+ d->accessToken = fromJson<QString>(json.value("access_token"));
- d->home_server = fromJson<QString>(json.value("home_server"));
+ d->homeServer = fromJson<QString>(json.value("home_server"));
- d->device_id = fromJson<QString>(json.value("device_id"));
+ d->deviceId = fromJson<QString>(json.value("device_id"));
return Success;
}