]> wimlib.net Git - wimlib/blob - include/wimlib/xml.h
v1.14.4
[wimlib] / include / wimlib / xml.h
1 #ifndef _WIMLIB_XML_H
2 #define _WIMLIB_XML_H
3
4 #include "wimlib/types.h"
5
6 /*****************************************************************************/
7
8 struct wim_xml_info;
9
10 extern struct wim_xml_info *
11 xml_new_info_struct(void);
12
13 extern void
14 xml_free_info_struct(struct wim_xml_info *info);
15
16 /*****************************************************************************/
17
18 extern int
19 xml_get_image_count(const struct wim_xml_info *info);
20
21 extern u64
22 xml_get_total_bytes(const struct wim_xml_info *info);
23
24 extern u64
25 xml_get_image_total_bytes(const struct wim_xml_info *info, int image);
26
27 extern u64
28 xml_get_image_hard_link_bytes(const struct wim_xml_info *info, int image);
29
30 extern bool
31 xml_get_wimboot(const struct wim_xml_info *info, int image);
32
33 extern u64
34 xml_get_windows_build_number(const struct wim_xml_info *info, int image);
35
36 extern int
37 xml_set_wimboot(struct wim_xml_info *info, int image);
38
39 /*****************************************************************************/
40
41 extern int
42 xml_update_image_info(WIMStruct *wim, int image);
43
44 extern int
45 xml_add_image(struct wim_xml_info *info, const tchar *name);
46
47 extern int
48 xml_export_image(const struct wim_xml_info *src_info, int src_image,
49                  struct wim_xml_info *dest_info, const tchar *dest_image_name,
50                  const tchar *dest_image_description, bool wimboot);
51
52 extern void
53 xml_delete_image(struct wim_xml_info *info, int image);
54
55
56 extern void
57 xml_print_image_info(struct wim_xml_info *info, int image);
58
59 /*****************************************************************************/
60
61 struct wim_reshdr;
62
63 #define WIM_TOTALBYTES_USE_EXISTING  ((u64)(-1))
64 #define WIM_TOTALBYTES_OMIT          ((u64)(-2))
65
66 extern int
67 read_wim_xml_data(WIMStruct *wim);
68
69 extern int
70 write_wim_xml_data(WIMStruct *wim, int image,
71                    u64 total_bytes, struct wim_reshdr *out_reshdr,
72                    int write_resource_flags);
73
74 /*****************************************************************************/
75
76 extern void
77 xml_global_init(void);
78
79 extern void
80 xml_global_cleanup(void);
81
82 extern void
83 xml_set_memory_allocator(void *(*malloc_func)(size_t),
84                          void (*free_func)(void *),
85                          void *(*realloc_func)(void *, size_t));
86
87 #endif /* _WIMLIB_XML_H */