X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=include%2Fwimlib%2Fapply.h;h=24648c9b3a378c19581881be787ffeb5f0d45574;hp=8a556263dab9f936e6cf4981da3c9b0381d816c7;hb=ad8c3f70361e25b7c1bbc46d4429749c7215fa12;hpb=962cca1a6f9e45827006a745be086b7af3b725aa diff --git a/include/wimlib/apply.h b/include/wimlib/apply.h index 8a556263..24648c9b 100644 --- a/include/wimlib/apply.h +++ b/include/wimlib/apply.h @@ -1,6 +1,7 @@ #ifndef _WIMLIB_APPLY_H #define _WIMLIB_APPLY_H +#include "wimlib/file_io.h" #include "wimlib/types.h" #include "wimlib/list.h" #include "wimlib.h" @@ -13,7 +14,7 @@ struct apply_ctx; /* Path to extracted file, or "cookie" identifying the file (e.g. inode number). * */ typedef union { - const char *path; + const tchar *path; u64 cookie; } file_spec_t; @@ -71,7 +72,7 @@ struct apply_operations { /* REQUIRED: Extract unnamed data stream. */ int (*extract_unnamed_stream) (file_spec_t file, struct wim_lookup_table_entry *lte, - struct apply_ctx *ctx); + struct apply_ctx *ctx, struct wim_dentry *dentry); /* OPTIONAL: Extracted named data stream. In start_extract(), set * ctx->supported_features.alternate_data_streams if supported. */ @@ -83,13 +84,14 @@ struct apply_operations { /* OPTIONAL: Extracted encrypted stream. In start_extract(), set * ctx->supported_features.encrypted_files if supported. */ int (*extract_encrypted_stream) - (file_spec_t file, struct wim_lookup_table_entry *lte, + (const tchar *path, struct wim_lookup_table_entry *lte, struct apply_ctx *ctx); /* OPTIONAL: Set file attributes. Calling code calls this if non-NULL. */ int (*set_file_attributes) - (const tchar *path, u32 attributes, struct apply_ctx *ctx); + (const tchar *path, u32 attributes, struct apply_ctx *ctx, + unsigned pass); /* OPTIONAL: Set reparse data. In start_extract(), set * ctx->supported_features.reparse_data if supported. */ @@ -167,6 +169,19 @@ struct apply_operations { * then be passed to callbacks taking a 'file_spec_t', rather than the * path. */ unsigned uses_cookies : 1; + + /* OPTIONAL: Set to 1 if set_file_attributes() needs to be called a + * second time towards the end of the extraction. */ + unsigned requires_final_set_attributes_pass : 1; + + /* OPTIONAL: Set to 1 if extract_encrypted_stream() must be used to + * create encrypted files. */ + unsigned extract_encrypted_stream_creates_file : 1; + + /* OPTIONAL: Set to 1 if a link to a file with corresponding short name + * must be created before all links to the same file without + * corresponding short names. */ + unsigned requires_short_name_reordering : 1; }; struct wim_features { @@ -175,6 +190,7 @@ struct wim_features { unsigned long system_files; unsigned long compressed_files; unsigned long encrypted_files; + unsigned long encrypted_directories; unsigned long not_context_indexed_files; unsigned long sparse_files; unsigned long named_data_streams; @@ -195,17 +211,23 @@ struct apply_ctx { size_t target_nchars; wimlib_progress_func_t progress_func; union wimlib_progress_info progress; - struct wim_dentry *extract_root; const struct apply_operations *ops; - struct wim_features supported_features; struct list_head stream_list; + struct wim_features supported_features; + bool root_dentry_is_special; + u32 supported_attributes_mask; + + struct wim_dentry *target_dentry; tchar *realtarget; size_t realtarget_nchars; unsigned long invalid_sequence; + unsigned long partial_security_descriptors; + unsigned long no_security_descriptors; + struct filedes tmpfile_fd; + tchar *tmpfile_name; u64 num_streams_remaining; - bool root_dentry_is_special; uint64_t next_progress; - intptr_t private[8]; + intptr_t private[10]; }; #ifdef __WIN32__