libkazv
encryption.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 
10 #include "client-model.hpp"
11 
12 #include "csapi/keys.hpp"
13 
14 namespace Kazv
15 {
16  ClientResult updateClient(ClientModel m, UploadIdentityKeysAction a);
17  ClientResult updateClient(ClientModel m, GenerateAndUploadOneTimeKeysAction a);
19 
20  ClientModel tryDecryptEvents(ClientModel m);
21 
22  std::optional<BaseJob> clientPerform(ClientModel m, QueryKeysAction a);
23  ClientResult updateClient(ClientModel m, QueryKeysAction a);
25 
26  ClientResult updateClient(ClientModel m, ClaimKeysAction a);
28 
29  ClientResult updateClient(ClientModel m, EncryptMegOlmEventAction a);
30 
31  ClientResult updateClient(ClientModel m, SetDeviceTrustLevelAction a);
32 
33  ClientResult updateClient(ClientModel m, SetTrustLevelNeededToSendKeysAction a);
34 
35  ClientResult updateClient(ClientModel m, PrepareForSharingRoomKeyAction a);
36 }
ClaimKeysJob::JobResponse ClaimKeysResponse
Definition: keys.hpp:374
QueryKeysJob::JobResponse QueryKeysResponse
Definition: keys.hpp:238
UploadKeysJob::JobResponse UploadKeysResponse
Definition: keys.hpp:97
Definition: location.hpp:10
std::optional< BaseJob > clientPerform(ClientModel m, QueryKeysAction a)
Definition: encryption.cpp:419
ClientModel tryDecryptEvents(ClientModel m)
Definition: encryption.cpp:315
ClientResult updateClient(ClientModel m, SetAccountDataPerRoomAction a)
Definition: account-data.cpp:15
std::pair< ClientModel, ClientEffect > ClientResult
Definition: clientfwd.hpp:149
ClientResult processResponse(ClientModel m, SetAccountDataPerRoomResponse r)
Definition: account-data.cpp:23