/* ----------------------------------------------------------------------------
 * 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 WrappedServiceStub extends RRObject {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

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

  protected static long getCPtr(WrappedServiceStub 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_WrappedServiceStub(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public MessageElement propertyGet(String PropertyName) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_propertyGet(swigCPtr, this, PropertyName);
    return (cPtr == 0) ? null : new MessageElement(cPtr, true);
  }

  public void propertySet(String PropertyName, MessageElement value) {
    RobotRaconteurJavaJNI.WrappedServiceStub_propertySet(swigCPtr, this, PropertyName, MessageElement.getCPtr(value), value);
  }

  public MessageElement functionCall(String FunctionName, vectorptr_messageelement args) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_functionCall(swigCPtr, this, FunctionName, vectorptr_messageelement.getCPtr(args), args);
    return (cPtr == 0) ? null : new MessageElement(cPtr, true);
  }

  public WrappedGeneratorClient generatorFunctionCall(String FunctionName, vectorptr_messageelement args) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_generatorFunctionCall(swigCPtr, this, FunctionName, vectorptr_messageelement.getCPtr(args), args);
    return (cPtr == 0) ? null : new WrappedGeneratorClient(cPtr, true);
  }

  public void async_PropertyGet(String PropertyName, int timeout, AsyncRequestDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_PropertyGet(swigCPtr, this, PropertyName, timeout, AsyncRequestDirector.getCPtr(handler), handler, id);
  }

  public void async_PropertySet(String PropertyName, MessageElement value, int timeout, AsyncRequestDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_PropertySet(swigCPtr, this, PropertyName, MessageElement.getCPtr(value), value, timeout, AsyncRequestDirector.getCPtr(handler), handler, id);
  }

  public void async_FunctionCall(String FunctionName, vectorptr_messageelement args, int timeout, AsyncRequestDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_FunctionCall(swigCPtr, this, FunctionName, vectorptr_messageelement.getCPtr(args), args, timeout, AsyncRequestDirector.getCPtr(handler), handler, id);
  }

  public void async_GeneratorFunctionCall(String FunctionName, vectorptr_messageelement args, int timeout, AsyncGeneratorClientReturnDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_GeneratorFunctionCall(swigCPtr, this, FunctionName, vectorptr_messageelement.getCPtr(args), args, timeout, AsyncGeneratorClientReturnDirector.getCPtr(handler), handler, id);
  }

  public void async_FindObjRef(String path, int timeout, AsyncStubReturnDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_FindObjRef__SWIG_0(swigCPtr, this, path, timeout, AsyncStubReturnDirector.getCPtr(handler), handler, id);
  }

  public void async_FindObjRef(String path, String ind, int timeout, AsyncStubReturnDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_FindObjRef__SWIG_1(swigCPtr, this, path, ind, timeout, AsyncStubReturnDirector.getCPtr(handler), handler, id);
  }

  public void async_FindObjRefTyped(String path, String type, int timeout, AsyncStubReturnDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_FindObjRefTyped__SWIG_0(swigCPtr, this, path, type, timeout, AsyncStubReturnDirector.getCPtr(handler), handler, id);
  }

  public void async_FindObjRefTyped(String path, String ind, String type, int timeout, AsyncStubReturnDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceStub_async_FindObjRefTyped__SWIG_1(swigCPtr, this, path, ind, type, timeout, AsyncStubReturnDirector.getCPtr(handler), handler, id);
  }

  public WrappedPipeClient getPipe(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getPipe(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new WrappedPipeClient(cPtr, true);
  }

  public WrappedWireClient getWire(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getWire(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new WrappedWireClient(cPtr, true);
  }

  public int getObjectHeapID() {
    return RobotRaconteurJavaJNI.WrappedServiceStub_getObjectHeapID(swigCPtr, this);
  }

  public WrappedServiceStub findObjRef(String n) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_findObjRef__SWIG_0(swigCPtr, this, n);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public WrappedServiceStub findObjRef(String n, String i) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_findObjRef__SWIG_1(swigCPtr, this, n, i);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public WrappedServiceStub findObjRefTyped(String n, String objecttype) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_findObjRefTyped__SWIG_0(swigCPtr, this, n, objecttype);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public WrappedServiceStub findObjRefTyped(String n, String i, String objecttype) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_findObjRefTyped__SWIG_1(swigCPtr, this, n, i, objecttype);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public ArrayMemoryBase getArrayMemory(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getArrayMemory(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new ArrayMemoryBase(cPtr, true);
  }

  public MultiDimArrayMemoryBase getMultiDimArrayMemory(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getMultiDimArrayMemory(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new MultiDimArrayMemoryBase(cPtr, true);
  }

  public WrappedPodArrayMemoryClient getPodArrayMemory(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getPodArrayMemory(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new WrappedPodArrayMemoryClient(cPtr, true);
  }

  public WrappedPodMultiDimArrayMemoryClient getPodMultiDimArrayMemory(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getPodMultiDimArrayMemory(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new WrappedPodMultiDimArrayMemoryClient(cPtr, true);
  }

  public WrappedNamedArrayMemoryClient getNamedArrayMemory(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getNamedArrayMemory(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new WrappedNamedArrayMemoryClient(cPtr, true);
  }

  public WrappedNamedMultiDimArrayMemoryClient getNamedMultiDimArrayMemory(String membername) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getNamedMultiDimArrayMemory(swigCPtr, this, membername);
    return (cPtr == 0) ? null : new WrappedNamedMultiDimArrayMemoryClient(cPtr, true);
  }

  public void rRClose() {
    RobotRaconteurJavaJNI.WrappedServiceStub_rRClose(swigCPtr, this);
  }

  public void setRR_objecttype(ServiceEntryDefinition value) {
    RobotRaconteurJavaJNI.WrappedServiceStub_RR_objecttype_set(swigCPtr, this, ServiceEntryDefinition.getCPtr(value), value);
  }

  public ServiceEntryDefinition getRR_objecttype() {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_RR_objecttype_get(swigCPtr, this);
    return (cPtr == 0) ? null : new ServiceEntryDefinition(cPtr, true);
  }

  public boolean setRRDirector(WrappedServiceStubDirector director, int id) {
    return RobotRaconteurJavaJNI.WrappedServiceStub_setRRDirector(swigCPtr, this, WrappedServiceStubDirector.getCPtr(director), director, id);
  }

  public WrappedDirectorLock getRRDirectorLock() {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_getRRDirectorLock(swigCPtr, this);
    return (cPtr == 0) ? null : new WrappedDirectorLock(cPtr, true);
  }

  public RobotRaconteurNode rRGetNode() {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceStub_rRGetNode(swigCPtr, this);
    return (cPtr == 0) ? null : new RobotRaconteurNode(cPtr, true);
  }

}
