A clone of btpd with my configuration changes.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

45 Zeilen
975 B

  1. #ifndef BTPD_IF_H
  2. #define BTPD_IF_H
  3. struct ipc;
  4. enum torrent_state { //XXX: Same as in btpd/torrent.h
  5. T_STARTING,
  6. T_ACTIVE,
  7. T_STOPPING
  8. };
  9. enum ipc_code {
  10. IPC_OK,
  11. IPC_FAIL,
  12. IPC_ERROR,
  13. IPC_COMMERR
  14. };
  15. struct btstat {
  16. unsigned ntorrents;
  17. struct tpstat {
  18. char *name;
  19. enum torrent_state state;
  20. unsigned errors;
  21. unsigned npeers;
  22. uint32_t npieces, nseen;
  23. off_t have, total;
  24. long long downloaded, uploaded;
  25. unsigned long rate_up, rate_down;
  26. } torrents[];
  27. };
  28. int ipc_open(const char *dir, struct ipc **out);
  29. int ipc_close(struct ipc *ipc);
  30. enum ipc_code btpd_add(struct ipc *ipc, const uint8_t *hash,
  31. const char *torrent, const char *content);
  32. enum ipc_code btpd_del(struct ipc *ipc, const uint8_t *hash);
  33. enum ipc_code btpd_die(struct ipc *ipc, int seconds);
  34. enum ipc_code btpd_stat(struct ipc *ipc, struct btstat **out);
  35. void free_btstat(struct btstat *stat);
  36. #endif