All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.frostwire.jlibtorrent.swig.session Maven / Gradle / Ivy

There is a newer version: 1.2.0.18
Show newest version
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.frostwire.jlibtorrent.swig;

public class session extends session_handle {
  private transient long swigCPtr;

  protected session(long cPtr, boolean cMemoryOwn) {
    super(libtorrent_jni.session_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        libtorrent_jni.delete_session(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public session(settings_pack pack, int flags) {
    this(libtorrent_jni.new_session__SWIG_0(settings_pack.getCPtr(pack), pack, flags), true);
  }

  public session(settings_pack pack) {
    this(libtorrent_jni.new_session__SWIG_1(settings_pack.getCPtr(pack), pack), true);
  }

  public session() {
    this(libtorrent_jni.new_session__SWIG_2(), true);
  }

  public session_proxy abort() {
    return new session_proxy(libtorrent_jni.session_abort(swigCPtr, this), true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy