1 #ifndef _WIMLIB_APPLY_H
2 #define _WIMLIB_APPLY_H
4 #include "wimlib/list.h"
5 #include "wimlib/types.h"
8 /* These can be treated as counts (for required_features) or booleans (for
9 * supported_features). */
11 unsigned long archive_files;
12 unsigned long hidden_files;
13 unsigned long system_files;
14 unsigned long compressed_files;
15 unsigned long encrypted_files;
16 unsigned long encrypted_directories;
17 unsigned long not_context_indexed_files;
18 unsigned long sparse_files;
19 unsigned long named_data_streams;
20 unsigned long hard_links;
21 unsigned long reparse_points;
22 unsigned long symlink_reparse_points;
23 unsigned long other_reparse_points;
24 unsigned long security_descriptors;
25 unsigned long short_names;
26 unsigned long unix_data;
27 unsigned long timestamps;
28 unsigned long case_sensitive_filenames;
31 struct wim_lookup_table_entry;
32 struct read_stream_list_callbacks;
35 /* The WIMStruct from which files are being extracted from the currently
39 /* The target of the extraction, usually the path to a directory. */
42 /* Length of @target in tchars. */
45 /* Extraction flags (WIMLIB_EXTRACT_FLAG_*) */
48 /* User-provided progress function, or NULL if not specified. */
49 wimlib_progress_func_t progress_func;
51 /* Progress data buffer, with progress.extract initialized. */
52 union wimlib_progress_info progress;
54 /* Features required to extract the files (with counts) */
55 struct wim_features required_features;
57 /* Features supported by the extraction mode (with booleans) */
58 struct wim_features supported_features;
60 /* The members below should not be used outside of extract.c */
62 unsigned long invalid_sequence;
63 unsigned long num_streams_remaining;
64 struct list_head stream_list;
65 const struct read_stream_list_callbacks *saved_cbs;
66 struct wim_lookup_table_entry *cur_stream;
69 /* Returns any of the aliases of an inode that are being extracted. */
70 #define inode_first_extraction_dentry(inode) \
71 list_first_entry(&(inode)->i_extraction_aliases, \
72 struct wim_dentry, d_extraction_alias_node)
75 extract_stream_list(struct apply_ctx *ctx,
76 const struct read_stream_list_callbacks *cbs);
78 struct apply_operations {
80 int (*get_supported_features)(const tchar *target,
81 struct wim_features *supported_features);
83 int (*extract)(struct list_head *dentry_list, struct apply_ctx *ctx);
86 bool single_tree_only;
90 extern const struct apply_operations win32_apply_ops;
92 extern const struct apply_operations unix_apply_ops;
96 extern const struct apply_operations ntfs_3g_apply_ops;
99 #endif /* _WIMLIB_APPLY_H */