diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-12-09 18:14:43 +0300 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-12-09 18:23:04 +0300 |
commit | 105ff3874baf0792616e1b330ce97f0b725adaf5 (patch) | |
tree | efb735f20b542c2fd4c342a500b603ebe64ba357 | |
parent | e829f867c14cb51e89e4d10550f2f41329c14ba8 (diff) | |
download | libquotient-105ff3874baf0792616e1b330ce97f0b725adaf5.tar.gz libquotient-105ff3874baf0792616e1b330ce97f0b725adaf5.zip |
Room: more doc-comments
-rw-r--r-- | lib/room.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 <typename EvT> 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 <typename EvT, typename... ArgTs> auto setState(ArgTs&&... args) const { |