libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
qolmoutboundsession.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 OlmOutboundGroupSession;
10
11namespace Quotient {
12
13//! An out-bound group session is responsible for encrypting outgoing
14//! communication in a Megolm session.
16{
17public:
19
20 //! Serialises a `QOlmOutboundGroupSession` to encrypted Base64.
22 //! Deserialises from encrypted Base64 that was previously obtained by
23 //! pickling a `QOlmOutboundGroupSession`.
25
26 //! Encrypts a plaintext message using the session.
28
29 //! Get the current message index for this session.
30 //!
31 //! Each message is sent with an increasing index; this returns the
32 //! index for the next message.
34
35 //! Get a base64-encoded identifier for this session.
37
38 //! Get the base64-encoded current ratchet key for this session.
39 //!
40 //! Each message is sent with a different ratchet key. This function returns the
41 //! ratchet key that will be used for the next message.
43
44 int messageCount() const;
46
49
51 const char* lastError() const;
52
53private:
55 int m_messageCount = 0;
58};
59
60} // namespace Quotient
#define QUOTIENT_API