LobbyDefines.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * LobbyDefines.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. struct LobbyAccount
  12. {
  13. std::string accountID;
  14. std::string displayName;
  15. };
  16. struct LobbyGameRoom
  17. {
  18. std::string roomID;
  19. std::string hostAccountID;
  20. std::string hostAccountDisplayName;
  21. std::string roomStatus;
  22. uint32_t playersCount;
  23. uint32_t playersLimit;
  24. };
  25. struct LobbyChatMessage
  26. {
  27. std::string accountID;
  28. std::string displayName;
  29. std::string messageText;
  30. std::chrono::seconds age;
  31. };
  32. enum class LobbyCookieStatus : int32_t
  33. {
  34. INVALID,
  35. VALID
  36. };
  37. enum class LobbyInviteStatus : int32_t
  38. {
  39. NOT_INVITED,
  40. INVITED,
  41. DECLINED
  42. };
  43. enum class LobbyRoomState : int32_t
  44. {
  45. IDLE = 0, // server is ready but no players are in the room
  46. PUBLIC = 1, // host has joined and allows anybody to join
  47. PRIVATE = 2, // host has joined but only allows those he invited to join
  48. //BUSY = 3, // match is ongoing
  49. //CANCELLED = 4, // game room was cancelled without starting the game
  50. CLOSED = 5, // game room was closed after playing for some time
  51. };