libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
qolminboundsession.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021 Carl Schwan <carlschwan@kde.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#pragma once
6
7#include <Quotient/e2ee/e2ee_common.h>
8
9struct OlmInboundGroupSession;
10
11namespace Quotient {
12
13//! An in-bound group session is responsible for decrypting incoming
14//! communication in a Megolm session.
16{
17public:
18 //! Creates a new instance of `OlmInboundGroupSession`.
20 //! Import an inbound group session, from a previous export.
22 const QByteArray& key);
23 //! Serialises an `OlmInboundGroupSession` to encrypted Base64.
25 //! Deserialises from encrypted Base64 that was previously obtained by pickling
26 //! an `OlmInboundGroupSession`.
29 //! Decrypts ciphertext received for this group session.
31 //! Export the base64-encoded ratchet key for this session, at the given index,
32 //! in a format which can be used by import.
34 //! Get the first message index we know how to decrypt.
36 //! Get a base64-encoded identifier for this session.
38 bool isVerified() const;
39
40 //! The olm session that this session was received from.
41 //! Required to get the device this session is from.
44
45 //! The sender of this session.
48
50 const char* lastError() const;
51
52private:
58};
59
61} // namespace Quotient
#define QUOTIENT_API