| 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 UserAndRoom |
| 14 | { |
| 15 | // May be null. Check before using. |
| 16 | public readonly Room RoomOptional; |
| 17 | [Obsolete("Deprecated in favor of RoomOptional")] |
| 18 | public readonly Room Room; |
| 19 | public readonly User User; |
| 20 | |
| 21 | |
| 22 | public UserAndRoom(IntPtr o) |
| 23 | { |
| 24 | { |
| 25 | var pointer = CAPI.ovr_UserAndRoom_GetRoom(o); |
| 26 | Room = new Room(pointer); |
| 27 | if (pointer == IntPtr.Zero) { |
| 28 | RoomOptional = null; |
| 29 | } else { |
| 30 | RoomOptional = Room; |
| 31 | } |
| 32 | } |
| 33 | User = new User(CAPI.ovr_UserAndRoom_GetUser(o)); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | public class UserAndRoomList : DeserializableList<UserAndRoom> { |
| 38 | public UserAndRoomList(IntPtr a) { |
| 39 | var count = (int)CAPI.ovr_UserAndRoomArray_GetSize(a); |
| 40 | _Data = new List<UserAndRoom>(count); |
| 41 | for (int i = 0; i < count; i++) { |
| 42 | _Data.Add(new UserAndRoom(CAPI.ovr_UserAndRoomArray_GetElement(a, (UIntPtr)i))); |
| 43 | } |
| 44 | |
| 45 | _NextUrl = CAPI.ovr_UserAndRoomArray_GetNextUrl(a); |
| 46 | } |
| 47 | |
| 48 | } |
| 49 | } |