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