1 #ifndef _WIMLIB_CAPTURE_H
2 #define _WIMLIB_CAPTURE_H
5 #include "wimlib/inode_table.h"
6 #include "wimlib/list.h"
7 #include "wimlib/security.h"
8 #include "wimlib/util.h"
10 struct wim_lookup_table;
14 /* Common parameters to implementations of building an in-memory dentry tree
15 * from an on-disk directory structure. */
16 struct add_image_params {
17 /* Pointer to the lookup table of the WIM. */
18 struct wim_lookup_table *lookup_table;
20 /* List of streams that have been added so far, but without their SHA1
21 * message digests being calculated (as a shortcut). */
22 struct list_head *unhashed_streams;
24 /* Hash table of inodes that have been captured for this tree so far. */
25 struct wim_inode_table inode_table;
27 /* The set of security descriptors that have been captured for this
29 struct wim_sd_set sd_set;
31 /* Pointer to the capture configuration, which indicates whether any
32 * files should be excluded from capture or not. */
33 struct wimlib_capture_config *config;
35 /* Flags that affect the capture operation (WIMLIB_ADD_FLAG_*) */
38 /* Extra argument; set to point to a pointer to the ntfs_volume for
39 * libntfs-3g capture. */
45 /* If non-NULL, the user-supplied progress function. */
46 wimlib_progress_func_t progress_func;
49 union wimlib_progress_info progress;
53 /* capture_common.c */
56 do_capture_progress(struct add_image_params *params, int status,
57 const struct wim_inode *inode);
60 exclude_path(const tchar *path, size_t path_len,
61 const struct wimlib_capture_config *config,
64 extern struct wimlib_capture_config *
65 copy_capture_config(const struct wimlib_capture_config *config);
68 copy_and_canonicalize_capture_config(const struct wimlib_capture_config *config,
69 struct wimlib_capture_config **config_copy_ret);
72 free_capture_config(struct wimlib_capture_config *config);
76 /* ntfs-3g_capture.c */
78 build_dentry_tree_ntfs(struct wim_dentry **root_p,
80 struct add_image_params *params);
86 win32_build_dentry_tree(struct wim_dentry **root_ret,
87 const tchar *root_disk_path,
88 struct add_image_params *params);
92 unix_build_dentry_tree(struct wim_dentry **root_ret,
93 const tchar *root_disk_path,
94 struct add_image_params *params);
97 #define WIMLIB_ADD_FLAG_ROOT 0x80000000
99 #endif /* _WIMLIB_CAPTURE_H */