aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connection.h9
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
{