diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-03-09 13:13:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 13:13:48 +0900 |
commit | af8f95fa0446bf377321d9f285b0e55c08fd91da (patch) | |
tree | cdd07d0df71e2f7baa87d1be73fb4e3c3473d3eb /connection.h | |
parent | ba5ca3c88a20926f2be06872f530d9da12d5a062 (diff) | |
parent | 3524342faacd12b00fa4c3a3ebe6a68782975eac (diff) | |
download | libquotient-af8f95fa0446bf377321d9f285b0e55c08fd91da.tar.gz libquotient-af8f95fa0446bf377321d9f285b0e55c08fd91da.zip |
Merge pull request #54 from Fxrh/kitsune-call-server
Connection::callApi + Room::getPreviousMessages(limit)
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(); |