aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/connection.cpp6
-rw-r--r--lib/connection.h12
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index ea74c1c4..a4980140 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -264,8 +264,8 @@ void Connection::sync(int timeout)
// Raw string: http://en.cppreference.com/w/cpp/language/string_literal
const QString filter { R"({"room": { "timeline": { "limit": 100 } } })" };
- auto job = d->syncJob =
- callApi<SyncJob>(InBackground, d->data->lastEvent(), filter, timeout);
+ auto job = d->syncJob = callApi<SyncJob>(BackgroundRequest,
+ d->data->lastEvent(), filter, timeout);
connect( job, &SyncJob::success, this, [this, job] {
onSyncSuccess(job->takeData());
d->syncJob = nullptr;
@@ -586,7 +586,7 @@ SendToDeviceJob* Connection::sendToDevices(const QString& eventType,
deviceToEvents.second.toJson());
});
});
- return callApi<SendToDeviceJob>(InBackground,
+ return callApi<SendToDeviceJob>(BackgroundRequest,
eventType, generateTxnId(), json);
}
diff --git a/lib/connection.h b/lib/connection.h
index 5bf8e5ac..2f1b0950 100644
--- a/lib/connection.h
+++ b/lib/connection.h
@@ -53,7 +53,7 @@ namespace QMatrixClient
*
* \sa Connection::callApi
*/
- enum RunningPolicy { InForeground = 0x0, InBackground = 0x1 };
+ enum RunningPolicy { ForegroundRequest = 0x0, BackgroundRequest = 0x1 };
class Connection: public QObject {
Q_OBJECT
@@ -222,7 +222,7 @@ namespace QMatrixClient
{
auto job = new JobT(std::forward<JobArgTs>(jobArgs)...);
connect(job, &BaseJob::failure, this, &Connection::requestFailed);
- job->start(connectionData(), runningPolicy&InBackground);
+ job->start(connectionData(), runningPolicy&BackgroundRequest);
return job;
}
@@ -233,7 +233,7 @@ namespace QMatrixClient
template <typename JobT, typename... JobArgTs>
JobT* callApi(JobArgTs&&... jobArgs) const
{
- return callApi<JobT>(InForeground,
+ return callApi<JobT>(ForegroundRequest,
std::forward<JobArgTs>(jobArgs)...);
}
@@ -278,12 +278,12 @@ namespace QMatrixClient
void stopSync();
virtual MediaThumbnailJob* getThumbnail(const QString& mediaId,
- QSize requestedSize, RunningPolicy policy = InBackground) const;
+ QSize requestedSize, RunningPolicy policy = BackgroundRequest) const;
MediaThumbnailJob* getThumbnail(const QUrl& url,
- QSize requestedSize, RunningPolicy policy = InBackground) const;
+ QSize requestedSize, RunningPolicy policy = BackgroundRequest) const;
MediaThumbnailJob* getThumbnail(const QUrl& url,
int requestedWidth, int requestedHeight,
- RunningPolicy policy = InBackground) const;
+ RunningPolicy policy = BackgroundRequest) const;
// QIODevice* should already be open
UploadContentJob* uploadContent(QIODevice* contentSource,