C wrapper for the gtorrent core