opcode_routes.h 1.1 KB

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <cstdint>
  3. #include "../../middleware/web_service/web_service_envelope.h"
  4. namespace sunrise::server::web_service {
  5. /**
  6. * Finds reusable stateless layouts outside the special message codecs.
  7. * Every opcode gets one. An unlisted one takes the correlated echo.
  8. * @param opcode Request opcode from the Web Service envelope.
  9. * @param shape Gets the reusable response layout.
  10. */
  11. void resolve_response_shape(std::uint16_t opcode,
  12. middleware::web_service::ResponseShape& shape) noexcept;
  13. /**
  14. * Reports whether a reply's status value feeds the Client's Family-4 version wait.
  15. * Only these response definitions have it read as a revision barrier. The rest are given -1 by
  16. * the Client itself, so their value has no reader and keeps the descriptor's zero.
  17. * @param opcode Request opcode from the Web Service envelope.
  18. * @return True when the status value must name a revision or the no-publication constant.
  19. */
  20. [[nodiscard]] bool awaits_family4_version(std::uint16_t opcode) noexcept;
  21. } // namespace sunrise::server::web_service