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