C wrapper for libtorrent (used by gtorrent).