A clone of btpd with my configuration changes.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

45 lignes
945 B

  1. #ifndef BTPD_IF_H
  2. #define BTPD_IF_H
  3. #include <sys/types.h>
  4. #include <sys/socket.h>
  5. #include <sys/un.h>
  6. struct ipc;
  7. enum ipc_code {
  8. IPC_OK,
  9. IPC_FAIL,
  10. IPC_COMMERR
  11. };
  12. struct btstat {
  13. unsigned ntorrents;
  14. struct tpstat {
  15. char *name;
  16. unsigned num;
  17. char state;
  18. unsigned errors;
  19. unsigned npeers;
  20. uint32_t npieces, nseen;
  21. off_t have, total;
  22. long long downloaded, uploaded;
  23. unsigned long rate_up, rate_down;
  24. } torrents[];
  25. };
  26. int ipc_open(const char *dir, struct ipc **out);
  27. int ipc_close(struct ipc *ipc);
  28. enum ipc_code btpd_die(struct ipc *ipc, int seconds);
  29. enum ipc_code btpd_stat(struct ipc *ipc, struct btstat **out);
  30. enum ipc_code btpd_del_num(struct ipc *ipc, unsigned num);
  31. enum ipc_code btpd_start_num(struct ipc *ipc, unsigned num);
  32. enum ipc_code btpd_stop_num(struct ipc *ipc, unsigned num);
  33. void free_btstat(struct btstat *stat);
  34. #endif