File: to_device.h

package info (click to toggle)
libquotient 0.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,588 kB
  • sloc: xml: 39,103; cpp: 25,226; sh: 97; makefile: 10
file content (31 lines) | stat: -rw-r--r-- 1,097 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN

#pragma once

#include <Quotient/jobs/basejob.h>

namespace Quotient {

//! \brief Send an event to a given set of devices.
//!
//! This endpoint is used to send send-to-device events to a set of
//! client devices.
class QUOTIENT_API SendToDeviceJob : public BaseJob {
public:
    //! \param eventType
    //!   The type of event to send.
    //!
    //! \param txnId
    //!   The [transaction ID](/client-server-api/#transaction-identifiers) for this event. Clients
    //!   should generate an ID unique across requests with the same access token; it will be used
    //!   by the server to ensure idempotency of requests.
    //!
    //! \param messages
    //!   The messages to send. A map from user ID, to a map from
    //!   device ID to message body. The device ID may also be `*`,
    //!   meaning all known devices for the user.
    explicit SendToDeviceJob(const QString& eventType, const QString& txnId,
                             const QHash<UserId, QHash<QString, QJsonObject>>& messages);
};

} // namespace Quotient