79 , std::string _accessToken
81 std::optional<DeviceKeys> deviceKeys = std::nullopt,
JsonWrap oneTimeKeys = {},
JsonWrap fallbackKeys = {}
88 static BaseJob::Body buildBody(std::optional<DeviceKeys> deviceKeys, JsonWrap oneTimeKeys, JsonWrap fallbackKeys);
101 using namespace Kazv;
145 bool success()
const;
159 immer::map<std::string, JsonWrap> failures()
const;
167 immer::map<std::string, immer::map<std::string, DeviceInformation>> deviceKeys()
const;
176 immer::map<std::string, CrossSigningKey> masterKeys()
const;
183 immer::map<std::string, CrossSigningKey> selfSigningKeys()
const;
191 immer::map<std::string, CrossSigningKey> userSigningKeys()
const;
220 , std::string _accessToken
222 immer::map<std::string, immer::array<std::string>> deviceKeys , std::optional<int> timeout = std::nullopt, std::optional<std::string> token = std::nullopt
229 static BaseJob::Body buildBody(immer::map<std::string, immer::array<std::string>> deviceKeys, std::optional<int> timeout, std::optional<std::string> token);
242 using namespace Kazv;
249 if (! jo.is_object()) { jo = json::object(); }
259 if (jo.contains(
"device_display_name"s)) {
271 if (! jo.is_object()) { jo = json::object(); }
283 if (jo.contains(
"unsigned"s)) {
309 bool success()
const;
323 immer::map<std::string, JsonWrap> failures()
const;
334 immer::map<std::string, immer::map<std::string, JsonWrap>> oneTimeKeys()
const;
356 , std::string _accessToken
358 immer::map<std::string, immer::map<std::string, std::string>> oneTimeKeys , std::optional<int> timeout = std::nullopt
365 static BaseJob::Body buildBody(immer::map<std::string, immer::map<std::string, std::string>> oneTimeKeys, std::optional<int> timeout);
378 using namespace Kazv;
408 bool success()
const;
417 immer::array<std::string> changed()
const;
423 immer::array<std::string> left()
const;
450 , std::string _accessToken
452 std::string from , std::string to
457 std::string from, std::string to);
459 static BaseJob::Body buildBody(std::string from, std::string to);
472 using namespace Kazv;
Claim one-time encryption keys.
Definition: keys.hpp:299
static constexpr auto needsAuth()
Definition: keys.hpp:337
Query users with recent device key updates.
Definition: keys.hpp:398
static constexpr auto needsAuth()
Definition: keys.hpp:426
Download device identity keys.
Definition: keys.hpp:113
static constexpr auto needsAuth()
Definition: keys.hpp:194
JobResponse(Response r)
Definition: keys.cpp:77
bool success() const
Definition: keys.cpp:80
immer::map< std::string, int > oneTimeKeyCounts() const
For each key algorithm, the number of unclaimed one-time keys of that type currently held on the serv...
Definition: keys.cpp:91
Upload end-to-end encryption keys.
Definition: keys.hpp:17
static BaseJob::Body buildBody(std::optional< DeviceKeys > deviceKeys, JsonWrap oneTimeKeys, JsonWrap fallbackKeys)
Definition: keys.cpp:21
static constexpr auto needsAuth()
Definition: keys.hpp:41
UploadKeysJob withData(JsonWrap j) &&
Definition: keys.cpp:63
UploadKeysJob(std::string serverUrl, std::string _accessToken, std::optional< DeviceKeys > deviceKeys=std::nullopt, JsonWrap oneTimeKeys={}, JsonWrap fallbackKeys={})
Upload end-to-end encryption keys.
Definition: keys.cpp:43
static BaseJob::Query buildQuery()
Definition: keys.cpp:13
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
Definition: jsonwrap.hpp:23
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Device identity keys.
Definition: device_keys.hpp:13
Additional data added to the device key information by intermediate servers, and not covered by the s...
Definition: keys.hpp:121
std::optional< std::string > deviceDisplayName
The display name which the user set on the device.
Definition: keys.hpp:123
Definition: basejob.hpp:50
static void to_json(json &jo, const QueryKeysJob::UnsignedDeviceInfo &pod)
Definition: keys.hpp:247
static void from_json(const json &jo, QueryKeysJob::UnsignedDeviceInfo &result)
Definition: keys.hpp:256