#include <client-model.hpp>
|
immer::flex_vector< std::string > | devicesToSendKeys (std::string userId) const |
|
void | maybeRotateSessions (ClientModel oldClient) |
| rotate sessions for a room if there is a user in the room with devicesToSendKeys changes More...
|
|
std::pair< Event, std::optional< std::string > > | megOlmEncrypt (Event e, std::string roomId, Timestamp timeMs, RandomData random) |
|
immer::map< std::string, immer::map< std::string, Event > > | olmEncryptSplit (Event e, immer::map< std::string, immer::flex_vector< std::string >> userIdToDeviceIdMap, RandomData random) |
| precondition: the one-time keys for those devices must already be claimed More...
|
|
std::size_t | numOneTimeKeysNeeded () const |
|
auto | directRoomMap () const -> immer::map< std::string, std::string > |
|
auto | roomIdsUnderTag (std::string tagId) const -> immer::map< std::string, double > |
|
auto | roomIdsByTagId () const -> immer::map< std::string, immer::map< std::string, double >> |
|
const Crypto & | constCrypto () const |
| Get the const reference of crypto of this client. More...
|
|
template<class Func > |
auto | withCrypto (Func &&func) -> std::decay_t< std::invoke_result_t< Func &&, Crypto & >> |
| Do func with crypto, returning its return value. More...
|
|
template<class Job > |
constexpr auto | job () const |
|
void | addJob (BaseJob j) |
|
auto | popAllJobs () |
|
void | addTrigger (KazvEvent t) |
|
void | addTriggers (immer::flex_vector< KazvEvent > c) |
|
auto | popAllTriggers () |
|
◆ Action
◆ Effect
◆ Result
◆ addJob()
void Kazv::ClientModel::addJob |
( |
BaseJob |
j | ) |
|
|
inline |
◆ addTrigger()
void Kazv::ClientModel::addTrigger |
( |
KazvEvent |
t | ) |
|
|
inline |
◆ addTriggers()
void Kazv::ClientModel::addTriggers |
( |
immer::flex_vector< KazvEvent > |
c | ) |
|
|
inline |
◆ constCrypto()
const Crypto & Kazv::ClientModel::constCrypto |
( |
| ) |
const |
Get the const reference of crypto of this client.
crypto.has_value()
must be true.
◆ devicesToSendKeys()
immer::flex_vector< std::string > Kazv::ClientModel::devicesToSendKeys |
( |
std::string |
userId | ) |
const |
◆ directRoomMap()
auto Kazv::ClientModel::directRoomMap |
( |
| ) |
const -> immer::map<std::string, std::string> |
- Returns
- the mapping from room id to user id of direct rooms
◆ job()
template<class Job >
constexpr auto Kazv::ClientModel::job |
( |
| ) |
const |
|
inlineconstexpr |
◆ maybeRotateSessions()
void Kazv::ClientModel::maybeRotateSessions |
( |
ClientModel |
oldClient | ) |
|
rotate sessions for a room if there is a user in the room with devicesToSendKeys changes
◆ megOlmEncrypt()
std::pair< Event, std::optional< std::string > > Kazv::ClientModel::megOlmEncrypt |
( |
Event |
e, |
|
|
std::string |
roomId, |
|
|
Timestamp |
timeMs, |
|
|
RandomData |
random |
|
) |
| |
◆ numOneTimeKeysNeeded()
std::size_t Kazv::ClientModel::numOneTimeKeysNeeded |
( |
| ) |
const |
- Returns
- number of one-time keys we need to generate
◆ olmEncryptSplit()
immer::map< std::string, immer::map< std::string, Event > > Kazv::ClientModel::olmEncryptSplit |
( |
Event |
e, |
|
|
immer::map< std::string, immer::flex_vector< std::string >> |
userIdToDeviceIdMap, |
|
|
RandomData |
random |
|
) |
| |
precondition: the one-time keys for those devices must already be claimed
- Returns
- A map from user id to device id to encrypted event for that device
◆ popAllJobs()
auto Kazv::ClientModel::popAllJobs |
( |
| ) |
|
|
inline |
◆ popAllTriggers()
auto Kazv::ClientModel::popAllTriggers |
( |
| ) |
|
|
inline |
◆ roomIdsByTagId()
auto Kazv::ClientModel::roomIdsByTagId |
( |
| ) |
const -> immer::map<std::string, immer::map<std::string, double>> |
◆ roomIdsUnderTag()
auto Kazv::ClientModel::roomIdsUnderTag |
( |
std::string |
tagId | ) |
const -> immer::map<std::string, double> |
◆ update()
◆ withCrypto()
template<class Func >
auto Kazv::ClientModel::withCrypto |
( |
Func && |
func | ) |
-> std::decay_t<std::invoke_result_t<Func &&, Crypto &>>
|
|
inline |
Do func with crypto, returning its return value.
crypto.has_value()
must be true.
◆ accountData
immer::map<std::string , Event> Kazv::ClientModel::accountData |
◆ crypto
std::optional<immer::box<Crypto> > Kazv::ClientModel::crypto |
◆ deviceId
std::string Kazv::ClientModel::deviceId |
◆ deviceLists
◆ firstRetryMs
int Kazv::ClientModel::firstRetryMs {1000} |
◆ identityKeysUploaded
bool Kazv::ClientModel::identityKeysUploaded {false} |
◆ incrementalSyncFilterId
std::string Kazv::ClientModel::incrementalSyncFilterId |
◆ initialSyncFilterId
std::string Kazv::ClientModel::initialSyncFilterId |
◆ loggedIn
bool Kazv::ClientModel::loggedIn {false} |
◆ maxRetryMs
int Kazv::ClientModel::maxRetryMs {30 * 1000} |
◆ nextJobs
immer::flex_vector<BaseJob> Kazv::ClientModel::nextJobs |
◆ nextTriggers
immer::flex_vector<KazvEvent> Kazv::ClientModel::nextTriggers |
◆ nextTxnId
std::string Kazv::ClientModel::nextTxnId {DEFTXNID} |
◆ presence
immer::map<std::string , Event> Kazv::ClientModel::presence |
◆ retryTimeFactor
int Kazv::ClientModel::retryTimeFactor {2} |
◆ roomList
◆ serverUrl
std::string Kazv::ClientModel::serverUrl |
◆ shouldSync
bool Kazv::ClientModel::shouldSync {true} |
◆ syncing
bool Kazv::ClientModel::syncing {false} |
◆ syncTimeoutMs
int Kazv::ClientModel::syncTimeoutMs {20000} |
◆ syncToken
std::optional<std::string> Kazv::ClientModel::syncToken |
◆ toDevice
◆ token
std::string Kazv::ClientModel::token |
◆ trustLevelNeededToSendKeys
DeviceTrustLevel Kazv::ClientModel::trustLevelNeededToSendKeys {DeviceTrustLevel::Unseen} |
◆ userId
std::string Kazv::ClientModel::userId |
The documentation for this struct was generated from the following files: