Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7893328
inbound-group-session.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
inbound-group-session.hpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2021 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
<libkazv-config.hpp>
#include
<memory>
#include
<maybe.hpp>
#include
<event.hpp>
#include
"crypto-util.hpp"
namespace
Kazv
{
struct
InboundGroupSessionPrivate
;
class
InboundGroupSession
{
public
:
explicit
InboundGroupSession
();
explicit
InboundGroupSession
(
std
::
string
sessionKey
,
std
::
string
ed25519Key
);
InboundGroupSession
(
const
InboundGroupSession
&
that
);
InboundGroupSession
(
InboundGroupSession
&&
that
);
InboundGroupSession
&
operator
=
(
const
InboundGroupSession
&
that
);
InboundGroupSession
&
operator
=
(
InboundGroupSession
&&
that
);
~
InboundGroupSession
();
MaybeString
decrypt
(
std
::
string
message
,
std
::
string
eventId
,
Timestamp
originServerTs
);
bool
valid
()
const
;
std
::
string
ed25519Key
()
const
;
/**
* Try to merge this session with another session.
*
* @param that The other session to merge with.
* @return true iff the two sessions are mergeable.
*/
bool
merge
(
InboundGroupSession
&
that
);
private
:
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
InboundGroupSession
&
s
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
InboundGroupSession
&
s
);
std
::
unique_ptr
<
InboundGroupSessionPrivate
>
m_d
;
};
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Oct 2, 4:55 AM (12 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
487355
Default Alt Text
inbound-group-session.hpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment