//------------------------------------------------------------------------------
// <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 VisualPairConnector : PairMaker {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;

  internal VisualPairConnector(global::System.IntPtr cPtr, bool cMemoryOwn) : base(SharingClientPINVOKE.VisualPairConnector_SWIGUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

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

  ~VisualPairConnector() {
    Dispose();
  }

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

  public static VisualPairConnector Create() {
    global::System.IntPtr cPtr = SharingClientPINVOKE.VisualPairConnector_Create();
    VisualPairConnector ret = (cPtr == global::System.IntPtr.Zero) ? null : new VisualPairConnector(cPtr, true);
    return ret; 
  }

  public virtual bool ProcessImage(byte[] image, int width, int height, int bytesPerPixel) {
    global::System.Runtime.InteropServices.GCHandle pinHandle_image = global::System.Runtime.InteropServices.GCHandle.Alloc(image, global::System.Runtime.InteropServices.GCHandleType.Pinned); try {
    {
      bool ret = SharingClientPINVOKE.VisualPairConnector_ProcessImage(swigCPtr, (global::System.IntPtr)pinHandle_image.AddrOfPinnedObject(), width, height, bytesPerPixel);
      return ret;
    }
    } finally { pinHandle_image.Free(); }
  }

  public virtual bool IsProcessingImage() {
    bool ret = SharingClientPINVOKE.VisualPairConnector_IsProcessingImage(swigCPtr);
    return ret;
  }

}

}
