X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib%2Fwrite.h;h=190bf941cf30cd654ca2cbd66a9659c77d389296;hb=0230cefb4cee3580a705364232feb72258994237;hp=1722dab82e95f930b38e504f1e0c29e33e9664f9;hpb=00a775dc256d1fc8254d4f055e362e67f25b66d8;p=wimlib diff --git a/include/wimlib/write.h b/include/wimlib/write.h index 1722dab8..190bf941 100644 --- a/include/wimlib/write.h +++ b/include/wimlib/write.h @@ -5,20 +5,30 @@ #include "wimlib/types.h" /* Internal use only */ -#define WIMLIB_WRITE_FLAG_NO_LOOKUP_TABLE 0x80000000 -#define WIMLIB_WRITE_FLAG_REUSE_INTEGRITY_TABLE 0x40000000 -#define WIMLIB_WRITE_FLAG_CHECKPOINT_AFTER_XML 0x20000000 -#define WIMLIB_WRITE_MASK_PUBLIC 0x1fffffff +#define WIMLIB_WRITE_FLAG_NO_LOOKUP_TABLE 0x80000000 +#define WIMLIB_WRITE_FLAG_CHECKPOINT_AFTER_XML 0x40000000 +#define WIMLIB_WRITE_FLAG_REUSE_INTEGRITY_TABLE 0x20000000 +#define WIMLIB_WRITE_FLAG_HEADER_AT_END 0x10000000 +#define WIMLIB_WRITE_FLAG_FILE_DESCRIPTOR 0x08000000 +#define WIMLIB_WRITE_FLAG_USE_EXISTING_TOTALBYTES 0x04000000 +#define WIMLIB_WRITE_FLAG_NO_METADATA 0x02000000 +#define WIMLIB_WRITE_FLAG_OVERWRITE 0x01000000 -extern int -begin_write(WIMStruct *wim, const tchar *path, int write_flags); - -extern void -close_wim_writable(WIMStruct *wim); - -extern int -finish_write(WIMStruct *wim, int image, int write_flags, - wimlib_progress_func_t progress_func); +/* Keep in sync with wimlib.h */ +#define WIMLIB_WRITE_MASK_PUBLIC ( \ + WIMLIB_WRITE_FLAG_CHECK_INTEGRITY | \ + WIMLIB_WRITE_FLAG_NO_CHECK_INTEGRITY | \ + WIMLIB_WRITE_FLAG_PIPABLE | \ + WIMLIB_WRITE_FLAG_NOT_PIPABLE | \ + WIMLIB_WRITE_FLAG_RECOMPRESS | \ + WIMLIB_WRITE_FLAG_FSYNC | \ + WIMLIB_WRITE_FLAG_REBUILD | \ + WIMLIB_WRITE_FLAG_SOFT_DELETE | \ + WIMLIB_WRITE_FLAG_IGNORE_READONLY_FLAG | \ + WIMLIB_WRITE_FLAG_SKIP_EXTERNAL_WIMS | \ + WIMLIB_WRITE_FLAG_STREAMS_OK | \ + WIMLIB_WRITE_FLAG_RESERVED | \ + WIMLIB_WRITE_FLAG_PACK_STREAMS) #if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK) extern int @@ -31,4 +41,27 @@ lock_wim(WIMStruct *wim, int fd) } #endif +struct list_head; + +int +write_wim_part(WIMStruct *wim, + const void *path_or_fd, + int image, + int write_flags, + unsigned num_threads, + wimlib_progress_func_t progress_func, + unsigned part_number, + unsigned total_parts, + struct list_head *stream_list_override, + const u8 *guid); + +int +write_wim_resource_from_buffer(const void *buf, size_t buf_size, + int reshdr_flags, struct filedes *out_fd, + int out_ctype, + u32 out_chunk_size, + struct wim_reshdr *out_reshdr, + u8 *hash, + int write_resource_flags); + #endif /* _WIMLIB_WRITE_H */