#include "wimlib/list.h"
struct wim_image_metadata;
-struct wim_info;
+struct wim_xml_info;
struct blob_table;
/*
/* Information from the XML data of the WIM file. This information is
* also maintained for a WIMStruct not backed by a file. */
- struct wim_info *wim_info;
+ struct wim_xml_info *xml_info;
/* The blob table for this WIMStruct. If this WIMStruct has a backing
* file, then this table will index the blobs contained in that file.
* referenced from other WIMStructs. */
struct blob_table *blob_table;
+ /* The number of references to this WIMStruct. This is equal to the
+ * number of resource descriptors that reference this WIMStruct, plus 1
+ * if wimlib_free() still needs to be called. */
+ ssize_t refcnt;
+
/*
* The 1-based index of the currently selected image in this WIMStruct,
* or WIMLIB_NO_IMAGE if no image is currently selected.
u8 decompressor_ctype;
u32 decompressor_max_block_size;
- /*
- * 'subwims' is the list of dependent WIMStructs (linked by
- * 'subwim_node') that have been opened by calls to
- * wimlib_reference_resource_files(). These WIMStructs must be retained
- * so that resources from them can be used. They are internal to the
- * library and are not visible to API users.
- */
- struct list_head subwims;
- struct list_head subwim_node;
-
/* Temporary field; use sparingly */
void *private;
/* 1 if the WIM file has been locked for appending, otherwise 0 */
u8 locked_for_append : 1;
+ /* 1 if the WIM file is currently being compacted by wimlib_overwrite()
+ * with WIMLIB_WRITE_FLAG_UNSAFE_COMPACT */
+ u8 being_compacted : 1;
+
/* If this WIM is backed by a file, then this is the compression type
* for non-solid resources in that file. */
u8 compression_type;
return (wim->hdr.magic == PWM_MAGIC);
}
+extern void
+wim_decrement_refcnt(WIMStruct *wim);
+
extern bool
wim_has_solid_resources(const WIMStruct *wim);