
com.frostwire.jlibtorrent.alerts.TorrentUpdateAlert 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.
package com.frostwire.jlibtorrent.alerts;
import com.frostwire.jlibtorrent.Sha1Hash;
import com.frostwire.jlibtorrent.swig.torrent_update_alert;
/**
* When a torrent changes its info-hash, this alert is posted. This only happens in very
* specific cases. For instance, when a torrent is downloaded from a URL, the true info
* hash is not known immediately. First the .torrent file must be downloaded and parsed.
*
* Once this download completes, the {@link com.frostwire.jlibtorrent.alerts.TorrentUpdateAlert} is
* posted to notify the client of the info-hash changing.
*
* @author gubatron
* @author aldenml
*/
public final class TorrentUpdateAlert extends TorrentAlert {
public TorrentUpdateAlert(torrent_update_alert alert) {
super(alert);
}
/**
* The previous info-hash for the torrent.
*
* @return
*/
public Sha1Hash getOldInfoHash() {
return new Sha1Hash(alert.getOld_ih());
}
/**
* The new info-hash for the torrent.
*
* @return
*/
public Sha1Hash getNewInfoHash() {
return new Sha1Hash(alert.getNew_ih());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy