libQuotient
A Qt library for building matrix clients
to_device.h
Go to the documentation of this file.
1 // THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2 
3 #pragma once
4 
5 #include <Quotient/jobs/basejob.h>
6 
7 namespace Quotient {
8 
9 //! \brief Send an event to a given set of devices.
10 //!
11 //! This endpoint is used to send send-to-device events to a set of
12 //! client devices.
13 class QUOTIENT_API SendToDeviceJob : public BaseJob {
14 public:
15  //! \param eventType
16  //! The type of event to send.
17  //!
18  //! \param txnId
19  //! The [transaction ID](/client-server-api/#transaction-identifiers) for this event. Clients
20  //! should generate an ID unique across requests with the same access token; it will be used
21  //! by the server to ensure idempotency of requests.
22  //!
23  //! \param messages
24  //! The messages to send. A map from user ID, to a map from
25  //! device ID to message body. The device ID may also be `*`,
26  //! meaning all known devices for the user.
27  explicit SendToDeviceJob(const QString& eventType, const QString& txnId,
28  const QHash<UserId, QHash<QString, QJsonObject>>& messages);
29 };
30 
31 } // namespace Quotient