diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-19 10:26:41 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-19 10:55:09 +0900 |
commit | be258954da33ea3f96fa947569bf617caae68452 (patch) | |
tree | f8c6bb8d27565463ad9c59ce31c231cd7786ff0a | |
parent | cb3848c1e7fe09c2e778d38139c399b9f0484ce5 (diff) | |
download | libquotient-be258954da33ea3f96fa947569bf617caae68452.tar.gz libquotient-be258954da33ea3f96fa947569bf617caae68452.zip |
Connection: More deprecations; documented callApi<>()
-rw-r--r-- | connection.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/connection.h b/connection.h index 4b0413e3..08d216d1 100644 --- a/connection.h +++ b/connection.h @@ -65,13 +65,16 @@ namespace QMatrixClient /** @deprecated Use callApi<PostReceiptJob>() or Room::postReceipt() instead */ Q_INVOKABLE virtual PostReceiptJob* postReceipt(Room* room, RoomEvent* event) const; + /** @deprecated Use callApi<JoinRoomJob>() instead */ Q_INVOKABLE virtual JoinRoomJob* joinRoom(const QString& roomAlias); /** @deprecated Use callApi<LeaveRoomJob>() or Room::leaveRoom() instead */ Q_INVOKABLE virtual void leaveRoom( Room* room ); Q_INVOKABLE virtual RoomMessagesJob* getMessages(Room* room, const QString& from) const; + /** @deprecated Use callApi<MediaThumbnailJob>() instead */ virtual MediaThumbnailJob* getThumbnail(const QUrl& url, QSize requestedSize) const; + /** @deprecated Use callApi<MediaThumbnailJob>() instead */ MediaThumbnailJob* getThumbnail(const QUrl& url, int requestedWidth, int requestedHeight) const; @@ -85,6 +88,12 @@ namespace QMatrixClient Q_INVOKABLE SyncJob* syncJob() const; Q_INVOKABLE int millisToReconnect() const; + /** + * This is a universal method to start a job of a type passed + * as a template parameter. Arguments to callApi() are arguments + * to the job constructor _except_ the first ConnectionData* + * argument - callApi() will pass it automatically. + */ template <typename JobT, typename... JobArgTs> JobT* callApi(JobArgTs... jobArgs) const { |