Assignment for RMIT Mixed Reality in 2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.8 KiB

  1. // This file was @generated with LibOVRPlatform/codegen/main. Do not modify it!
  2. #pragma warning disable 0618
  3. namespace Oculus.Platform.Models
  4. {
  5. using System;
  6. using System.Collections;
  7. using Oculus.Platform.Models;
  8. using System.Collections.Generic;
  9. using UnityEngine;
  10. public class Room
  11. {
  12. public readonly UInt64 ApplicationID;
  13. public readonly Dictionary<string, string> DataStore;
  14. public readonly string Description;
  15. public readonly UInt64 ID;
  16. // May be null. Check before using.
  17. public readonly UserList InvitedUsersOptional;
  18. [Obsolete("Deprecated in favor of InvitedUsersOptional")]
  19. public readonly UserList InvitedUsers;
  20. public readonly bool IsMembershipLocked;
  21. public readonly RoomJoinPolicy JoinPolicy;
  22. public readonly RoomJoinability Joinability;
  23. // May be null. Check before using.
  24. public readonly MatchmakingEnqueuedUserList MatchedUsersOptional;
  25. [Obsolete("Deprecated in favor of MatchedUsersOptional")]
  26. public readonly MatchmakingEnqueuedUserList MatchedUsers;
  27. public readonly uint MaxUsers;
  28. public readonly string Name;
  29. // May be null. Check before using.
  30. public readonly User OwnerOptional;
  31. [Obsolete("Deprecated in favor of OwnerOptional")]
  32. public readonly User Owner;
  33. // May be null. Check before using.
  34. public readonly TeamList TeamsOptional;
  35. [Obsolete("Deprecated in favor of TeamsOptional")]
  36. public readonly TeamList Teams;
  37. public readonly RoomType Type;
  38. // May be null. Check before using.
  39. public readonly UserList UsersOptional;
  40. [Obsolete("Deprecated in favor of UsersOptional")]
  41. public readonly UserList Users;
  42. public readonly uint Version;
  43. public Room(IntPtr o)
  44. {
  45. ApplicationID = CAPI.ovr_Room_GetApplicationID(o);
  46. DataStore = CAPI.DataStoreFromNative(CAPI.ovr_Room_GetDataStore(o));
  47. Description = CAPI.ovr_Room_GetDescription(o);
  48. ID = CAPI.ovr_Room_GetID(o);
  49. {
  50. var pointer = CAPI.ovr_Room_GetInvitedUsers(o);
  51. InvitedUsers = new UserList(pointer);
  52. if (pointer == IntPtr.Zero) {
  53. InvitedUsersOptional = null;
  54. } else {
  55. InvitedUsersOptional = InvitedUsers;
  56. }
  57. }
  58. IsMembershipLocked = CAPI.ovr_Room_GetIsMembershipLocked(o);
  59. JoinPolicy = CAPI.ovr_Room_GetJoinPolicy(o);
  60. Joinability = CAPI.ovr_Room_GetJoinability(o);
  61. {
  62. var pointer = CAPI.ovr_Room_GetMatchedUsers(o);
  63. MatchedUsers = new MatchmakingEnqueuedUserList(pointer);
  64. if (pointer == IntPtr.Zero) {
  65. MatchedUsersOptional = null;
  66. } else {
  67. MatchedUsersOptional = MatchedUsers;
  68. }
  69. }
  70. MaxUsers = CAPI.ovr_Room_GetMaxUsers(o);
  71. Name = CAPI.ovr_Room_GetName(o);
  72. {
  73. var pointer = CAPI.ovr_Room_GetOwner(o);
  74. Owner = new User(pointer);
  75. if (pointer == IntPtr.Zero) {
  76. OwnerOptional = null;
  77. } else {
  78. OwnerOptional = Owner;
  79. }
  80. }
  81. {
  82. var pointer = CAPI.ovr_Room_GetTeams(o);
  83. Teams = new TeamList(pointer);
  84. if (pointer == IntPtr.Zero) {
  85. TeamsOptional = null;
  86. } else {
  87. TeamsOptional = Teams;
  88. }
  89. }
  90. Type = CAPI.ovr_Room_GetType(o);
  91. {
  92. var pointer = CAPI.ovr_Room_GetUsers(o);
  93. Users = new UserList(pointer);
  94. if (pointer == IntPtr.Zero) {
  95. UsersOptional = null;
  96. } else {
  97. UsersOptional = Users;
  98. }
  99. }
  100. Version = CAPI.ovr_Room_GetVersion(o);
  101. }
  102. }
  103. public class RoomList : DeserializableList<Room> {
  104. public RoomList(IntPtr a) {
  105. var count = (int)CAPI.ovr_RoomArray_GetSize(a);
  106. _Data = new List<Room>(count);
  107. for (int i = 0; i < count; i++) {
  108. _Data.Add(new Room(CAPI.ovr_RoomArray_GetElement(a, (UIntPtr)i)));
  109. }
  110. _NextUrl = CAPI.ovr_RoomArray_GetNextUrl(a);
  111. }
  112. }
  113. }