system compression: force bootloader-accessed files to uncompressed if image is not...
[wimlib] / include / wimlib / xml.h
1 #ifndef _WIMLIB_XML_H
2 #define _WIMLIB_XML_H
3
4 #include "wimlib/types.h"
5
6 struct wim_info;
7 struct wim_reshdr;
8
9 extern u64
10 wim_info_get_total_bytes(const struct wim_info *info);
11
12 extern u64
13 wim_info_get_image_hard_link_bytes(const struct wim_info *info, int image);
14
15 extern u64
16 wim_info_get_image_total_bytes(const struct wim_info *info, int image);
17
18 extern unsigned
19 wim_info_get_num_images(const struct wim_info *info);
20
21 extern void
22 wim_info_set_wimboot(struct wim_info *info, int image, bool value);
23
24 extern bool
25 wim_info_get_wimboot(const struct wim_info *info, int image);
26
27 extern u64
28 wim_info_get_windows_build_number(const struct wim_info *info, int image);
29
30 extern int
31 xml_export_image(const struct wim_info *old_wim_info, int image,
32                  struct wim_info **new_wim_info_p,
33                  const tchar *dest_image_name,
34                  const tchar *dest_image_description);
35
36 extern size_t
37 xml_get_max_image_name_len(const WIMStruct *wim);
38
39 extern void
40 xml_update_image_info(WIMStruct *wim, int image);
41
42 extern void
43 xml_delete_image(struct wim_info **wim_info_p, int image);
44
45 extern int
46 xml_add_image(WIMStruct *wim, const tchar *name);
47
48 extern void
49 free_wim_info(struct wim_info *info);
50
51 extern void
52 print_image_info(const struct wim_info *wim_info, int image);
53
54 #define WIM_TOTALBYTES_USE_EXISTING  ((u64)0 - 1)
55 #define WIM_TOTALBYTES_OMIT          ((u64)0 - 2)
56
57 extern int
58 read_wim_xml_data(WIMStruct *wim);
59
60 extern int
61 write_wim_xml_data(WIMStruct *wim, int image,
62                    u64 total_bytes, struct wim_reshdr *out_reshdr,
63                    int write_resource_flags);
64
65 extern void
66 libxml_global_init(void);
67
68 extern void
69 libxml_global_cleanup(void);
70
71 extern void
72 xml_set_memory_allocator(void *(*malloc_func)(size_t),
73                          void (*free_func)(void *),
74                          void *(*realloc_func)(void *, size_t));
75
76 #endif /* _WIMLIB_XML_H */