Skip to content

Commit

Permalink
Removed deprecated api. Pending restore of features with the new one.
Browse files Browse the repository at this point in the history
  • Loading branch information
aldenml committed Feb 25, 2015
1 parent 6fbc80e commit cd4066e
Showing 1 changed file with 0 additions and 121 deletions.
121 changes: 0 additions & 121 deletions src/com/frostwire/jlibtorrent/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -397,62 +397,6 @@ public SessionStatus getStatus() {
return this.getStatus(false);
}

/**
* The session settings and the packet encryption settings
* respectively. See session_settings and pe_settings for more
* information on available options.
*
* @return
*/
public SessionSettings getSettings() {
return new SessionSettings(s.settings());
}

/**
* Sets the session settings and the packet encryption settings
* respectively. See session_settings and pe_settings for more
* information on available options.
*
* @param settings
*/
public void setSettings(SessionSettings settings) {
s.set_settings(settings.getSwig());
}

/**
* These functions sets and queries the proxy settings to be used for the
* session.
* <p/>
* For more information on what settings are available for proxies, see
* proxy_settings. If the session is not in anonymous mode, proxies that
* aren't working or fail, will automatically be disabled and packets
* will flow without using any proxy. If you want to enforce using a
* proxy, even when the proxy doesn't work, enable anonymous_mode in
* session_settings.
*
* @return
*/
public ProxySettings getProxy() {
return new ProxySettings(s.proxy());
}

/**
* These functions sets and queries the proxy settings to be used for the
* session.
* <p/>
* For more information on what settings are available for proxies, see
* proxy_settings. If the session is not in anonymous mode, proxies that
* aren't working or fail, will automatically be disabled and packets
* will flow without using any proxy. If you want to enforce using a
* proxy, even when the proxy doesn't work, enable anonymous_mode in
* session_settings.
*
* @param settings
*/
public void setProxy(ProxySettings settings) {
s.set_proxy(settings.getSwig());
}

/**
* Loads and saves all session settings, including dht_settings,
* encryption settings and proxy settings. ``save_state`` writes all keys
Expand Down Expand Up @@ -575,13 +519,6 @@ public List<TorrentHandle> getTorrents() {
// ``is_dht_running()`` returns true if the DHT support has been started
// and false
// otherwise.
public void startDHT() {
s.start_dht();
}

public void stopDHT() {
s.stop_dht();
}

void setDHTSettings(DHTSettings settings) {
s.set_dht_settings(settings.getSwig());
Expand Down Expand Up @@ -766,46 +703,6 @@ public void dhtAnnounce(Sha1Hash infoHash) {
s.dht_announce(infoHash.getSwig());
}

/**
* Starts and stops Local Service Discovery. This service will broadcast
* the infohashes of all the non-private torrents on the local network to
* look for peers on the same swarm within multicast reach.
* <p/>
* It is turned off by default.
*/
public void startLSD() {
s.start_lsd();
}

/**
* Starts and stops Local Service Discovery. This service will broadcast
* the infohashes of all the non-private torrents on the local network to
* look for peers on the same swarm within multicast reach.
* <p/>
* It is turned off by default.
*/
public void stopLSD() {
s.stop_lsd();
}

/**
* Starts the UPnP service. When started, the listen port and
* the DHT port are attempted to be forwarded on local UPnP router
* devices.
*/
public void startUPnP() {
s.start_upnp();
}

/**
* Stops the UPnP service. When started, the listen port and
* the DHT port are attempted to be forwarded on local UPnP router
* devices.
*/
public void stopUPnP() {
s.stop_upnp();
}

/**
* add_port_mapping adds a port forwarding on UPnP and/or NAT-PMP,
* whichever is enabled. The return value is a handle referring to the
Expand All @@ -825,24 +722,6 @@ public void deletePortMapping(int handle) {
s.delete_port_mapping(handle);
}

/**
* Starts the NAT-PMP service. When started, the listen port
* and the DHT port are attempted to be forwarded on the router through
* NAT-PMP.
*/
public void startNATPMP() {
s.start_natpmp();
}

/**
* Stops the NAT-PMP service. When started, the listen port
* and the DHT port are attempted to be forwarded on the router through
* NAT-PMP.
*/
public void stopNATPMP() {
s.stop_natpmp();
}

@Override
protected void finalize() throws Throwable {
this.running = false;
Expand Down

0 comments on commit cd4066e

Please sign in to comment.