Skip to content
Snippets Groups Projects
Verified Commit 387b940c authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Properly document some requests

parent a1b7b81c
No related branches found
No related tags found
No related merge requests found
Pipeline #3903 failed
...@@ -280,13 +280,18 @@ struct PublicRooms ...@@ -280,13 +280,18 @@ struct PublicRooms
friend void to_json(nlohmann::json &obj, const PublicRooms &request); friend void to_json(nlohmann::json &obj, const PublicRooms &request);
}; };
//! An empty response.
///
/// Some endpoints return this on success.
struct Empty struct Empty
{ {
friend inline void to_json(nlohmann::json &, const Empty &) {} friend inline void to_json(nlohmann::json &, const Empty &) {}
}; };
//! A successfull logout.
using Logout = Empty; using Logout = Empty;
//! A signed onetime key. Usually curve25519.
struct SignedOneTimeKey struct SignedOneTimeKey
{ {
//! Required. The unpadded Base64-encoded 32-byte Curve25519 public key. //! Required. The unpadded Base64-encoded 32-byte Curve25519 public key.
...@@ -301,6 +306,7 @@ struct SignedOneTimeKey ...@@ -301,6 +306,7 @@ struct SignedOneTimeKey
friend void to_json(nlohmann::json &obj, const SignedOneTimeKey &); friend void to_json(nlohmann::json &obj, const SignedOneTimeKey &);
}; };
//! Upload a mix of device, one time and fallback keys.
struct UploadKeys struct UploadKeys
{ {
//! Identity keys for the device. //! Identity keys for the device.
...@@ -328,8 +334,10 @@ struct UploadKeys ...@@ -328,8 +334,10 @@ struct UploadKeys
friend void to_json(nlohmann::json &obj, const UploadKeys &); friend void to_json(nlohmann::json &obj, const UploadKeys &);
}; };
//! The default timeout for a download.
constexpr uint64_t DEFAULT_DOWNLOAD_TIMEOUT = 10UL * 1000; // 10 seconds constexpr uint64_t DEFAULT_DOWNLOAD_TIMEOUT = 10UL * 1000; // 10 seconds
//! Query the keys of devices of specific users.
struct QueryKeys struct QueryKeys
{ {
//! The time (in milliseconds) to wait when downloading keys from remote servers. //! The time (in milliseconds) to wait when downloading keys from remote servers.
...@@ -348,6 +356,7 @@ struct QueryKeys ...@@ -348,6 +356,7 @@ struct QueryKeys
friend void to_json(nlohmann::json &obj, const QueryKeys &); friend void to_json(nlohmann::json &obj, const QueryKeys &);
}; };
//! Claim onetime keys of devices of specific users.
struct ClaimKeys struct ClaimKeys
{ {
//! The time (in milliseconds) to wait when downloading keys from remote servers. //! The time (in milliseconds) to wait when downloading keys from remote servers.
...@@ -358,6 +367,7 @@ struct ClaimKeys ...@@ -358,6 +367,7 @@ struct ClaimKeys
friend void to_json(nlohmann::json &obj, const ClaimKeys &request); friend void to_json(nlohmann::json &obj, const ClaimKeys &request);
}; };
//! Upload new signatures for a device or cross-signing key.
struct KeySignaturesUpload struct KeySignaturesUpload
{ {
//! map from user_id to either a map of device id to DeviceKey with new signatures or the //! map from user_id to either a map of device id to DeviceKey with new signatures or the
...@@ -385,6 +395,7 @@ struct DeviceSigningUpload ...@@ -385,6 +395,7 @@ struct DeviceSigningUpload
friend void to_json(nlohmann::json &obj, const DeviceSigningUpload &req); friend void to_json(nlohmann::json &obj, const DeviceSigningUpload &req);
}; };
//! Information about a pusher.
struct PusherData struct PusherData
{ {
//! Required if `kind` is http. The URL to use to send notifications to. //! Required if `kind` is http. The URL to use to send notifications to.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment