blob: c15d42b872284132c9204996dd1d30b49fa5dccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef TRANSMISSION_H
#define TRANSMISSION_H
typedef struct TransmissionSession TransmissionSession;
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 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
|