Inkspring / app · inkspring.ai / native-mac / Sources / CArchive / shim.h
| 1 | #ifndef INKSPRING_CARCHIVE_H |
| 2 | #define INKSPRING_CARCHIVE_H |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | #include <sys/types.h> |
| 6 | |
| 7 | // The macOS SDK ships libarchive's linker stubs. Declare the public API subset |
| 8 | // used by the app so a separate Homebrew installation is unnecessary. |
| 9 | struct archive; |
| 10 | struct archive_entry; |
| 11 | struct archive *archive_read_new(void); |
| 12 | int archive_read_support_format_zip(struct archive *); |
| 13 | int archive_read_open_filename(struct archive *, const char *, size_t); |
| 14 | int archive_read_next_header(struct archive *, struct archive_entry **); |
| 15 | ssize_t archive_read_data(struct archive *, void *, size_t); |
| 16 | int archive_read_free(struct archive *); |
| 17 | struct archive *archive_write_new(void); |
| 18 | int archive_write_set_format_zip(struct archive *); |
| 19 | int archive_write_zip_set_compression_store(struct archive *); |
| 20 | int archive_write_open_fd(struct archive *, int); |
| 21 | int archive_write_header(struct archive *, struct archive_entry *); |
| 22 | ssize_t archive_write_data(struct archive *, const void *, size_t); |
| 23 | int archive_write_close(struct archive *); |
| 24 | int archive_write_free(struct archive *); |
| 25 | const char *archive_error_string(struct archive *); |
| 26 | struct archive_entry *archive_entry_new(void); |
| 27 | void archive_entry_free(struct archive_entry *); |
| 28 | const char *archive_entry_pathname(struct archive_entry *); |
| 29 | int64_t archive_entry_size(struct archive_entry *); |
| 30 | unsigned int archive_entry_filetype(struct archive_entry *); |
| 31 | int archive_entry_is_encrypted(struct archive_entry *); |
| 32 | const char *archive_entry_hardlink(struct archive_entry *); |
| 33 | void archive_entry_set_pathname(struct archive_entry *, const char *); |
| 34 | void archive_entry_set_size(struct archive_entry *, int64_t); |
| 35 | void archive_entry_set_filetype(struct archive_entry *, unsigned int); |
| 36 | void archive_entry_set_perm(struct archive_entry *, mode_t); |
| 37 | |
| 38 | #endif |