From 105ff3874baf0792616e1b330ce97f0b725adaf5 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 9 Dec 2019 18:14:43 +0300 Subject: Room: more doc-comments --- lib/room.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/room.h b/lib/room.h index 7e419823..2c958033 100644 --- a/lib/room.h +++ b/lib/room.h @@ -442,6 +442,10 @@ public: Q_INVOKABLE const Quotient::StateEventBase* getCurrentState(const QString& evtType, const QString& stateKey = {}) const; + /// Get a state event with the given event type and state key + /*! This is a typesafe overload that accepts a C++ event type instead of + * its Matrix name. + */ template const EvT* getCurrentState(const QString& stateKey = {}) const { @@ -453,6 +457,14 @@ public: return evt; } + /// Set a state event of the given type with the given arguments + /*! This typesafe overload attempts to send a state event with the type + * \p EvT and the content defined by \p args. Specifically, the function + * creates a temporary object of type \p EvT passing \p args to + * the constructor, and sends a request to the homeserver using + * the Matrix event type defined by \p EvT and the event content produced + * via EvT::contentJson(). + */ template auto setState(ArgTs&&... args) const { -- cgit v1.2.3