archive_multitape.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef ARCHIVE_MULTITAPE_H_
  2. #define ARCHIVE_MULTITAPE_H_
  3. #include <stdint.h>
  4. #include <time.h>
  5. #include "archive.h"
  6. /**
  7. * archive_read_open_multitape(a, machinenum, tapename):
  8. * Open the multitape tape ${tapename} for reading (and skipping) and
  9. * associate it with the archive ${a}. Return a cookie which can be passed
  10. * to the multitape layer.
  11. */
  12. void * archive_read_open_multitape(struct archive *, uint64_t, const char *);
  13. /**
  14. * archive_write_open_multitape(a, machinenum, cachedir, tapename, argc,
  15. * argv, printstats, dryrun, creationtime, csv_filename, storage_modified):
  16. * Open the multitape tape ${tapename} for writing and associate it with the
  17. * archive ${a}. If ${printstats} is non-zero, print archive statistics when
  18. * the tape is closed. If ${dryrun} is non-zero, perform a dry run.
  19. * Record ${creationtime} as the creation time in the archive metadata.
  20. * If ${csv_filename} is given, write statistics in CSV format. If the
  21. * data on the server has been modified, set ${*storage_modified} to 1.
  22. * Return a cookie which can be passed to the multitape layer.
  23. */
  24. void * archive_write_open_multitape(struct archive *, uint64_t, const char *,
  25. const char *, int, char **, int, int, time_t, const char *, int *);
  26. /**
  27. * archive_write_multitape_setmode(a, cookie, mode):
  28. * Set the tape mode to 0 (HEADER), 1 (DATA), or 2 (finished archive entry).
  29. */
  30. int archive_write_multitape_setmode(struct archive *, void *, int);
  31. /**
  32. * archive_write_multitape_checkpoint(cookie):
  33. * Create a checkpoint in the archive associated with the write cookie
  34. * ${cookie}.
  35. */
  36. int archive_write_multitape_checkpoint(void *);
  37. /**
  38. * archive_write_multitape_truncate(cookie):
  39. * Record that the archive associated with the write cookie ${cookie}
  40. * should be truncated at the current position.
  41. */
  42. void archive_write_multitape_truncate(void *);
  43. /**
  44. * archive_multitape_copy(ina, read_cookie, a, write_cookie):
  45. * Copy the data for an entry from one archive to another.
  46. */
  47. int archive_multitape_copy(struct archive *, void *, struct archive *,
  48. void *);
  49. #endif /* !ARCHIVE_MULTITAPE_H_ */