libkazv
outbound-group-session-p.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of libkazv.
3  * SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
4  * SPDX-License-Identifier: AGPL-3.0-or-later
5  */
6 
7 #pragma once
8 #include <libkazv-config.hpp>
9 
11 
12 #include <olm/olm.h>
13 
14 #include <immer/map.hpp>
15 
16 namespace Kazv
17 {
19  {
23  RandomData random,
26  ~OutboundGroupSessionPrivate() = default;
27 
29  OlmOutboundGroupSession *session;
30 
31  bool valid{false};
32 
34 
35  std::string initialSessionKey;
36 
37 
38  std::size_t checkError(std::size_t code) const;
39  std::string error() const;
40 
41  std::string pickle() const;
42  bool unpickle(std::string pickleData);
43 
44  std::string sessionKey();
45  };
46 
47 }
Kazv::OutboundGroupSessionPrivate::pickle
std::string pickle() const
Definition: outbound-group-session.cpp:72
Kazv::OutboundGroupSessionPrivate::sessionKey
std::string sessionKey()
Definition: outbound-group-session.cpp:160
Kazv::OutboundGroupSessionPrivate::valid
bool valid
Definition: outbound-group-session-p.hpp:31
Kazv::OutboundGroupSessionPrivate::checkError
std::size_t checkError(std::size_t code) const
Definition: outbound-group-session.cpp:17
Kazv::RandomData
std::string RandomData
Definition: crypto-util.hpp:35
Kazv::OutboundGroupSessionPrivate::OutboundGroupSessionPrivate
OutboundGroupSessionPrivate()
to be deprecated
Definition: outbound-group-session.cpp:32
Kazv::OutboundGroupSessionPrivate
Definition: outbound-group-session-p.hpp:18
Kazv
Definition: location.hpp:10
Kazv::Timestamp
std::int_fast64_t Timestamp
Definition: event.hpp:18
Kazv::OutboundGroupSessionPrivate::sessionData
ByteArray sessionData
Definition: outbound-group-session-p.hpp:28
outbound-group-session.hpp
Kazv::OutboundGroupSessionPrivate::creationTime
Timestamp creationTime
Definition: outbound-group-session-p.hpp:33
Kazv::OutboundGroupSessionPrivate::session
OlmOutboundGroupSession * session
Definition: outbound-group-session-p.hpp:29
Kazv::OutboundGroupSessionPrivate::error
std::string error() const
Definition: outbound-group-session.cpp:26
Kazv::ByteArray
std::vector< unsigned char > ByteArray
Definition: crypto-util.hpp:21
Kazv::OutboundGroupSessionPrivate::unpickle
bool unpickle(std::string pickleData)
Definition: outbound-group-session.cpp:82
Kazv::OutboundGroupSessionPrivate::initialSessionKey
std::string initialSessionKey
Definition: outbound-group-session-p.hpp:35
libkazv-config.hpp
Kazv::OutboundGroupSessionPrivate::~OutboundGroupSessionPrivate
~OutboundGroupSessionPrivate()=default
Kazv::RandomTag
The tag to indicate that a constructor should use user-provided random data.
Definition: crypto-util.hpp:33