/* ----------------------------------------------------------------------------
 * 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 WrappedServiceSubscription {
  private transient long swigCPtr;
  private transient boolean swigCMemOwn;

  protected WrappedServiceSubscription(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwn = own;
  }

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

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        RobotRaconteurJavaJNI.delete_WrappedServiceSubscription(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public map_subscriptionclients getConnectedClients() {
    return new map_subscriptionclients(RobotRaconteurJavaJNI.WrappedServiceSubscription_getConnectedClients(swigCPtr, this), true);
  }

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

  public void claimClient(WrappedServiceStub client) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_claimClient(swigCPtr, this, WrappedServiceStub.getCPtr(client), client);
  }

  public void releaseClient(WrappedServiceStub client) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_releaseClient(swigCPtr, this, WrappedServiceStub.getCPtr(client), client);
  }

  public long getConnectRetryDelay() {
    return RobotRaconteurJavaJNI.WrappedServiceSubscription_getConnectRetryDelay(swigCPtr, this);
  }

  public void setConnectRetryDelay(long delay_milliseconds) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_setConnectRetryDelay(swigCPtr, this, delay_milliseconds);
  }

  public WrappedWireSubscription subscribeWire(String membername, String servicepath) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_subscribeWire(swigCPtr, this, membername, servicepath);
    return (cPtr == 0) ? null : new WrappedWireSubscription(cPtr, true);
  }

  public WrappedPipeSubscription subscribePipe(String membername, String servicepath, int max_recv_packets) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_subscribePipe__SWIG_0(swigCPtr, this, membername, servicepath, max_recv_packets);
    return (cPtr == 0) ? null : new WrappedPipeSubscription(cPtr, true);
  }

  public WrappedPipeSubscription subscribePipe(String membername, String servicepath) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_subscribePipe__SWIG_1(swigCPtr, this, membername, servicepath);
    return (cPtr == 0) ? null : new WrappedPipeSubscription(cPtr, true);
  }

  public WrappedServiceStub getDefaultClient() {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_getDefaultClient(swigCPtr, this);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public WrappedServiceSubscription_TryDefaultClientRes tryGetDefaultClient() {
    return new WrappedServiceSubscription_TryDefaultClientRes(RobotRaconteurJavaJNI.WrappedServiceSubscription_tryGetDefaultClient(swigCPtr, this), true);
  }

  public WrappedServiceStub getDefaultClientWait(int timeout) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_getDefaultClientWait__SWIG_0(swigCPtr, this, timeout);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public WrappedServiceStub getDefaultClientWait() {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_getDefaultClientWait__SWIG_1(swigCPtr, this);
    return (cPtr == 0) ? null : new WrappedServiceStub(cPtr, true);
  }

  public WrappedServiceSubscription_TryDefaultClientRes tryGetDefaultClientWait(int timeout) {
    return new WrappedServiceSubscription_TryDefaultClientRes(RobotRaconteurJavaJNI.WrappedServiceSubscription_tryGetDefaultClientWait__SWIG_0(swigCPtr, this, timeout), true);
  }

  public WrappedServiceSubscription_TryDefaultClientRes tryGetDefaultClientWait() {
    return new WrappedServiceSubscription_TryDefaultClientRes(RobotRaconteurJavaJNI.WrappedServiceSubscription_tryGetDefaultClientWait__SWIG_1(swigCPtr, this), true);
  }

  public void asyncGetDefaultClient(int timeout, AsyncStubReturnDirector handler, int id) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_asyncGetDefaultClient(swigCPtr, this, timeout, AsyncStubReturnDirector.getCPtr(handler), handler, id);
  }

  public void setRRDirector(WrappedServiceSubscriptionDirector director, int id) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_setRRDirector(swigCPtr, this, WrappedServiceSubscriptionDirector.getCPtr(director), director, id);
  }

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

  public vectorstring getServiceURL() {
    return new vectorstring(RobotRaconteurJavaJNI.WrappedServiceSubscription_getServiceURL(swigCPtr, this), true);
  }

  public void updateServiceURL(vectorstring url, String username, MessageElementData credentials, String objecttype, boolean close_connected) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_0(swigCPtr, this, vectorstring.getCPtr(url), url, username, MessageElementData.getCPtr(credentials), credentials, objecttype, close_connected);
  }

  public void updateServiceURL(vectorstring url, String username, MessageElementData credentials, String objecttype) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_1(swigCPtr, this, vectorstring.getCPtr(url), url, username, MessageElementData.getCPtr(credentials), credentials, objecttype);
  }

  public void updateServiceURL(vectorstring url, String username, MessageElementData credentials) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_2(swigCPtr, this, vectorstring.getCPtr(url), url, username, MessageElementData.getCPtr(credentials), credentials);
  }

  public void updateServiceURL(vectorstring url, String username) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_3(swigCPtr, this, vectorstring.getCPtr(url), url, username);
  }

  public void updateServiceURL(vectorstring url) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_4(swigCPtr, this, vectorstring.getCPtr(url), url);
  }

  public void updateServiceURL(String url, String username, MessageElementData credentials, String objecttype, boolean close_connected) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_5(swigCPtr, this, url, username, MessageElementData.getCPtr(credentials), credentials, objecttype, close_connected);
  }

  public void updateServiceURL(String url, String username, MessageElementData credentials, String objecttype) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_6(swigCPtr, this, url, username, MessageElementData.getCPtr(credentials), credentials, objecttype);
  }

  public void updateServiceURL(String url, String username, MessageElementData credentials) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_7(swigCPtr, this, url, username, MessageElementData.getCPtr(credentials), credentials);
  }

  public void updateServiceURL(String url, String username) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_8(swigCPtr, this, url, username);
  }

  public void updateServiceURL(String url) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceURL__SWIG_9(swigCPtr, this, url);
  }

  public void updateServiceByType(vectorstring service_types, WrappedServiceSubscriptionFilter filter) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceByType__SWIG_0(swigCPtr, this, vectorstring.getCPtr(service_types), service_types, WrappedServiceSubscriptionFilter.getCPtr(filter), filter);
  }

  public void updateServiceByType(vectorstring service_types) {
    RobotRaconteurJavaJNI.WrappedServiceSubscription_updateServiceByType__SWIG_1(swigCPtr, this, vectorstring.getCPtr(service_types), service_types);
  }

  public WrappedSubObjectSubscription subscribeSubObject(String service_path, String objecttype) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_subscribeSubObject__SWIG_0(swigCPtr, this, service_path, objecttype);
    return (cPtr == 0) ? null : new WrappedSubObjectSubscription(cPtr, true);
  }

  public WrappedSubObjectSubscription subscribeSubObject(String service_path) {
    long cPtr = RobotRaconteurJavaJNI.WrappedServiceSubscription_subscribeSubObject__SWIG_1(swigCPtr, this, service_path);
    return (cPtr == 0) ? null : new WrappedSubObjectSubscription(cPtr, true);
  }

}
