Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 additions
and
7 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/main/java/com/frostwire/jlibtorrent/plugins/DhtStorage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
package com.frostwire.jlibtorrent.plugins; | ||
|
||
import com.frostwire.jlibtorrent.Address; | ||
import com.frostwire.jlibtorrent.Entry; | ||
import com.frostwire.jlibtorrent.Sha1Hash; | ||
import com.frostwire.jlibtorrent.TcpEndpoint; | ||
import com.frostwire.jlibtorrent.swig.entry; | ||
|
||
/** | ||
* @author gubatron | ||
* @author aldenml | ||
*/ | ||
public interface DhtStorage { | ||
|
||
boolean getPeers(Sha1Hash infoHash, boolean noseed, boolean scrape, entry peers); | ||
|
||
void announcePeer(Sha1Hash infoHash, TcpEndpoint endp, String name, boolean seed); | ||
|
||
boolean getImmutableItem(Sha1Hash target, entry item); | ||
|
||
void putImmutableItem(Sha1Hash target, byte[] buf, Address addr); | ||
|
||
long getMutableItemSeq(Sha1Hash target); | ||
|
||
boolean getMutableItem(Sha1Hash target, long seq, boolean forceFill, entry item); | ||
|
||
void putMutableItem(Sha1Hash target, byte[] buf, byte[] sig, long seq, byte[] pk, byte[] salt, Address addr); | ||
|
||
void tick(); | ||
|
||
long numTorrents(); | ||
|
||
long numPeers(); | ||
|
||
long numImmutableData(); | ||
|
||
long numMutableData(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters