-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
swig_dht_storage.java
94 lines (74 loc) · 5.39 KB
/
swig_dht_storage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/* ----------------------------------------------------------------------------
* 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 swig_dht_storage {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected swig_dht_storage(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(swig_dht_storage 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_swig_dht_storage(swigCPtr);
}
swigCPtr = 0;
}
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
libtorrent_jni.swig_dht_storage_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
libtorrent_jni.swig_dht_storage_change_ownership(this, swigCPtr, true);
}
public boolean get_peers(sha1_hash info_hash, boolean noseed, boolean scrape, entry peers) {
return (getClass() == swig_dht_storage.class) ? libtorrent_jni.swig_dht_storage_get_peers(swigCPtr, this, sha1_hash.getCPtr(info_hash), info_hash, noseed, scrape, entry.getCPtr(peers), peers) : libtorrent_jni.swig_dht_storage_get_peersSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(info_hash), info_hash, noseed, scrape, entry.getCPtr(peers), peers);
}
public void announce_peer(sha1_hash info_hash, tcp_endpoint endp, String name, boolean seed) {
if (getClass() == swig_dht_storage.class) libtorrent_jni.swig_dht_storage_announce_peer(swigCPtr, this, sha1_hash.getCPtr(info_hash), info_hash, tcp_endpoint.getCPtr(endp), endp, name, seed); else libtorrent_jni.swig_dht_storage_announce_peerSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(info_hash), info_hash, tcp_endpoint.getCPtr(endp), endp, name, seed);
}
public boolean get_immutable_item(sha1_hash target, entry item) {
return (getClass() == swig_dht_storage.class) ? libtorrent_jni.swig_dht_storage_get_immutable_item(swigCPtr, this, sha1_hash.getCPtr(target), target, entry.getCPtr(item), item) : libtorrent_jni.swig_dht_storage_get_immutable_itemSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(target), target, entry.getCPtr(item), item);
}
public void put_immutable_item(sha1_hash target, byte_vector buf, address addr) {
if (getClass() == swig_dht_storage.class) libtorrent_jni.swig_dht_storage_put_immutable_item(swigCPtr, this, sha1_hash.getCPtr(target), target, byte_vector.getCPtr(buf), buf, address.getCPtr(addr), addr); else libtorrent_jni.swig_dht_storage_put_immutable_itemSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(target), target, byte_vector.getCPtr(buf), buf, address.getCPtr(addr), addr);
}
public long get_mutable_item_seq_num(sha1_hash target) {
return (getClass() == swig_dht_storage.class) ? libtorrent_jni.swig_dht_storage_get_mutable_item_seq_num(swigCPtr, this, sha1_hash.getCPtr(target), target) : libtorrent_jni.swig_dht_storage_get_mutable_item_seq_numSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(target), target);
}
public boolean get_mutable_item(sha1_hash target, long seq, boolean force_fill, entry item) {
return (getClass() == swig_dht_storage.class) ? libtorrent_jni.swig_dht_storage_get_mutable_item(swigCPtr, this, sha1_hash.getCPtr(target), target, seq, force_fill, entry.getCPtr(item), item) : libtorrent_jni.swig_dht_storage_get_mutable_itemSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(target), target, seq, force_fill, entry.getCPtr(item), item);
}
public void put_mutable_item(sha1_hash target, byte_vector buf, byte_vector sig, long seq, byte_vector pk, byte_vector salt, address addr) {
if (getClass() == swig_dht_storage.class) libtorrent_jni.swig_dht_storage_put_mutable_item(swigCPtr, this, sha1_hash.getCPtr(target), target, byte_vector.getCPtr(buf), buf, byte_vector.getCPtr(sig), sig, seq, byte_vector.getCPtr(pk), pk, byte_vector.getCPtr(salt), salt, address.getCPtr(addr), addr); else libtorrent_jni.swig_dht_storage_put_mutable_itemSwigExplicitswig_dht_storage(swigCPtr, this, sha1_hash.getCPtr(target), target, byte_vector.getCPtr(buf), buf, byte_vector.getCPtr(sig), sig, seq, byte_vector.getCPtr(pk), pk, byte_vector.getCPtr(salt), salt, address.getCPtr(addr), addr);
}
public void tick() {
if (getClass() == swig_dht_storage.class) libtorrent_jni.swig_dht_storage_tick(swigCPtr, this); else libtorrent_jni.swig_dht_storage_tickSwigExplicitswig_dht_storage(swigCPtr, this);
}
public swig_dht_storage_counters swig_counters() {
return new swig_dht_storage_counters((getClass() == swig_dht_storage.class) ? libtorrent_jni.swig_dht_storage_swig_counters(swigCPtr, this) : libtorrent_jni.swig_dht_storage_swig_countersSwigExplicitswig_dht_storage(swigCPtr, this), true);
}
public swig_dht_storage() {
this(libtorrent_jni.new_swig_dht_storage(), true);
libtorrent_jni.swig_dht_storage_director_connect(this, swigCPtr, swigCMemOwn, true);
}
}