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

package com.robotraconteur;

public class HardwareTransport extends Transport {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected HardwareTransport(long cPtr, boolean cMemoryOwn) {
    super(RobotRaconteurJavaJNI.HardwareTransport_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(HardwareTransport obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwnDerived) {
        swigCMemOwnDerived = false;
        RobotRaconteurJavaJNI.delete_HardwareTransport(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

static {
	try
	{
	java.lang.Class cls=java.lang.Class.forName("com.robotraconteur.AndroidHardwareDirectorImpl");
	if (cls != null)
	{
	java.lang.reflect.Method m=cls.getMethod("init", cls);
	m.invoke(null,null);
	}
	}
	catch (Exception e) {}

}

  public HardwareTransport() {
    this(RobotRaconteurJavaJNI.new_HardwareTransport__SWIG_0(), true);
  }

  public HardwareTransport(RobotRaconteurNode node) {
    this(RobotRaconteurJavaJNI.new_HardwareTransport__SWIG_1(RobotRaconteurNode.getCPtr(node), node), true);
  }

  public String getUrlSchemeString() {
    return RobotRaconteurJavaJNI.HardwareTransport_getUrlSchemeString(swigCPtr, this);
  }

  public vectorstring getServerListenUrls() {
    return new vectorstring(RobotRaconteurJavaJNI.HardwareTransport_getServerListenUrls(swigCPtr, this), true);
  }

  public void close() {
    RobotRaconteurJavaJNI.HardwareTransport_close(swigCPtr, this);
  }

  public int getMaxMessageSize() {
    return RobotRaconteurJavaJNI.HardwareTransport_getMaxMessageSize(swigCPtr, this);
  }

  public void setMaxMessageSize(int size) {
    RobotRaconteurJavaJNI.HardwareTransport_setMaxMessageSize(swigCPtr, this, size);
  }

  public boolean getDisableMessage4() {
    return RobotRaconteurJavaJNI.HardwareTransport_getDisableMessage4(swigCPtr, this);
  }

  public void setDisableMessage4(boolean d) {
    RobotRaconteurJavaJNI.HardwareTransport_setDisableMessage4(swigCPtr, this, d);
  }

  public boolean getDisableStringTable() {
    return RobotRaconteurJavaJNI.HardwareTransport_getDisableStringTable(swigCPtr, this);
  }

  public void setDisableStringTable(boolean d) {
    RobotRaconteurJavaJNI.HardwareTransport_setDisableStringTable(swigCPtr, this, d);
  }

  public boolean getDisableAsyncMessageIO() {
    return RobotRaconteurJavaJNI.HardwareTransport_getDisableAsyncMessageIO(swigCPtr, this);
  }

  public void setDisableAsyncMessageIO(boolean d) {
    RobotRaconteurJavaJNI.HardwareTransport_setDisableAsyncMessageIO(swigCPtr, this, d);
  }

}
