diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-07-13 01:41:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-13 01:41:52 +0200 |
commit | 63ff3eaf2bd2467255c08bf427a162f5c446b146 (patch) | |
tree | ef611855f95e26dd715e7f10bf8f83428a2c14e1 /transmission.h | |
parent | e4bae38e3a5d345c025ed9edddbf401c81756dd5 (diff) |
Add transmission methods
Diffstat (limited to 'transmission.h')
-rw-r--r-- | transmission.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/transmission.h b/transmission.h new file mode 100644 index 0000000..c37ca3a --- /dev/null +++ b/transmission.h @@ -0,0 +1,14 @@ +#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(); + +int transmission_add_torrent(const char *url); +int transmission_get_all_torrents(TorrentListCallback callback, void *userdata); + +#endif |