diff options
Diffstat (limited to 'connection.h')
-rw-r--r-- | connection.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/connection.h b/connection.h index 0e25d695..1ce3e0de 100644 --- a/connection.h +++ b/connection.h @@ -69,6 +69,14 @@ namespace QMatrixClient Q_INVOKABLE QString token() const; Q_INVOKABLE QString accessToken() const; + template <typename JobT, typename... JobArgTs> + JobT* callApi(JobArgTs... jobArgs) + { + auto job = new JobT(connectionData(), jobArgs...); + job->start(); + return job; + } + signals: void resolved(); void connected(); |