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/textfile.h"
9 #include "wimlib/util.h"
11 struct wim_lookup_table;
15 struct capture_config {
16 struct string_set exclusion_pats;
17 struct string_set exclusion_exception_pats;
19 size_t prefix_num_tchars;
23 /* Common parameters to implementations of building an in-memory dentry tree
24 * from an on-disk directory structure. */
25 struct add_image_params {
26 /* Pointer to the lookup table of the WIM. */
27 struct wim_lookup_table *lookup_table;
29 /* List of streams that have been added so far, but without their SHA1
30 * message digests being calculated (as a shortcut). */
31 struct list_head *unhashed_streams;
33 /* Hash table of inodes that have been captured for this tree so far. */
34 struct wim_inode_table inode_table;
36 /* The set of security descriptors that have been captured for this
38 struct wim_sd_set sd_set;
40 /* Pointer to the capture configuration. */
41 struct capture_config *config;
43 /* Flags that affect the capture operation (WIMLIB_ADD_FLAG_*) */
46 /* Extra argument; set to point to a pointer to the ntfs_volume for
47 * libntfs-3g capture. */
53 /* If non-NULL, the user-supplied progress function. */
54 wimlib_progress_func_t progress_func;
57 union wimlib_progress_info progress;
61 /* capture_common.c */
64 do_capture_progress(struct add_image_params *params, int status,
65 const struct wim_inode *inode);
68 mangle_pat(tchar *pat, const tchar *path, unsigned long line_no);
71 do_read_capture_config_file(const tchar *config_file, const void *buf,
72 size_t bufsize, struct capture_config *config);
75 destroy_capture_config(struct capture_config *config);
78 match_pattern(const tchar *path,
79 const tchar *path_basename,
80 const struct string_set *list);
83 exclude_path(const tchar *path, size_t path_len,
84 const struct capture_config *config,
89 /* ntfs-3g_capture.c */
91 build_dentry_tree_ntfs(struct wim_dentry **root_p,
93 struct add_image_params *params);
99 win32_build_dentry_tree(struct wim_dentry **root_ret,
100 const tchar *root_disk_path,
101 struct add_image_params *params);
105 unix_build_dentry_tree(struct wim_dentry **root_ret,
106 const tchar *root_disk_path,
107 struct add_image_params *params);
110 #define WIMLIB_ADD_FLAG_ROOT 0x80000000
112 #endif /* _WIMLIB_CAPTURE_H */