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.

33 lignes
652 B

  1. #ifndef BTPD_TLIB_H
  2. #define BTPD_TLIB_H
  3. struct tlib {
  4. unsigned num;
  5. uint8_t hash[20];
  6. struct torrent *tp;
  7. char *name;
  8. char *dir;
  9. unsigned long long tot_up, tot_down;
  10. off_t content_size, content_have;
  11. HTBL_ENTRY(nchain);
  12. HTBL_ENTRY(hchain);
  13. };
  14. void tlib_init(void);
  15. void tlib_put_all(struct tlib **v);
  16. struct tlib *tlib_add(const uint8_t *hash, const char *mi, size_t mi_size,
  17. const char *content, char *name);
  18. int tlib_del(struct tlib *tl);
  19. void tlib_update_info(struct tlib *tl);
  20. struct tlib *tlib_by_hash(const uint8_t *hash);
  21. struct tlib *tlib_by_num(unsigned num);
  22. unsigned tlib_count(void);
  23. #endif