/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.2
*
* 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_entry {
private long swigCPtr;
protected boolean swigCMemOwn;
protected peer_entry(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(peer_entry 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_entry(swigCPtr);
}
swigCPtr = 0;
}
}
public void setIp(String value) {
libtorrent_jni.peer_entry_ip_set(swigCPtr, this, value);
}
public String getIp() {
return libtorrent_jni.peer_entry_ip_get(swigCPtr, this);
}
public void setPort(int value) {
libtorrent_jni.peer_entry_port_set(swigCPtr, this, value);
}
public int getPort() {
return libtorrent_jni.peer_entry_port_get(swigCPtr, this);
}
public void setPid(sha1_hash value) {
libtorrent_jni.peer_entry_pid_set(swigCPtr, this, sha1_hash.getCPtr(value), value);
}
public sha1_hash getPid() {
long cPtr = libtorrent_jni.peer_entry_pid_get(swigCPtr, this);
return (cPtr == 0) ? null : new sha1_hash(cPtr, false);
}
public boolean op_eq(peer_entry p) {
return libtorrent_jni.peer_entry_op_eq(swigCPtr, this, peer_entry.getCPtr(p), p);
}
public boolean op_lt(peer_entry p) {
return libtorrent_jni.peer_entry_op_lt(swigCPtr, this, peer_entry.getCPtr(p), p);
}
public peer_entry() {
this(libtorrent_jni.new_peer_entry(), true);
}
}