Branchwell

Inkspring / app · inkspring.ai / native-mac / Sources / CArchive / shim.h

Raw 1.7 KB on 332c2458022ae8f6648ea05f3c733b528a595172
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.
9struct archive;
10struct archive_entry;
11struct archive *archive_read_new(void);
12int archive_read_support_format_zip(struct archive *);
13int archive_read_open_filename(struct archive *, const char *, size_t);
14int archive_read_next_header(struct archive *, struct archive_entry **);
15ssize_t archive_read_data(struct archive *, void *, size_t);
16int archive_read_free(struct archive *);
17struct archive *archive_write_new(void);
18int archive_write_set_format_zip(struct archive *);
19int archive_write_zip_set_compression_store(struct archive *);
20int archive_write_open_fd(struct archive *, int);
21int archive_write_header(struct archive *, struct archive_entry *);
22ssize_t archive_write_data(struct archive *, const void *, size_t);
23int archive_write_close(struct archive *);
24int archive_write_free(struct archive *);
25const char *archive_error_string(struct archive *);
26struct archive_entry *archive_entry_new(void);
27void archive_entry_free(struct archive_entry *);
28const char *archive_entry_pathname(struct archive_entry *);
29int64_t archive_entry_size(struct archive_entry *);
30unsigned int archive_entry_filetype(struct archive_entry *);
31int archive_entry_is_encrypted(struct archive_entry *);
32const char *archive_entry_hardlink(struct archive_entry *);
33void archive_entry_set_pathname(struct archive_entry *, const char *);
34void archive_entry_set_size(struct archive_entry *, int64_t);
35void archive_entry_set_filetype(struct archive_entry *, unsigned int);
36void archive_entry_set_perm(struct archive_entry *, mode_t);
37
38#endif