parameter_registry.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include <cstddef>
  3. #include <cstdint>
  4. namespace sunrise::middleware::gameplay::group {
  5. /** Registry index of every group-session parameter. The names are the binary's own strings. */
  6. enum class Parameter : std::uint8_t {
  7. worldControllerGoalData = 0,
  8. activeJoinControls = 1,
  9. atomicCascadeJoinData = 2,
  10. activityHost = 3,
  11. jipGate = 4,
  12. activitySelection = 5,
  13. activitySelectionResponses = 6,
  14. currentActivity = 7,
  15. previousActivity = 8,
  16. userJoinControls = 9,
  17. desiredJoinControls = 10,
  18. language = 11,
  19. requestedRemoteJoinData = 12,
  20. remoteJoinData = 13,
  21. remoteJoinResult = 14,
  22. hostSelected = 15,
  23. matchmakingMessaging = 16,
  24. matchmakingAbortRequested = 17,
  25. sessionDisbandReason = 18,
  26. matchmakingProgress = 19,
  27. initialSliceSetStatus = 20,
  28. publicSessionReservations = 21,
  29. matchmakingData = 22,
  30. matchmakingPeerData = 23,
  31. networkQuality = 24,
  32. };
  33. /**
  34. * @param index Registry index, 0 through 24.
  35. * @return The registry's own name, or "unknown" outside the range.
  36. */
  37. [[nodiscard]] const char* parameter_name(std::uint8_t index) noexcept;
  38. /**
  39. * Names the parameters one mask selects, as a comma-separated list.
  40. * @param mask Parameter mask; only its low 25 bits are read.
  41. * @param output Destination buffer.
  42. * @param capacity Bytes available, including the terminator.
  43. * @return `output`, always terminated. An empty mask gives "none".
  44. */
  45. const char* parameter_names(std::uint64_t mask, char* output, std::size_t capacity) noexcept;
  46. } // namespace sunrise::middleware::gameplay::group