libkazv
Kazv::DeviceListTracker Struct Reference

#include <device-list-tracker.hpp>

Public Types

using DeviceMapT = immer::map< std::string, DeviceKeyInfo >
 

Public Member Functions

template<class RangeT >
void track (RangeT &&userIds)
 
template<class RangeT >
void untrack (RangeT &&userIds)
 
immer::flex_vector< std::string > outdatedUsers () const
 
bool addDevice (std::string userId, std::string deviceId, Api::QueryKeysJob::DeviceInformation deviceInfo, Crypto &crypto)
 
void markUpToDate (std::string userId)
 
DeviceMapT devicesFor (std::string userId) const
 
std::optional< DeviceKeyInfoget (std::string userId, std::string deviceId) const
 
std::optional< DeviceKeyInfofindByEd25519Key (std::string userId, std::string ed25519Key) const
 
std::optional< DeviceKeyInfofindByCurve25519Key (std::string userId, std::string curve25519Key) const
 
immer::flex_vector< std::string > diff (DeviceListTracker that) const
 returns a list of users whose device list has changed More...
 

Public Attributes

immer::map< std::string, bool > usersToTrackDeviceLists
 
immer::map< std::string, DeviceMapTdeviceLists
 

Member Typedef Documentation

◆ DeviceMapT

using Kazv::DeviceListTracker::DeviceMapT = immer::map<std::string , DeviceKeyInfo>

Member Function Documentation

◆ addDevice()

bool Kazv::DeviceListTracker::addDevice ( std::string  userId,
std::string  deviceId,
Api::QueryKeysJob::DeviceInformation  deviceInfo,
Crypto crypto 
)

◆ devicesFor()

auto Kazv::DeviceListTracker::devicesFor ( std::string  userId) const

◆ diff()

immer::flex_vector< std::string > Kazv::DeviceListTracker::diff ( DeviceListTracker  that) const

returns a list of users whose device list has changed

◆ findByCurve25519Key()

std::optional< DeviceKeyInfo > Kazv::DeviceListTracker::findByCurve25519Key ( std::string  userId,
std::string  curve25519Key 
) const

◆ findByEd25519Key()

std::optional< DeviceKeyInfo > Kazv::DeviceListTracker::findByEd25519Key ( std::string  userId,
std::string  ed25519Key 
) const

◆ get()

std::optional< DeviceKeyInfo > Kazv::DeviceListTracker::get ( std::string  userId,
std::string  deviceId 
) const

◆ markUpToDate()

void Kazv::DeviceListTracker::markUpToDate ( std::string  userId)

◆ outdatedUsers()

immer::flex_vector< std::string > Kazv::DeviceListTracker::outdatedUsers ( ) const

◆ track()

template<class RangeT >
void Kazv::DeviceListTracker::track ( RangeT &&  userIds)
inline

◆ untrack()

template<class RangeT >
void Kazv::DeviceListTracker::untrack ( RangeT &&  userIds)
inline

Member Data Documentation

◆ deviceLists

immer::map<std::string , DeviceMapT> Kazv::DeviceListTracker::deviceLists

◆ usersToTrackDeviceLists

immer::map<std::string , bool > Kazv::DeviceListTracker::usersToTrackDeviceLists

The documentation for this struct was generated from the following files: