libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
encryptionevent.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2017 Kitsune Ral <kitsune-ral@users.sf.net>
2// SPDX-FileCopyrightText: 2019 Alexey Andreyev <aa13q@ya.ru>
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#pragma once
6
7#include <Quotient/quotient_common.h>
8#include "stateevent.h"
9
10namespace Quotient {
12public:
15
17
20 int rotationPeriodMs = 604'800'000;
22};
23
26public:
27 QUO_EVENT(EncryptionEvent, "m.room.encryption")
28
30
32 QString algorithm() const { return content().algorithm; }
33 int rotationPeriodMs() const { return content().rotationPeriodMs; }
35
36 bool useEncryption() const { return !algorithm().isEmpty(); }
37};
38} // namespace Quotient
#define QUO_EVENT(CppType_, MatrixType_)
Supply event metatype information in (specific) event types.
Definition event.h:436
#define QUOTIENT_API