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.

29 lignes
780 B

  1. #ifndef BTPD_STREAM_H
  2. #define BTPD_STREAM_H
  3. typedef int (*fdcb_t)(const char *, int *, void *);
  4. typedef void (*hashcb_t)(uint32_t, uint8_t *, void *);
  5. struct bt_stream {
  6. unsigned nfiles;
  7. struct mi_file *files;
  8. off_t totlen;
  9. fdcb_t fd_cb;
  10. void *fd_arg;
  11. unsigned index;
  12. off_t t_off;
  13. off_t f_off;
  14. int fd;
  15. };
  16. int bts_open(struct bt_stream **res, unsigned nfiles, struct mi_file *files,
  17. fdcb_t fd_cb, void *fd_arg);
  18. int bts_close(struct bt_stream *bts);
  19. int bts_get(struct bt_stream *bts, off_t off, uint8_t *buf, size_t len);
  20. int bts_put(struct bt_stream *bts, off_t off, const uint8_t *buf, size_t len);
  21. int bts_sha(struct bt_stream *bts, off_t start, off_t length, uint8_t *hash);
  22. const char *bts_filename(struct bt_stream *bts);
  23. #endif