-extern int write_integrity_table(FILE *out, u64 end_header_offset,
- u64 end_lookup_table_offset,
- int show_progress);
-extern int check_wim_integrity(WIMStruct *w, int show_progress, int *status);
-
-/* modify.c */
-extern void destroy_image_metadata(struct image_metadata *imd,
- struct lookup_table *lt);
-extern bool exclude_path(const char *path,
- const struct capture_config *config,
- bool exclude_prefix);
-extern int do_add_image(WIMStruct *w, const char *dir, const char *name,
- const char *config_str, size_t config_len,
- int flags,
- int (*capture_tree)(struct dentry **, const char *,
- struct lookup_table *,
- struct wim_security_data *,
- const struct capture_config *,
- int, void *),
- void *extra_arg);
+
+#define WIM_INTEGRITY_OK 0
+#define WIM_INTEGRITY_NOT_OK -1
+#define WIM_INTEGRITY_NONEXISTENT -2
+
+extern int
+write_integrity_table(FILE *out, struct resource_entry *integrity_res_entry,
+ off_t new_lookup_table_end,
+ off_t old_lookup_table_end,
+ wimlib_progress_func_t progress_func);
+
+extern int
+check_wim_integrity(WIMStruct *w, wimlib_progress_func_t progress_func);
+
+/* join.c */
+
+extern int
+new_joined_lookup_table(WIMStruct *w, WIMStruct **additional_swms,
+ unsigned num_additional_swms,
+ struct wim_lookup_table **table_ret);
+
+/* metadata_resource.c */
+
+extern int
+read_metadata_resource(WIMStruct *w,
+ struct wim_image_metadata *image_metadata);
+
+extern int
+write_metadata_resource(WIMStruct *w);
+
+/* ntfs-apply.c */
+
+struct apply_args {
+ WIMStruct *w;
+ const tchar *target;
+ tchar *target_realpath;
+ unsigned target_realpath_len;
+ int extract_flags;
+ union wimlib_progress_info progress;
+ wimlib_progress_func_t progress_func;
+ int (*apply_dentry)(struct wim_dentry *, void *);
+ union {
+ #ifdef WITH_NTFS_3G
+ struct {
+ /* NTFS apply only */
+ struct _ntfs_volume *vol;
+ };
+ #endif
+ #ifdef __WIN32__
+ struct {
+ /* Normal apply only (Win32) */
+ unsigned long num_set_sacl_priv_notheld;
+ unsigned long num_set_sd_access_denied;
+ unsigned vol_flags;
+ unsigned long num_hard_links_failed;
+ bool have_vol_flags;
+ };
+ #else
+ struct {
+ /* Normal apply only (UNIX) */
+ unsigned long num_utime_warnings;
+ };
+ #endif
+ };
+};
+
+extern int
+apply_dentry_ntfs(struct wim_dentry *dentry, void *arg);
+
+extern int
+apply_dentry_timestamps_ntfs(struct wim_dentry *dentry, void *arg);
+
+extern void
+libntfs3g_global_init();
+
+/* ntfs-capture.c */
+
+typedef int (*consume_data_callback_t)(const void *buf, size_t len, void *ctx);
+
+extern int
+read_ntfs_file_prefix(const struct wim_lookup_table_entry *lte,
+ u64 size,
+ consume_data_callback_t cb,
+ void *ctx_or_buf,
+ int _ignored_flags);
+extern int
+build_dentry_tree_ntfs(struct wim_dentry **root_p,
+ const tchar *device,
+ struct add_image_params *ctx);
+
+#ifdef WITH_NTFS_3G
+extern int
+do_ntfs_umount(struct _ntfs_volume *vol);
+#endif