diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-08 23:24:51 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-08 23:24:51 +0900 |
commit | 6767cb8eccea7b74531f59f165a28afa0bec61f4 (patch) | |
tree | ea3ffe2fc07d3a9b7b48ee2ab37b0fe594f1af85 /lib/connection.h | |
parent | 4b1b308f28bdaef598a5dfc249d7af6a0346b367 (diff) | |
download | libquotient-6767cb8eccea7b74531f59f165a28afa0bec61f4.tar.gz libquotient-6767cb8eccea7b74531f59f165a28afa0bec61f4.zip |
csapi: Fix boolean query parameters incorrectly passed
Diffstat (limited to 'lib/connection.h')
-rw-r--r-- | lib/connection.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/connection.h b/lib/connection.h index 2c4c622d..5bf8e5ac 100644 --- a/lib/connection.h +++ b/lib/connection.h @@ -45,6 +45,8 @@ namespace QMatrixClient class UploadContentJob; class GetContentJob; class DownloadFileJob; + class SendToDeviceJob; + class Event; /** Enumeration with flags defining the network job running policy * So far only background/foreground flags are available. @@ -77,6 +79,10 @@ namespace QMatrixClient QT_VERSION >= QT_VERSION_CHECK(5, 5, 0), QVariantHash, QVariantMap>; + using UsersToDevicesToEvents = + std::unordered_map<QString, + std::unordered_map<QString, const Event&>>; + enum RoomVisibility { PublishRoom, UnpublishRoom }; // FIXME: Should go inside CreateRoomJob explicit Connection(QObject* parent = nullptr); @@ -234,7 +240,7 @@ namespace QMatrixClient /** Generates a new transaction id. Transaction id's are unique within * a single Connection object */ - Q_INVOKABLE QByteArray generateTxnId(); + Q_INVOKABLE QByteArray generateTxnId() const; template <typename T = Room> static void setRoomType() @@ -347,6 +353,9 @@ namespace QMatrixClient */ ForgetRoomJob* forgetRoom(const QString& id); + SendToDeviceJob* sendToDevices(const QString& eventType, + const UsersToDevicesToEvents& eventsMap) const; + // Old API that will be abolished any time soon. DO NOT USE. /** @deprecated Use callApi<PostMessageJob>() or Room::postMessage() instead */ |