opcode701_codec.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <cstdint>
  3. #include "../../../../state/account/settings/settings_delta.h"
  4. #include "../../web_service_envelope.h"
  5. namespace sunrise::middleware::web_service::messages::opcode701 {
  6. /** Web Service opcode used by the Client's account-settings writeback. */
  7. inline constexpr std::uint16_t kOpcode = 701;
  8. /** Semantic result decoded from one schema-0x80807603 request. */
  9. struct Request {
  10. state::account::settings::SettingsDelta settings;
  11. };
  12. /**
  13. * Decodes the complete presence-driven opcode-701 request body.
  14. *
  15. * Unsupported schema branches are still traversed so every later field is read at its actual
  16. * wire position. Output is cleared on entry; decoded values replace it only after the entire
  17. * schema, optional outer blobs, and zero terminal padding validate.
  18. *
  19. * @param message Parsed Web Service envelope whose payload begins at schema bit zero.
  20. * @param output Receives supported fields, the authored binding source, and the atomic table.
  21. * @return True only when opcode and complete request encoding are valid.
  22. */
  23. [[nodiscard]] bool parse_request(const Message& message, Request& output) noexcept;
  24. } // namespace sunrise::middleware::web_service::messages::opcode701