#ifndef TRANSMISSION_H #define TRANSMISSION_H /* @percentage_finished is a value between 0 and 100 [0.0, 100.0] */ typedef void (*TorrentListCallback)(int id, float percentage_finished, const char *name, void *userdata); /* Returns 0 if the daemon is running, otherwise returns an error value */ int transmission_is_daemon_running(); int transmission_start_daemon(const char *download_dir); int transmission_add_torrent(const char *url); int transmission_get_all_torrents(TorrentListCallback callback, void *userdata); int transmission_get_last_added_torrent(int *id, float *percentage_finished, char *title); #endif