10constexpr inline auto CiphertextKey =
"ciphertext"_L1;
11constexpr inline auto SenderKeyKey =
"sender_key"_L1;
12constexpr inline auto DeviceIdKey =
"device_id"_L1;
13constexpr inline auto SessionIdKey =
"session_id"_L1;
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
35 QUO_EVENT(EncryptedEvent,
"m.room.encrypted")
38
39
40 explicit EncryptedEvent(
const QJsonObject& ciphertexts,
41 const QString& senderKey);
43 explicit EncryptedEvent(
const QByteArray& ciphertext,
44 const QString& senderKey,
const QString& deviceId,
45 const QString& sessionId);
47 explicit EncryptedEvent(
const QJsonObject& obj);
49 QString algorithm()
const;
50 QByteArray ciphertext()
const
52 return contentPart<QString>(CiphertextKey).toLatin1();
54 QJsonObject ciphertext(
const QString& identityKey)
const
56 return contentPart<QJsonObject>(CiphertextKey)
60 QString senderKey()
const {
return contentPart<QString>(SenderKeyKey); }
63 QString deviceId()
const {
return contentPart<QString>(DeviceIdKey); }
64 QString sessionId()
const {
return contentPart<QString>(SessionIdKey); }
65 RoomEventPtr createDecrypted(
const QString &decrypted)
const;
67 void setRelation(
const QJsonObject& relation);
75 : Event(basicJson(TypeId, {}))
#define QUO_EVENT(CppType_, MatrixType_)
Supply event metatype information in (specific) event types.