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 <vodozemac.h>
13 
14 #include <immer/map.hpp>
15 
16 namespace Kazv
17 {
19  {
23  RandomData random,
27 
28  std::optional<rust::Box<vodozemac::megolm::GroupSession>> session;
29 
30  bool valid{false};
31 
33 
34  std::string initialSessionKey;
35 
36  std::string pickle() const;
37  bool unpickle(std::string pickleData);
38  bool unpickleFromLibolm(std::string pickleData);
39 
40  std::string sessionKey();
41  };
42 
43 }
Definition: location.hpp:10
std::string RandomData
Definition: crypto-util.hpp:34
std::int_fast64_t Timestamp
Definition: event.hpp:18
Definition: outbound-group-session-p.hpp:19
bool unpickleFromLibolm(std::string pickleData)
Definition: outbound-group-session.cpp:63
bool valid
Definition: outbound-group-session-p.hpp:30
std::optional< rust::Box< vodozemac::megolm::GroupSession > > session
Definition: outbound-group-session-p.hpp:28
std::string initialSessionKey
Definition: outbound-group-session-p.hpp:34
std::string sessionKey()
Definition: outbound-group-session.cpp:129
OutboundGroupSessionPrivate()
to be deprecated
Definition: outbound-group-session.cpp:17
std::string pickle() const
Definition: outbound-group-session.cpp:49
bool unpickle(std::string pickleData)
Definition: outbound-group-session.cpp:55
OutboundGroupSessionPrivate(RandomTag, RandomData random, Timestamp creationTime)
Timestamp creationTime
Definition: outbound-group-session-p.hpp:32
The tag to indicate that a constructor should use user-provided random data.
Definition: crypto-util.hpp:32