1 #ifndef _WIMLIB_APPLY_H
2 #define _WIMLIB_APPLY_H
4 #include "wimlib/list.h"
5 #include "wimlib/progress.h"
6 #include "wimlib/types.h"
9 /* These can be treated as counts (for required_features) or booleans (for
10 * supported_features). */
12 unsigned long archive_files;
13 unsigned long hidden_files;
14 unsigned long system_files;
15 unsigned long compressed_files;
16 unsigned long encrypted_files;
17 unsigned long encrypted_directories;
18 unsigned long not_context_indexed_files;
19 unsigned long sparse_files;
20 unsigned long named_data_streams;
21 unsigned long hard_links;
22 unsigned long reparse_points;
23 unsigned long symlink_reparse_points;
24 unsigned long other_reparse_points;
25 unsigned long security_descriptors;
26 unsigned long short_names;
27 unsigned long unix_data;
28 unsigned long timestamps;
29 unsigned long case_sensitive_filenames;
32 struct wim_lookup_table_entry;
33 struct read_stream_list_callbacks;
36 /* The WIMStruct from which files are being extracted from the currently
40 /* The target of the extraction, usually the path to a directory. */
43 /* Length of @target in tchars. */
46 /* Extraction flags (WIMLIB_EXTRACT_FLAG_*) */
49 /* User-provided progress function, or NULL if not specified. */
50 wimlib_progress_func_t progfunc;
53 /* Progress data buffer, with progress.extract initialized. */
54 union wimlib_progress_info progress;
56 /* Features required to extract the files (with counts) */
57 struct wim_features required_features;
59 /* Features supported by the extraction mode (with booleans) */
60 struct wim_features supported_features;
62 /* The members below should not be used outside of extract.c */
64 unsigned long invalid_sequence;
65 unsigned long num_streams_remaining;
66 struct list_head stream_list;
67 const struct read_stream_list_callbacks *saved_cbs;
68 struct wim_lookup_table_entry *cur_stream;
72 extract_progress(struct apply_ctx *ctx, enum wimlib_progress_msg msg)
74 return call_progress(ctx->progfunc, msg, &ctx->progress, ctx->progctx);
77 /* Returns any of the aliases of an inode that are being extracted. */
78 #define inode_first_extraction_dentry(inode) \
79 list_first_entry(&(inode)->i_extraction_aliases, \
80 struct wim_dentry, d_extraction_alias_node)
83 extract_stream_list(struct apply_ctx *ctx,
84 const struct read_stream_list_callbacks *cbs);
86 struct apply_operations {
88 int (*get_supported_features)(const tchar *target,
89 struct wim_features *supported_features);
91 int (*extract)(struct list_head *dentry_list, struct apply_ctx *ctx);
94 bool single_tree_only;
98 extern const struct apply_operations win32_apply_ops;
100 extern const struct apply_operations unix_apply_ops;
104 extern const struct apply_operations ntfs_3g_apply_ops;
107 #endif /* _WIMLIB_APPLY_H */