7 #include <Quotient/quotient_common.h>
13 Q_IMPLICIT EncryptionEventContent(Quotient::EncryptionType et);
14 explicit EncryptionEventContent(
const QJsonObject& json);
16 QJsonObject toJson()
const;
18 Quotient::EncryptionType encryption;
20 int rotationPeriodMs = 604'800'000;
21 int rotationPeriodMsgs = 100;
25 :
public KeylessStateEventBase<EncryptionEvent, EncryptionEventContent> {
27 QUO_EVENT(EncryptionEvent,
"m.room.encryption")
29 using KeylessStateEventBase::KeylessStateEventBase;
31 Quotient::EncryptionType encryption()
const {
return content().encryption; }
32 QString algorithm()
const {
return content().algorithm; }
33 int rotationPeriodMs()
const {
return content().rotationPeriodMs; }
34 int rotationPeriodMsgs()
const {
return content().rotationPeriodMsgs; }
36 bool useEncryption()
const {
return !algorithm().isEmpty(); }