-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More robust framework for posix file functions override.
- Loading branch information
Showing
12 changed files
with
353 additions
and
642 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
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
82 changes: 82 additions & 0 deletions
82
src/main/java/com/frostwire/jlibtorrent/swig/swig_posix_file_functions.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,82 @@ | ||
/* ---------------------------------------------------------------------------- | ||
* This file was automatically generated by SWIG (http://www.swig.org). | ||
* Version 3.0.7 | ||
* | ||
* 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_posix_file_functions { | ||
private transient long swigCPtr; | ||
protected transient boolean swigCMemOwn; | ||
|
||
protected swig_posix_file_functions(long cPtr, boolean cMemoryOwn) { | ||
swigCMemOwn = cMemoryOwn; | ||
swigCPtr = cPtr; | ||
} | ||
|
||
protected static long getCPtr(swig_posix_file_functions 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_posix_file_functions(swigCPtr); | ||
} | ||
swigCPtr = 0; | ||
} | ||
} | ||
|
||
protected void swigDirectorDisconnect() { | ||
swigCMemOwn = false; | ||
delete(); | ||
} | ||
|
||
public void swigReleaseOwnership() { | ||
swigCMemOwn = false; | ||
libtorrent_jni.swig_posix_file_functions_change_ownership(this, swigCPtr, false); | ||
} | ||
|
||
public void swigTakeOwnership() { | ||
swigCMemOwn = true; | ||
libtorrent_jni.swig_posix_file_functions_change_ownership(this, swigCPtr, true); | ||
} | ||
|
||
public int open(String pathname, int flags, int mode) { | ||
return (getClass() == swig_posix_file_functions.class) ? libtorrent_jni.swig_posix_file_functions_open(swigCPtr, this, pathname, flags, mode) : libtorrent_jni.swig_posix_file_functions_openSwigExplicitswig_posix_file_functions(swigCPtr, this, pathname, flags, mode); | ||
} | ||
|
||
public int mkdir(String pathname, int mode) { | ||
return (getClass() == swig_posix_file_functions.class) ? libtorrent_jni.swig_posix_file_functions_mkdir(swigCPtr, this, pathname, mode) : libtorrent_jni.swig_posix_file_functions_mkdirSwigExplicitswig_posix_file_functions(swigCPtr, this, pathname, mode); | ||
} | ||
|
||
public int rename(String oldpath, String newpath) { | ||
return (getClass() == swig_posix_file_functions.class) ? libtorrent_jni.swig_posix_file_functions_rename(swigCPtr, this, oldpath, newpath) : libtorrent_jni.swig_posix_file_functions_renameSwigExplicitswig_posix_file_functions(swigCPtr, this, oldpath, newpath); | ||
} | ||
|
||
public int remove(String pathname) { | ||
return (getClass() == swig_posix_file_functions.class) ? libtorrent_jni.swig_posix_file_functions_remove(swigCPtr, this, pathname) : libtorrent_jni.swig_posix_file_functions_removeSwigExplicitswig_posix_file_functions(swigCPtr, this, pathname); | ||
} | ||
|
||
public int lstat(String path, swig_posix_stat buf) { | ||
return (getClass() == swig_posix_file_functions.class) ? libtorrent_jni.swig_posix_file_functions_lstat(swigCPtr, this, path, swig_posix_stat.getCPtr(buf), buf) : libtorrent_jni.swig_posix_file_functions_lstatSwigExplicitswig_posix_file_functions(swigCPtr, this, path, swig_posix_stat.getCPtr(buf), buf); | ||
} | ||
|
||
public int stat(String path, swig_posix_stat buf) { | ||
return (getClass() == swig_posix_file_functions.class) ? libtorrent_jni.swig_posix_file_functions_stat(swigCPtr, this, path, swig_posix_stat.getCPtr(buf), buf) : libtorrent_jni.swig_posix_file_functions_statSwigExplicitswig_posix_file_functions(swigCPtr, this, path, swig_posix_stat.getCPtr(buf), buf); | ||
} | ||
|
||
public swig_posix_file_functions() { | ||
this(libtorrent_jni.new_swig_posix_file_functions(), true); | ||
libtorrent_jni.swig_posix_file_functions_director_connect(this, swigCPtr, swigCMemOwn, true); | ||
} | ||
|
||
} |
86 changes: 0 additions & 86 deletions
86
src/main/java/com/frostwire/jlibtorrent/swig/swig_posix_wrapper.java
This file was deleted.
Oops, something went wrong.
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.