]> wimlib.net Git - wimlib/blob - include/wimlib/write.h
Split wim_resource_spec from wim_lookup_table_entry
[wimlib] / include / wimlib / write.h
1 #ifndef _WIMLIB_WRITE_H
2 #define _WIMLIB_WRITE_H
3
4 #include "wimlib.h"
5 #include "wimlib/types.h"
6
7 /* Internal use only */
8 #define WIMLIB_WRITE_FLAG_NO_LOOKUP_TABLE               0x80000000
9 #define WIMLIB_WRITE_FLAG_CHECKPOINT_AFTER_XML          0x40000000
10 #define WIMLIB_WRITE_FLAG_REUSE_INTEGRITY_TABLE         0x20000000
11 #define WIMLIB_WRITE_FLAG_HEADER_AT_END                 0x10000000
12 #define WIMLIB_WRITE_FLAG_FILE_DESCRIPTOR               0x08000000
13 #define WIMLIB_WRITE_FLAG_USE_EXISTING_TOTALBYTES       0x04000000
14 #define WIMLIB_WRITE_FLAG_NO_METADATA                   0x02000000
15 #define WIMLIB_WRITE_FLAG_OVERWRITE                     0x01000000
16 #define WIMLIB_WRITE_MASK_PUBLIC                        0x00ffffff
17
18 #if defined(HAVE_SYS_FILE_H) && defined(HAVE_FLOCK)
19 extern int
20 lock_wim(WIMStruct *wim, int fd);
21 #else
22 static inline int
23 lock_wim(WIMStruct *wim, int fd)
24 {
25         return 0;
26 }
27 #endif
28
29 struct list_head;
30
31 int
32 write_wim_part(WIMStruct *wim,
33                const void *path_or_fd,
34                int image,
35                int write_flags,
36                unsigned num_threads,
37                wimlib_progress_func_t progress_func,
38                unsigned part_number,
39                unsigned total_parts,
40                struct list_head *stream_list_override,
41                const u8 *guid);
42
43 int
44 write_wim_resource_from_buffer(const void *buf, size_t buf_size,
45                                int reshdr_flags, struct filedes *out_fd,
46                                int out_ctype,
47                                u32 out_chunk_size,
48                                struct wim_reshdr *out_reshdr,
49                                u8 *hash_ret, int write_resource_flags,
50                                struct wimlib_lzx_context **comp_ctx);
51
52 #endif /* _WIMLIB_WRITE_H */