A clone of btpd with my configuration changes.

39 lines
848 B

  1. #ifndef TRACKER_REQ_H
  2. #define TRACKER_REQ_H
  3. enum tr_event {
  4. TR_EV_STARTED,
  5. TR_EV_STOPPED,
  6. TR_EV_COMPLETED,
  7. TR_EV_EMPTY
  8. };
  9. extern long tr_key;
  10. enum tr_type { TR_HTTP };
  11. struct tr_response {
  12. enum {
  13. TR_RES_FAIL, TR_RES_CONN, TR_RES_BAD, TR_RES_OK
  14. } type;
  15. const char *mi_failure;
  16. int interval;
  17. };
  18. struct tr_tier;
  19. void tr_create(struct torrent *tp, const char *mi);
  20. void tr_kill(struct torrent *tp);
  21. void tr_start(struct torrent *tp);
  22. void tr_stop(struct torrent *tp);
  23. void tr_complete(struct torrent *tp);
  24. int tr_active(struct torrent *tp);
  25. void tr_result(struct tr_tier *t, struct tr_response *res);
  26. int tr_good_count(struct torrent *tp);
  27. struct httptr_req *httptr_req(struct torrent *tp, struct tr_tier *tr,
  28. const char *url, enum tr_event event);
  29. void httptr_cancel(struct httptr_req *req);
  30. #endif