-
-
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.
Creating jlibtorrent.js swig wrapper for better API.
- Loading branch information
Showing
2 changed files
with
72 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
var swig = require('./jlibtorrent.node'); | ||
|
||
// swig | ||
(function () { | ||
|
||
exports.swig = { | ||
swig: swig | ||
} | ||
|
||
}()); | ||
|
||
// LibTorrent | ||
(function () { | ||
|
||
function version() { | ||
return swig.LIBTORRENT_VERSION; | ||
} | ||
|
||
function revision() { | ||
return swig.LIBTORRENT_REVISION_SHA1; | ||
} | ||
|
||
function jrevision() { | ||
return swig.JLIBTORRENT_REVISION_SHA1; | ||
} | ||
|
||
function boostVersion() { | ||
return swig.boost_version(); | ||
} | ||
|
||
function boostLibVersion() { | ||
return swig.boost_lib_version(); | ||
} | ||
|
||
function fullVersion() { | ||
return version() + '-rev-' + revision() + '-jrev-' + jrevision() + '-boost-' + boostVersion(); | ||
} | ||
|
||
exports.LibTorrent = { | ||
version: version, | ||
revision: revision, | ||
jrevision: jrevision, | ||
boostVersion: boostVersion, | ||
boostLibVersion: boostLibVersion, | ||
fullVersion: fullVersion | ||
}; | ||
|
||
}()); |
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