AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
RoomManager.cs
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
11 namespace HoloToolkit.Sharing {
12 
13 public class RoomManager : global::System.IDisposable {
14  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15  protected bool swigCMemOwn;
16 
17  internal RoomManager(global::System.IntPtr cPtr, bool cMemoryOwn) {
18  swigCMemOwn = cMemoryOwn;
19  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20  }
21 
22  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RoomManager obj) {
23  return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24  }
25 
26  ~RoomManager() {
27  Dispose();
28  }
29 
30  public virtual void Dispose() {
31  lock(this) {
32  if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
36  }
37  swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38  }
39  global::System.GC.SuppressFinalize(this);
40  }
41  }
42 
43  public virtual void AddListener(RoomManagerListener newListener) {
45  }
46 
47  public virtual void RemoveListener(RoomManagerListener oldListener) {
49  }
50 
51  public virtual int GetRoomCount() {
53  return ret;
54  }
55 
56  public virtual Room GetRoom(int index) {
57  global::System.IntPtr cPtr = SharingClientPINVOKE.RoomManager_GetRoom(swigCPtr, index);
58  Room ret = (cPtr == global::System.IntPtr.Zero) ? null : new Room(cPtr, true);
59  return ret;
60  }
61 
62  public virtual Room GetCurrentRoom() {
63  global::System.IntPtr cPtr = SharingClientPINVOKE.RoomManager_GetCurrentRoom(swigCPtr);
64  Room ret = (cPtr == global::System.IntPtr.Zero) ? null : new Room(cPtr, true);
65  return ret;
66  }
67 
68  public virtual Room CreateRoom(XString roomName, long roomID, bool keepOpenWhenEmpty) {
69  global::System.IntPtr cPtr = SharingClientPINVOKE.RoomManager_CreateRoom(swigCPtr, XString.getCPtr(roomName), roomID, keepOpenWhenEmpty);
70  Room ret = (cPtr == global::System.IntPtr.Zero) ? null : new Room(cPtr, true);
71  return ret;
72  }
73 
74  public virtual bool JoinRoom(Room room) {
75  bool ret = SharingClientPINVOKE.RoomManager_JoinRoom(swigCPtr, Room.getCPtr(room));
76  return ret;
77  }
78 
79  public virtual bool LeaveRoom() {
80  bool ret = SharingClientPINVOKE.RoomManager_LeaveRoom(swigCPtr);
81  return ret;
82  }
83 
84  public virtual bool DownloadAnchor(Room room, XString anchorName) {
85  bool ret = SharingClientPINVOKE.RoomManager_DownloadAnchor(swigCPtr, Room.getCPtr(room), XString.getCPtr(anchorName));
86  return ret;
87  }
88 
89  public virtual bool UploadAnchor(Room room, XString anchorName, byte[] data, int dataSize) {
90  global::System.Runtime.InteropServices.GCHandle pinHandle_data = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try {
91  {
92  bool ret = SharingClientPINVOKE.RoomManager_UploadAnchor(swigCPtr, Room.getCPtr(room), XString.getCPtr(anchorName), (global::System.IntPtr)pinHandle_data.AddrOfPinnedObject(), dataSize);
93  return ret;
94  }
95  } finally { pinHandle_data.Free(); }
96  }
97 
98 }
99 
100 }
virtual Room CreateRoom(XString roomName, long roomID, bool keepOpenWhenEmpty)
Definition: RoomManager.cs:68
virtual bool UploadAnchor(Room room, XString anchorName, byte[] data, int dataSize)
Definition: RoomManager.cs:89
static global::System.IntPtr RoomManager_CreateRoom(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, long jarg3, [global::System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.I1)]bool jarg4)
static global::System.IntPtr RoomManager_GetRoom(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
virtual void AddListener(RoomManagerListener newListener)
Definition: RoomManager.cs:43
static int RoomManager_GetRoomCount(global::System.Runtime.InteropServices.HandleRef jarg1)
static void RoomManager_RemoveListener(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void delete_RoomManager(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RoomManager_LeaveRoom(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool RoomManager_JoinRoom(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static void RoomManager_AddListener(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static bool RoomManager_UploadAnchor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.IntPtr jarg4, int jarg5)
virtual bool JoinRoom(Room room)
Definition: RoomManager.cs:74
virtual bool DownloadAnchor(Room room, XString anchorName)
Definition: RoomManager.cs:84
virtual Room GetRoom(int index)
Definition: RoomManager.cs:56
static bool RoomManager_DownloadAnchor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr RoomManager_GetCurrentRoom(global::System.Runtime.InteropServices.HandleRef jarg1)
virtual void RemoveListener(RoomManagerListener oldListener)
Definition: RoomManager.cs:47