A clone of btpd with my configuration changes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

btcli.h 1.3 KiB

18 vuotta sitten
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef BTCLI_H
  2. #define BTCLI_H
  3. #include <errno.h>
  4. #include <getopt.h>
  5. #include <inttypes.h>
  6. #include <limits.h>
  7. #include <math.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include <strings.h>
  12. #include <unistd.h>
  13. #include "btpd_if.h"
  14. #include "metainfo.h"
  15. #include "subr.h"
  16. #include "benc.h"
  17. #include "iobuf.h"
  18. #include "queue.h"
  19. extern const char *btpd_dir;
  20. extern struct ipc *ipc;
  21. __attribute__((noreturn))
  22. void diemsg(const char *fmt, ...);
  23. void btpd_connect(void);
  24. enum ipc_err handle_ipc_res(enum ipc_err err, const char *cmd,
  25. const char *target);
  26. char tstate_char(enum ipc_tstate ts);
  27. int torrent_spec(char *arg, struct ipc_torrent *tp);
  28. void print_rate(long long rate);
  29. void print_size(long long size);
  30. void print_ratio(long long part, long long whole);
  31. void print_percent(long long part, long long whole);
  32. void usage_add(void);
  33. void cmd_add(int argc, char **argv);
  34. void usage_del(void);
  35. void cmd_del(int argc, char **argv);
  36. void usage_list(void);
  37. void cmd_list(int argc, char **argv);
  38. void usage_stat(void);
  39. void cmd_stat(int argc, char **argv);
  40. void usage_kill(void);
  41. void cmd_kill(int argc, char **argv);
  42. void usage_rate(void);
  43. void cmd_rate(int argc, char **argv);
  44. void usage_start(void);
  45. void cmd_start(int argc, char **argv);
  46. void usage_stop(void);
  47. void cmd_stop(int argc, char **argv);
  48. #endif