diff options
Diffstat (limited to 'src/transmission.h')
-rw-r--r-- | src/transmission.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/transmission.h b/src/transmission.h index cbb6c7c..c15d42b 100644 --- a/src/transmission.h +++ b/src/transmission.h @@ -6,13 +6,20 @@ struct TransmissionSession { char session_header[128]; }; +typedef void (*TorrentListCallback)(int id, const char *name, double percentage_done, void *userdata); + int transmission_connect(TransmissionSession *session); /* 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); -/* The torrent name will be stored in @torrent_name, malloc'ed */ -int transmission_add_torrent(TransmissionSession *session, const char *url, char **torrent_name); +/* + The torrent id will be stored in @torrent_id, malloc'ed and + the torrent name will be stored in @torrent_name, malloc'ed. +*/ +int transmission_add_torrent(TransmissionSession *session, const char *url, int *torrent_id, char **torrent_name); + +int transmission_list_torrents(TransmissionSession *session, TorrentListCallback callback, void *userdata); #endif |