From 86754d7d53b59ce52de51a32f865d4916c119bdb Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Wed, 13 Sep 2006 07:02:07 +0000 Subject: btpd now has a library of torrents indexed by number and info hash. The add and del commands adds or removes torrents from this library. The start and stop commands are used to active or deactivate torrents. Also, a mechanism for qeurying data on torrents has been added. It's only used by the btcli list and stat commands yet though. btcli has been split into different files for each command. Both btpd and btcli now use misc/btpd_if.h for all ipc definitions. Misc changes: - struct metainfo is gone. Use the new mi_* functions. - Add printf format type checking where appropriate. --- cli/btcli.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cli/btcli.h (limited to 'cli/btcli.h') diff --git a/cli/btcli.h b/cli/btcli.h new file mode 100644 index 0000000..5b64662 --- /dev/null +++ b/cli/btcli.h @@ -0,0 +1,44 @@ +#ifndef BTCLI_H +#define BTCLI_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "btpd_if.h" +#include "metainfo.h" +#include "subr.h" +#include "benc.h" +#include "iobuf.h" +#include "queue.h" + +extern const char *btpd_dir; +extern struct ipc *ipc; + +void btpd_connect(void); +enum ipc_err handle_ipc_res(enum ipc_err err, const char *target); + +char tstate_char(enum ipc_tstate ts); +int torrent_spec(char *arg, struct ipc_torrent *tp); + +void usage_add(void); +void cmd_add(int argc, char **argv); +void usage_del(void); +void cmd_del(int argc, char **argv); +void usage_list(void); +void cmd_list(int argc, char **argv); +void usage_stat(void); +void cmd_stat(int argc, char **argv); +void usage_kill(void); +void cmd_kill(int argc, char **argv); +void usage_start(void); +void cmd_start(int argc, char **argv); +void usage_stop(void); +void cmd_stop(int argc, char **argv); + +#endif -- cgit 1.4.1