//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 3.0.10
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------

namespace HoloToolkit.Sharing {

public class AnchorDownloadRequest : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal AnchorDownloadRequest(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AnchorDownloadRequest obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~AnchorDownloadRequest() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          SharingClientPINVOKE.delete_AnchorDownloadRequest(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
      global::System.GC.SuppressFinalize(this);
    }
  }

  public virtual XString GetAnchorName() {
    global::System.IntPtr cPtr = SharingClientPINVOKE.AnchorDownloadRequest_GetAnchorName(swigCPtr);
    XString ret = (cPtr == global::System.IntPtr.Zero) ? null : new XString(cPtr, true);
    return ret; 
  }

  public virtual Room GetRoom() {
    global::System.IntPtr cPtr = SharingClientPINVOKE.AnchorDownloadRequest_GetRoom(swigCPtr);
    Room ret = (cPtr == global::System.IntPtr.Zero) ? null : new Room(cPtr, true);
    return ret; 
  }

  public virtual int GetDataSize() {
    int ret = SharingClientPINVOKE.AnchorDownloadRequest_GetDataSize(swigCPtr);
    return ret;
  }

  public virtual bool GetData(byte[] data, int dataSize) {
    global::System.Runtime.InteropServices.GCHandle pinHandle_data = global::System.Runtime.InteropServices.GCHandle.Alloc(data, global::System.Runtime.InteropServices.GCHandleType.Pinned); try {
    {
      bool ret = SharingClientPINVOKE.AnchorDownloadRequest_GetData(swigCPtr, (global::System.IntPtr)pinHandle_data.AddrOfPinnedObject(), dataSize);
      return ret;
    }
    } finally { pinHandle_data.Free(); }
  }

}

}
