
com.frostwire.jlibtorrent.swig.peer_plugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jlibtorrent Show documentation
Show all versions of jlibtorrent Show documentation
A swig Java interface for libtorrent by the makers of FrostWire.
/* ----------------------------------------------------------------------------
* 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 peer_plugin {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected peer_plugin(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(peer_plugin 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_peer_plugin(swigCPtr);
}
swigCPtr = 0;
}
}
public String type() {
return libtorrent_jni.peer_plugin_type(swigCPtr, this);
}
public void add_handshake(entry arg0) {
libtorrent_jni.peer_plugin_add_handshake(swigCPtr, this, entry.getCPtr(arg0), arg0);
}
public void on_disconnect(error_code arg0) {
libtorrent_jni.peer_plugin_on_disconnect(swigCPtr, this, error_code.getCPtr(arg0), arg0);
}
public void on_connected() {
libtorrent_jni.peer_plugin_on_connected(swigCPtr, this);
}
public boolean on_handshake(String arg0) {
return libtorrent_jni.peer_plugin_on_handshake(swigCPtr, this, arg0);
}
public boolean on_extension_handshake(bdecode_node arg0) {
return libtorrent_jni.peer_plugin_on_extension_handshake(swigCPtr, this, bdecode_node.getCPtr(arg0), arg0);
}
public boolean on_choke() {
return libtorrent_jni.peer_plugin_on_choke(swigCPtr, this);
}
public boolean on_unchoke() {
return libtorrent_jni.peer_plugin_on_unchoke(swigCPtr, this);
}
public boolean on_interested() {
return libtorrent_jni.peer_plugin_on_interested(swigCPtr, this);
}
public boolean on_not_interested() {
return libtorrent_jni.peer_plugin_on_not_interested(swigCPtr, this);
}
public boolean on_have(int arg0) {
return libtorrent_jni.peer_plugin_on_have(swigCPtr, this, arg0);
}
public boolean on_dont_have(int arg0) {
return libtorrent_jni.peer_plugin_on_dont_have(swigCPtr, this, arg0);
}
public boolean on_bitfield(bitfield arg0) {
return libtorrent_jni.peer_plugin_on_bitfield(swigCPtr, this, bitfield.getCPtr(arg0), arg0);
}
public boolean on_have_all() {
return libtorrent_jni.peer_plugin_on_have_all(swigCPtr, this);
}
public boolean on_have_none() {
return libtorrent_jni.peer_plugin_on_have_none(swigCPtr, this);
}
public boolean on_allowed_fast(int arg0) {
return libtorrent_jni.peer_plugin_on_allowed_fast(swigCPtr, this, arg0);
}
public boolean on_request(peer_request arg0) {
return libtorrent_jni.peer_plugin_on_request(swigCPtr, this, peer_request.getCPtr(arg0), arg0);
}
public boolean on_piece(peer_request arg0, disk_buffer_holder arg1) {
return libtorrent_jni.peer_plugin_on_piece(swigCPtr, this, peer_request.getCPtr(arg0), arg0, disk_buffer_holder.getCPtr(arg1), arg1);
}
public boolean on_cancel(peer_request arg0) {
return libtorrent_jni.peer_plugin_on_cancel(swigCPtr, this, peer_request.getCPtr(arg0), arg0);
}
public boolean on_reject(peer_request arg0) {
return libtorrent_jni.peer_plugin_on_reject(swigCPtr, this, peer_request.getCPtr(arg0), arg0);
}
public boolean on_suggest(int arg0) {
return libtorrent_jni.peer_plugin_on_suggest(swigCPtr, this, arg0);
}
public void sent_unchoke() {
libtorrent_jni.peer_plugin_sent_unchoke(swigCPtr, this);
}
public void sent_payload(int arg0) {
libtorrent_jni.peer_plugin_sent_payload(swigCPtr, this, arg0);
}
public boolean can_disconnect(error_code arg0) {
return libtorrent_jni.peer_plugin_can_disconnect(swigCPtr, this, error_code.getCPtr(arg0), arg0);
}
public void on_piece_pass(int arg0) {
libtorrent_jni.peer_plugin_on_piece_pass(swigCPtr, this, arg0);
}
public void on_piece_failed(int arg0) {
libtorrent_jni.peer_plugin_on_piece_failed(swigCPtr, this, arg0);
}
public void tick() {
libtorrent_jni.peer_plugin_tick(swigCPtr, this);
}
public boolean write_request(peer_request arg0) {
return libtorrent_jni.peer_plugin_write_request(swigCPtr, this, peer_request.getCPtr(arg0), arg0);
}
public peer_plugin() {
this(libtorrent_jni.new_peer_plugin(), true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy