Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added swig_dht_storage_constructor type and related API
- Loading branch information
Showing
8 changed files
with
593 additions
and
76 deletions.
There are no files selected for viewing
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
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
63 changes: 63 additions & 0 deletions
63
src/main/java/com/frostwire/jlibtorrent/swig/swig_dht_storage_constructor.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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* 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_constructor { | ||
private transient long swigCPtr; | ||
protected transient boolean swigCMemOwn; | ||
|
||
protected swig_dht_storage_constructor(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(swig_dht_storage_constructor 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_constructor(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
protected void swigDirectorDisconnect() { | ||
swigCMemOwn = false; | ||
delete(); | ||
} | ||
|
||
public void swigReleaseOwnership() { | ||
swigCMemOwn = false; | ||
libtorrent_jni.swig_dht_storage_constructor_change_ownership(this, swigCPtr, false); | ||
} | ||
|
||
public void swigTakeOwnership() { | ||
swigCMemOwn = true; | ||
libtorrent_jni.swig_dht_storage_constructor_change_ownership(this, swigCPtr, true); | ||
} | ||
|
||
public swig_dht_storage create(sha1_hash id, dht_settings settings) { | ||
long cPtr = (getClass() == swig_dht_storage_constructor.class) ? libtorrent_jni.swig_dht_storage_constructor_create(swigCPtr, this, sha1_hash.getCPtr(id), id, dht_settings.getCPtr(settings), settings) : libtorrent_jni.swig_dht_storage_constructor_createSwigExplicitswig_dht_storage_constructor(swigCPtr, this, sha1_hash.getCPtr(id), id, dht_settings.getCPtr(settings), settings); | ||
return (cPtr == 0) ? null : new swig_dht_storage(cPtr, false); | ||
} | ||
|
||
public swig_dht_storage_constructor() { | ||
this(libtorrent_jni.new_swig_dht_storage_constructor(), true); | ||
libtorrent_jni.swig_dht_storage_constructor_director_connect(this, swigCPtr, swigCMemOwn, true); | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.