4 #include "wimlib/header.h"
5 #include "wimlib/types.h"
8 struct wim_lookup_table;
9 struct wim_image_metadata;
11 /* The opaque structure exposed to the wimlib API. */
14 /* File descriptor for the WIM file, opened for reading, or -1 if it has
15 * not been opened or there is no associated file backing it yet. */
18 /* File descriptor, opened either for writing only or for
19 * reading+writing, for the WIM file (if any) currently being written.
23 /* The name of the WIM file (if any) that has been opened. */
26 /* The lookup table for the WIM file. */
27 struct wim_lookup_table *lookup_table;
29 /* Information retrieved from the XML data, arranged in an orderly
31 struct wim_info *wim_info;
33 /* Array of the image metadata, one for each image in the WIM. */
34 struct wim_image_metadata **image_metadata;
36 /* The header of the WIM file. */
37 struct wim_header hdr;
42 /* The currently selected image, indexed starting at 1. If not 0,
43 * subtract 1 from this to get the index of the current image in the
44 * image_metadata array. */
47 /* Have any images been deleted? */
48 u8 deletion_occurred : 1;
50 /* Do we know that all the stream reference counts in the WIM are
51 * correct? If so, this is set to 1 and deletions are safe; otherwise
52 * this is set to 0 and deletions are not safe until reference counts
53 * are recalculated. (This is due to a bug in M$'s software that
54 * generates WIMs with invalid reference counts.) */
61 wim_recalculate_refcnts(WIMStruct *wim);
64 read_header(const tchar *filename, int in_fd, struct wim_header *hdr);
67 write_header(const struct wim_header *hdr, int out_fd);
70 init_header(struct wim_header *hdr, int ctype);
74 rename_wim_path(WIMStruct *wim, const tchar *from, const tchar *to);
77 select_wim_image(WIMStruct *w, int image);
80 for_image(WIMStruct *w, int image, int (*visitor)(WIMStruct *));
83 wim_checksum_unhashed_streams(WIMStruct *w);
86 reopen_wim(WIMStruct *w);
89 close_wim(WIMStruct *w);
92 can_modify_wim(WIMStruct *wim);
95 can_delete_from_wim(WIMStruct *wim);
97 #endif /* _WIMLIB_WIM_H */