aboutsummaryrefslogtreecommitdiff
path: root/src/transmission.h
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-15 18:13:49 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-15 18:13:49 +0200
commit21208ecc1c6223cdfd2dbfeaff3bcfad8d0b8937 (patch)
tree67f151d022fdcd71bf2ddc5fff8046a4d3a8bfa1 /src/transmission.h
parent9946c0363648b44d396b07d8a1a4557c568edc88 (diff)
Add torrent complete notification
Diffstat (limited to 'src/transmission.h')
-rw-r--r--src/transmission.h11
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