0ef410a8d3aaaea8fe29cbc1713429327d511ff8
[wimlib] / src / win32.h
1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
3
4 #include "wimlib_internal.h"
5 #include <direct.h>
6 #include <windef.h>
7
8 extern int
9 win32_build_dentry_tree(struct wim_dentry **root_ret,
10                         const tchar *root_disk_path,
11                         struct wim_lookup_table *lookup_table,
12                         struct wim_inode_table *inode_table,
13                         struct sd_set *sd,
14                         const struct wimlib_capture_config *config,
15                         int add_image_flags,
16                         wimlib_progress_func_t progress_func,
17                         void *extra_arg);
18
19 extern int
20 win32_read_file(const tchar *filename, HANDLE handle,
21                 u64 offset, size_t size, void *buf);
22
23 extern int
24 read_win32_file_prefix(const struct lookup_table_entry *lte,
25                        u64 size,
26                        consume_data_callback_t cb,
27                        void *ctx_or_buf,
28                        int _ignored_flags)
29 {
30 }
31
32 #define FNM_PATHNAME 0x1
33 #define FNM_NOESCAPE 0x2
34 #define FNM_NOMATCH 1
35 extern int
36 fnmatch(const tchar *pattern, const tchar *string, int flags);
37
38 extern int
39 win32_do_apply_dentry(const tchar *output_path,
40                       size_t output_path_nbytes,
41                       struct wim_dentry *dentry,
42                       struct apply_args *args);
43
44 extern int
45 win32_do_apply_dentry_timestamps(const tchar *output_path,
46                                  size_t output_path_nbytes,
47                                  const struct wim_dentry *dentry,
48                                  const struct apply_args *args);
49
50 extern int
51 fsync(int fd);
52
53 extern unsigned
54 win32_get_number_of_processors();
55
56 extern tchar *
57 realpath(const tchar *path, tchar *resolved_path);
58
59 typedef enum {
60         CODESET
61 } nl_item;
62
63 extern int
64 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
65
66 extern int
67 win32_truncate_replacement(const tchar *path, off_t size);
68
69 extern void
70 win32_global_init();
71
72 extern void
73 win32_global_cleanup();
74
75 extern int
76 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
77
78 #endif /* _WIMLIB_WIN32_H */