8562a0a9756e3dcb9e31ffa74e65a96d61373c31
[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 int
28 xml_export_image(const struct wim_info *old_wim_info, int image,
29                  struct wim_info **new_wim_info_p,
30                  const tchar *dest_image_name,
31                  const tchar *dest_image_description);
32
33 extern size_t
34 xml_get_max_image_name_len(const WIMStruct *wim);
35
36 extern void
37 xml_update_image_info(WIMStruct *wim, int image);
38
39 extern void
40 xml_delete_image(struct wim_info **wim_info_p, int image);
41
42 extern int
43 xml_add_image(WIMStruct *wim, const tchar *name);
44
45 extern void
46 free_wim_info(struct wim_info *info);
47
48 extern void
49 print_image_info(const struct wim_info *wim_info, int image);
50
51 #define WIM_TOTALBYTES_USE_EXISTING  ((u64)0 - 1)
52 #define WIM_TOTALBYTES_OMIT          ((u64)0 - 2)
53
54 extern int
55 read_wim_xml_data(WIMStruct *wim);
56
57 extern int
58 write_wim_xml_data(WIMStruct *wim, int image,
59                    u64 total_bytes, struct wim_reshdr *out_reshdr,
60                    int write_resource_flags);
61
62 extern void
63 libxml_global_init(void);
64
65 extern void
66 libxml_global_cleanup(void);
67
68 extern void
69 xml_set_memory_allocator(void *(*malloc_func)(size_t),
70                          void (*free_func)(void *),
71                          void *(*realloc_func)(void *, size_t));
72
73 #endif /* _WIMLIB_XML_H */