]> wimlib.net Git - wimlib/blob - include/wimlib/apply.h
compress.c, decompress.h: Use correct little endian annotations
[wimlib] / include / wimlib / apply.h
1 #ifndef _WIMLIB_APPLY_H
2 #define _WIMLIB_APPLY_H
3
4 #include "wimlib.h"
5 #include "wimlib/types.h"
6
7 #ifdef WITH_NTFS_3G
8 struct _ntfs_volume;
9 #endif
10
11 struct apply_args {
12         WIMStruct *w;
13         const tchar *target;
14         unsigned target_nchars;
15         unsigned wim_source_path_nchars;
16         struct wim_dentry *extract_root;
17         tchar *target_realpath;
18         unsigned target_realpath_len;
19         int extract_flags;
20         union wimlib_progress_info progress;
21         wimlib_progress_func_t progress_func;
22         int (*apply_dentry)(struct wim_dentry *, void *);
23         union {
24         #ifdef WITH_NTFS_3G
25                 struct {
26                         /* NTFS apply only */
27                         struct _ntfs_volume *vol;
28                 };
29         #endif
30         #ifdef __WIN32__
31                 struct {
32                         /* Normal apply only (Win32) */
33                         unsigned long num_set_sacl_priv_notheld;
34                         unsigned long num_set_sd_access_denied;
35                         unsigned vol_flags;
36                         unsigned long num_hard_links_failed;
37                         unsigned long num_soft_links_failed;
38                         bool have_vol_flags;
39                 };
40         #else
41                 struct {
42                         /* Normal apply only (UNIX) */
43                         unsigned long num_utime_warnings;
44                 };
45         #endif
46         };
47 };
48
49 #ifdef WITH_NTFS_3G
50 extern int
51 apply_dentry_ntfs(struct wim_dentry *dentry, void *arg);
52
53 extern int
54 apply_dentry_timestamps_ntfs(struct wim_dentry *dentry, void *arg);
55 #endif
56
57 #ifdef __WIN32__
58 extern int
59 win32_do_apply_dentry(const tchar *output_path,
60                       size_t output_path_nbytes,
61                       struct wim_dentry *dentry,
62                       struct apply_args *args);
63
64 extern int
65 win32_do_apply_dentry_timestamps(const tchar *output_path,
66                                  size_t output_path_nbytes,
67                                  struct wim_dentry *dentry,
68                                  struct apply_args *args);
69 #else /* __WIN32__ */
70 extern int
71 unix_do_apply_dentry(const tchar *output_path, size_t output_path_nbytes,
72                      struct wim_dentry *dentry, struct apply_args *args);
73 extern int
74 unix_do_apply_dentry_timestamps(const tchar *output_path,
75                                 size_t output_path_nbytes,
76                                 struct wim_dentry *dentry,
77                                 struct apply_args *args);
78 #endif /* !__WIN32__ */
79
80 /* Internal use only */
81 #define WIMLIB_EXTRACT_FLAG_MULTI_IMAGE         0x80000000
82 #define WIMLIB_EXTRACT_FLAG_NO_STREAMS          0x40000000
83 #define WIMLIB_EXTRACT_MASK_PUBLIC              0x3fffffff
84
85
86 #endif /* _WIMLIB_APPLY_H */