wimlib
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
wimlib.h
Go to the documentation of this file.
1 
364 #ifndef _WIMLIB_H
365 #define _WIMLIB_H
366 
367 #include <stdio.h>
368 #include <stddef.h>
369 #include <stdbool.h>
370 #include <inttypes.h>
371 #include <time.h>
372 
377 #define WIMLIB_MAJOR_VERSION 1
378 
380 #define WIMLIB_MINOR_VERSION 8
381 
383 #define WIMLIB_PATCH_VERSION 3
384 
385 #ifdef __cplusplus
386 extern "C" {
387 #endif
388 
393 #ifndef WIMLIB_WIMSTRUCT_DECLARED
394 typedef struct WIMStruct WIMStruct;
395 #define WIMLIB_WIMSTRUCT_DECLARED
396 #endif
397 
398 #ifdef __WIN32__
399 typedef wchar_t wimlib_tchar;
400 #else
401 
402 typedef char wimlib_tchar;
403 #endif
404 
405 #ifdef __WIN32__
406 
408 # define WIMLIB_WIM_PATH_SEPARATOR '\\'
409 # define WIMLIB_WIM_PATH_SEPARATOR_STRING L"\\"
410 #else
411 
413 # define WIMLIB_WIM_PATH_SEPARATOR '/'
414 # define WIMLIB_WIM_PATH_SEPARATOR_STRING "/"
415 #endif
416 
418 #define WIMLIB_WIM_ROOT_PATH WIMLIB_WIM_PATH_SEPARATOR_STRING
419 
422 #define WIMLIB_IS_WIM_ROOT_PATH(path) \
423  ((path)[0] == WIMLIB_WIM_PATH_SEPARATOR && \
424  (path)[1] == 0)
425 
427 #define WIMLIB_GUID_LEN 16
428 
448 
468 
490 
513 };
514 
522 
528 
535 
543 
548 
552 
560 
565 
570 
577 
583 
589 
596 
600 
605 
612 
619 
625 
630 
634 
640 
646 
653 
661 
665 
671 
675 
680 
684 
698 
720 };
721 
729 
733 
737 };
738 
746 
751 
757  uint64_t total_bytes;
758 
765  uint64_t total_streams;
766 
771  uint64_t completed_bytes;
772 
777 
780  uint32_t num_threads;
781 
785 
789  uint32_t total_parts;
790 
792  uint32_t completed_parts;
793  } write_streams;
794 
799 
804  const wimlib_tchar *source;
805 
810  const wimlib_tchar *cur_path;
811 
814  enum {
817 
821 
825 
833 
839  } status;
840 
841  union {
845  const wimlib_tchar *wim_target_path;
846 
851  const wimlib_tchar *symlink_target;
852  };
853 
857 
862 
867  } scan;
868 
889 
892  uint32_t image;
893 
895  uint32_t extract_flags;
896 
900  const wimlib_tchar *wimfile_name;
901 
904  const wimlib_tchar *image_name;
905 
908  const wimlib_tchar *target;
909 
911  const wimlib_tchar *reserved;
912 
914  uint64_t total_bytes;
915 
918  uint64_t completed_bytes;
919 
924  uint64_t total_streams;
925 
929 
932  uint32_t part_number;
933 
936  uint32_t total_parts;
937 
941 
948 
965  uint64_t end_file_count;
966  } extract;
967 
971  const wimlib_tchar *from;
972 
975  const wimlib_tchar *to;
976  } rename;
977 
984 
988 
992  } update;
993 
997 
1000  uint64_t total_bytes;
1001 
1005 
1008  uint32_t total_chunks;
1009 
1013 
1016  uint32_t chunk_size;
1017 
1020  const wimlib_tchar *filename;
1021  } integrity;
1022 
1028  uint64_t total_bytes;
1029 
1034 
1039 
1041  unsigned total_parts;
1042 
1050  wimlib_tchar *part_name;
1051  } split;
1052 
1056  const wimlib_tchar *path_in_wim;
1057  } replace;
1058 
1062  const wimlib_tchar *path_in_wim;
1063 
1065  const wimlib_tchar *extraction_path;
1066  } wimboot_exclude;
1067 
1071  const wimlib_tchar *mountpoint;
1072 
1074  const wimlib_tchar *mounted_wim;
1075 
1077  uint32_t mounted_image;
1078 
1081  uint32_t mount_flags;
1082 
1084  uint32_t unmount_flags;
1085  } unmount;
1086 
1107  const wimlib_tchar *path_to_file;
1108  } done_with_file;
1109 
1113  const wimlib_tchar *wimfile;
1114  uint32_t total_images;
1115  uint32_t current_image;
1116  } verify_image;
1117 
1120  const wimlib_tchar *wimfile;
1121  uint64_t total_streams;
1122  uint64_t total_bytes;
1125  } verify_streams;
1126 
1129 
1142  const wimlib_tchar *path;
1143 
1152 
1155 
1158  const wimlib_tchar *path;
1159 
1162 
1169  } handle_error;
1170 };
1171 
1190 typedef enum wimlib_progress_status
1192  union wimlib_progress_info *info,
1193  void *progctx);
1194 
1204  wimlib_tchar *fs_source_path;
1205 
1208  wimlib_tchar *wim_target_path;
1209 
1211  long reserved;
1212 };
1213 
1224 #define WIMLIB_CHANGE_READONLY_FLAG 0x00000001
1225 
1228 #define WIMLIB_CHANGE_GUID 0x00000002
1229 
1232 #define WIMLIB_CHANGE_BOOT_INDEX 0x00000004
1233 
1240 #define WIMLIB_CHANGE_RPFIX_FLAG 0x00000008
1241 
1256 
1260 
1262  uint32_t image_count;
1263 
1266  uint32_t boot_index;
1267 
1269  uint32_t wim_version;
1270 
1273  uint32_t chunk_size;
1274 
1277  uint16_t part_number;
1278 
1281  uint16_t total_parts;
1282 
1286 
1289  uint64_t total_bytes;
1290 
1292  uint32_t has_integrity_table : 1;
1293 
1296  uint32_t opened_from_file : 1;
1297 
1301  uint32_t is_readonly : 1;
1302 
1304  uint32_t has_rpfix : 1;
1305 
1307  uint32_t is_marked_readonly : 1;
1308 
1310  uint32_t spanned : 1;
1311 
1313  uint32_t write_in_progress : 1;
1314 
1316  uint32_t metadata_only : 1;
1317 
1319  uint32_t resource_only : 1;
1320 
1322  uint32_t pipable : 1;
1323  uint32_t reserved_flags : 22;
1324  uint32_t reserved[9];
1325 };
1326 
1358 
1362 
1366 
1371  uint64_t offset;
1372 
1374  uint8_t sha1_hash[20];
1375 
1378  uint32_t part_number;
1379 
1384 
1387  uint32_t is_compressed : 1;
1388 
1390  uint32_t is_metadata : 1;
1391 
1392  uint32_t is_free : 1;
1393  uint32_t is_spanned : 1;
1394 
1398  uint32_t is_missing : 1;
1399 
1401  uint32_t packed : 1;
1402 
1403  uint32_t reserved_flags : 26;
1404 
1408 
1412 
1416 
1417  uint64_t reserved[1];
1418 };
1419 
1432 
1434  const wimlib_tchar *stream_name;
1435 
1438 
1439  uint64_t reserved[4];
1440 };
1441 
1449  const wimlib_tchar *filename;
1450 
1453  const wimlib_tchar *dos_name;
1454 
1457  const wimlib_tchar *full_path;
1458 
1461  size_t depth;
1462 
1466  const char *security_descriptor;
1467 
1470 
1471 #define WIMLIB_FILE_ATTRIBUTE_READONLY 0x00000001
1472 #define WIMLIB_FILE_ATTRIBUTE_HIDDEN 0x00000002
1473 #define WIMLIB_FILE_ATTRIBUTE_SYSTEM 0x00000004
1474 #define WIMLIB_FILE_ATTRIBUTE_DIRECTORY 0x00000010
1475 #define WIMLIB_FILE_ATTRIBUTE_ARCHIVE 0x00000020
1476 #define WIMLIB_FILE_ATTRIBUTE_DEVICE 0x00000040
1477 #define WIMLIB_FILE_ATTRIBUTE_NORMAL 0x00000080
1478 #define WIMLIB_FILE_ATTRIBUTE_TEMPORARY 0x00000100
1479 #define WIMLIB_FILE_ATTRIBUTE_SPARSE_FILE 0x00000200
1480 #define WIMLIB_FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
1481 #define WIMLIB_FILE_ATTRIBUTE_COMPRESSED 0x00000800
1482 #define WIMLIB_FILE_ATTRIBUTE_OFFLINE 0x00001000
1483 #define WIMLIB_FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000
1484 #define WIMLIB_FILE_ATTRIBUTE_ENCRYPTED 0x00004000
1485 #define WIMLIB_FILE_ATTRIBUTE_VIRTUAL 0x00010000
1486 
1490  uint32_t attributes;
1491 
1492 #define WIMLIB_REPARSE_TAG_RESERVED_ZERO 0x00000000
1493 #define WIMLIB_REPARSE_TAG_RESERVED_ONE 0x00000001
1494 #define WIMLIB_REPARSE_TAG_MOUNT_POINT 0xA0000003
1495 #define WIMLIB_REPARSE_TAG_HSM 0xC0000004
1496 #define WIMLIB_REPARSE_TAG_HSM2 0x80000006
1497 #define WIMLIB_REPARSE_TAG_DRIVER_EXTENDER 0x80000005
1498 #define WIMLIB_REPARSE_TAG_SIS 0x80000007
1499 #define WIMLIB_REPARSE_TAG_DFS 0x8000000A
1500 #define WIMLIB_REPARSE_TAG_DFSR 0x80000012
1501 #define WIMLIB_REPARSE_TAG_FILTER_MANAGER 0x8000000B
1502 #define WIMLIB_REPARSE_TAG_WOF 0x80000017
1503 #define WIMLIB_REPARSE_TAG_SYMLINK 0xA000000C
1504 
1508  uint32_t reparse_tag;
1509 
1514  uint32_t num_links;
1515 
1518 
1527 
1529  struct timespec creation_time;
1530 
1532  struct timespec last_write_time;
1533 
1535  struct timespec last_access_time;
1536 
1540  uint32_t unix_uid;
1541 
1545  uint32_t unix_gid;
1546 
1552  uint32_t unix_mode;
1553 
1558  uint32_t unix_rdev;
1559 
1560  uint64_t reserved[14];
1561 
1577 };
1578 
1583 typedef int (*wimlib_iterate_dir_tree_callback_t)(const struct wimlib_dir_entry *dentry,
1584  void *user_ctx);
1585 
1591  void *user_ctx);
1592 
1595 #define WIMLIB_ITERATE_DIR_TREE_FLAG_RECURSIVE 0x00000001
1596 
1599 #define WIMLIB_ITERATE_DIR_TREE_FLAG_CHILDREN 0x00000002
1600 
1606 #define WIMLIB_ITERATE_DIR_TREE_FLAG_RESOURCES_NEEDED 0x00000004
1607 
1608 
1622 #define WIMLIB_ADD_FLAG_NTFS 0x00000001
1623 
1626 #define WIMLIB_ADD_FLAG_DEREFERENCE 0x00000002
1627 
1631 #define WIMLIB_ADD_FLAG_VERBOSE 0x00000004
1632 
1641 #define WIMLIB_ADD_FLAG_BOOT 0x00000008
1642 
1648 #define WIMLIB_ADD_FLAG_UNIX_DATA 0x00000010
1649 
1652 #define WIMLIB_ADD_FLAG_NO_ACLS 0x00000020
1653 
1659 #define WIMLIB_ADD_FLAG_STRICT_ACLS 0x00000040
1660 
1665 #define WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE 0x00000080
1666 
1674 #define WIMLIB_ADD_FLAG_RPFIX 0x00000100
1675 
1677 #define WIMLIB_ADD_FLAG_NORPFIX 0x00000200
1678 
1683 #define WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE 0x00000400
1684 
1700 #define WIMLIB_ADD_FLAG_WINCONFIG 0x00000800
1701 
1730 #define WIMLIB_ADD_FLAG_WIMBOOT 0x00001000
1731 
1739 #define WIMLIB_ADD_FLAG_NO_REPLACE 0x00002000
1740 
1748 #define WIMLIB_ADD_FLAG_TEST_FILE_EXCLUSION 0x00004000
1749 
1750 /* Note: the WIMLIB_ADD_IMAGE_FLAG names are retained for source compatibility.
1751  * Use the WIMLIB_ADD_FLAG names in new code. */
1752 #define WIMLIB_ADD_IMAGE_FLAG_NTFS WIMLIB_ADD_FLAG_NTFS
1753 #define WIMLIB_ADD_IMAGE_FLAG_DEREFERENCE WIMLIB_ADD_FLAG_DEREFERENCE
1754 #define WIMLIB_ADD_IMAGE_FLAG_VERBOSE WIMLIB_ADD_FLAG_VERBOSE
1755 #define WIMLIB_ADD_IMAGE_FLAG_BOOT WIMLIB_ADD_FLAG_BOOT
1756 #define WIMLIB_ADD_IMAGE_FLAG_UNIX_DATA WIMLIB_ADD_FLAG_UNIX_DATA
1757 #define WIMLIB_ADD_IMAGE_FLAG_NO_ACLS WIMLIB_ADD_FLAG_NO_ACLS
1758 #define WIMLIB_ADD_IMAGE_FLAG_STRICT_ACLS WIMLIB_ADD_FLAG_STRICT_ACLS
1759 #define WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE WIMLIB_ADD_FLAG_EXCLUDE_VERBOSE
1760 #define WIMLIB_ADD_IMAGE_FLAG_RPFIX WIMLIB_ADD_FLAG_RPFIX
1761 #define WIMLIB_ADD_IMAGE_FLAG_NORPFIX WIMLIB_ADD_FLAG_NORPFIX
1762 #define WIMLIB_ADD_IMAGE_FLAG_NO_UNSUPPORTED_EXCLUDE \
1763  WIMLIB_ADD_FLAG_NO_UNSUPPORTED_EXCLUDE
1764 #define WIMLIB_ADD_IMAGE_FLAG_WINCONFIG WIMLIB_ADD_FLAG_WINCONFIG
1765 #define WIMLIB_ADD_IMAGE_FLAG_WIMBOOT WIMLIB_ADD_FLAG_WIMBOOT
1766 
1767 
1773 #define WIMLIB_DELETE_FLAG_FORCE 0x00000001
1774 
1777 #define WIMLIB_DELETE_FLAG_RECURSIVE 0x00000002
1778 
1789 #define WIMLIB_EXPORT_FLAG_BOOT 0x00000001
1790 
1794 #define WIMLIB_EXPORT_FLAG_NO_NAMES 0x00000002
1795 
1797 #define WIMLIB_EXPORT_FLAG_NO_DESCRIPTIONS 0x00000004
1798 
1802 #define WIMLIB_EXPORT_FLAG_GIFT 0x00000008
1803 
1819 #define WIMLIB_EXPORT_FLAG_WIMBOOT 0x00000010
1820 
1834 #define WIMLIB_EXTRACT_FLAG_NTFS 0x00000001
1835 
1839 #define WIMLIB_EXTRACT_FLAG_UNIX_DATA 0x00000020
1840 
1843 #define WIMLIB_EXTRACT_FLAG_NO_ACLS 0x00000040
1844 
1852 #define WIMLIB_EXTRACT_FLAG_STRICT_ACLS 0x00000080
1853 
1861 #define WIMLIB_EXTRACT_FLAG_RPFIX 0x00000100
1862 
1866 #define WIMLIB_EXTRACT_FLAG_NORPFIX 0x00000200
1867 
1870 #define WIMLIB_EXTRACT_FLAG_TO_STDOUT 0x00000400
1871 
1880 #define WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES 0x00000800
1881 
1890 #define WIMLIB_EXTRACT_FLAG_ALL_CASE_CONFLICTS 0x00001000
1891 
1895 #define WIMLIB_EXTRACT_FLAG_STRICT_TIMESTAMPS 0x00002000
1896 
1899 #define WIMLIB_EXTRACT_FLAG_STRICT_SHORT_NAMES 0x00004000
1900 
1905 #define WIMLIB_EXTRACT_FLAG_STRICT_SYMLINKS 0x00008000
1906 
1908 #define WIMLIB_EXTRACT_FLAG_RESUME 0x00010000
1909 
1922 #define WIMLIB_EXTRACT_FLAG_GLOB_PATHS 0x00040000
1923 
1927 #define WIMLIB_EXTRACT_FLAG_STRICT_GLOB 0x00080000
1928 
1933 #define WIMLIB_EXTRACT_FLAG_NO_ATTRIBUTES 0x00100000
1934 
1940 #define WIMLIB_EXTRACT_FLAG_NO_PRESERVE_DIR_STRUCTURE 0x00200000
1941 
1947 #define WIMLIB_EXTRACT_FLAG_WIMBOOT 0x00400000
1948 
1957 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS4K 0x01000000
1958 
1961 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS8K 0x02000000
1962 
1965 #define WIMLIB_EXTRACT_FLAG_COMPACT_XPRESS16K 0x04000000
1966 
1969 #define WIMLIB_EXTRACT_FLAG_COMPACT_LZX 0x08000000
1970 
1976 #define WIMLIB_MOUNT_FLAG_READWRITE 0x00000001
1977 
1979 #define WIMLIB_MOUNT_FLAG_DEBUG 0x00000002
1980 
1982 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_NONE 0x00000004
1983 
1987 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_XATTR 0x00000008
1988 
1991 #define WIMLIB_MOUNT_FLAG_STREAM_INTERFACE_WINDOWS 0x00000010
1992 
1995 #define WIMLIB_MOUNT_FLAG_UNIX_DATA 0x00000020
1996 
1999 #define WIMLIB_MOUNT_FLAG_ALLOW_OTHER 0x00000040
2000 
2011 #define WIMLIB_OPEN_FLAG_CHECK_INTEGRITY 0x00000001
2012 
2016 #define WIMLIB_OPEN_FLAG_ERROR_IF_SPLIT 0x00000002
2017 
2026 #define WIMLIB_OPEN_FLAG_WRITE_ACCESS 0x00000004
2027 
2034 #define WIMLIB_UNMOUNT_FLAG_CHECK_INTEGRITY 0x00000001
2035 
2038 #define WIMLIB_UNMOUNT_FLAG_COMMIT 0x00000002
2039 
2042 #define WIMLIB_UNMOUNT_FLAG_REBUILD 0x00000004
2043 
2046 #define WIMLIB_UNMOUNT_FLAG_RECOMPRESS 0x00000008
2047 
2056 #define WIMLIB_UNMOUNT_FLAG_FORCE 0x00000010
2057 
2062 #define WIMLIB_UNMOUNT_FLAG_NEW_IMAGE 0x00000020
2063 
2070 #define WIMLIB_UPDATE_FLAG_SEND_PROGRESS 0x00000001
2071 
2084 #define WIMLIB_WRITE_FLAG_CHECK_INTEGRITY 0x00000001
2085 
2091 #define WIMLIB_WRITE_FLAG_NO_CHECK_INTEGRITY 0x00000002
2092 
2106 #define WIMLIB_WRITE_FLAG_PIPABLE 0x00000004
2107 
2112 #define WIMLIB_WRITE_FLAG_NOT_PIPABLE 0x00000008
2113 
2139 #define WIMLIB_WRITE_FLAG_RECOMPRESS 0x00000010
2140 
2154 #define WIMLIB_WRITE_FLAG_FSYNC 0x00000020
2155 
2168 #define WIMLIB_WRITE_FLAG_REBUILD 0x00000040
2169 
2179 #define WIMLIB_WRITE_FLAG_SOFT_DELETE 0x00000080
2180 
2190 #define WIMLIB_WRITE_FLAG_IGNORE_READONLY_FLAG 0x00000100
2191 
2198 #define WIMLIB_WRITE_FLAG_SKIP_EXTERNAL_WIMS 0x00000200
2199 
2201 #define WIMLIB_WRITE_FLAG_STREAMS_OK 0x00000400
2202 
2209 #define WIMLIB_WRITE_FLAG_RETAIN_GUID 0x00000800
2210 
2246 #define WIMLIB_WRITE_FLAG_SOLID 0x00001000
2247 
2252 #define WIMLIB_WRITE_FLAG_PACK_STREAMS WIMLIB_WRITE_FLAG_SOLID
2253 
2259 #define WIMLIB_WRITE_FLAG_SEND_DONE_WITH_FILE_MESSAGES 0x00002000
2260 
2266 #define WIMLIB_WRITE_FLAG_NO_SOLID_SORT 0x00004000
2267 
2284 #define WIMLIB_WRITE_FLAG_UNSAFE_COMPACT 0x00008000
2285 
2293 #define WIMLIB_INIT_FLAG_ASSUME_UTF8 0x00000001
2294 
2303 #define WIMLIB_INIT_FLAG_DONT_ACQUIRE_PRIVILEGES 0x00000002
2304 
2310 #define WIMLIB_INIT_FLAG_STRICT_CAPTURE_PRIVILEGES 0x00000004
2311 
2317 #define WIMLIB_INIT_FLAG_STRICT_APPLY_PRIVILEGES 0x00000008
2318 
2321 #define WIMLIB_INIT_FLAG_DEFAULT_CASE_SENSITIVE 0x00000010
2322 
2325 #define WIMLIB_INIT_FLAG_DEFAULT_CASE_INSENSITIVE 0x00000020
2326 
2333 #define WIMLIB_REF_FLAG_GLOB_ENABLE 0x00000001
2334 
2342 #define WIMLIB_REF_FLAG_GLOB_ERR_ON_NOMATCH 0x00000002
2343 
2353 
2356 
2359 };
2360 
2364  wimlib_tchar *fs_source_path;
2365 
2368  wimlib_tchar *wim_target_path;
2369 
2372  wimlib_tchar *config_file;
2373 
2376 };
2377 
2380 
2383  wimlib_tchar *wim_path;
2384 
2387 };
2388 
2391 
2394  wimlib_tchar *wim_source_path;
2395 
2398  wimlib_tchar *wim_target_path;
2399 
2402 };
2403 
2406 
2408 
2409  union {
2411  struct wimlib_delete_command delete_; /* Underscore is for C++
2412  compatibility. */
2414  };
2415 };
2416 
2508 };
2509 
2510 
2512 #define WIMLIB_NO_IMAGE 0
2513 
2515 #define WIMLIB_ALL_IMAGES (-1)
2516 
2547 extern int
2549  const wimlib_tchar *name,
2550  int *new_idx_ret);
2551 
2603 extern int
2605  const wimlib_tchar *source,
2606  const wimlib_tchar *name,
2607  const wimlib_tchar *config_file,
2608  int add_flags);
2609 
2625 extern int
2627  const struct wimlib_capture_source *sources,
2628  size_t num_sources,
2629  const wimlib_tchar *name,
2630  const wimlib_tchar *config_file,
2631  int add_flags);
2632 
2642 extern int
2643 wimlib_add_tree(WIMStruct *wim, int image,
2644  const wimlib_tchar *fs_source_path,
2645  const wimlib_tchar *wim_target_path, int add_flags);
2646 
2675 extern int
2677 
2706 extern int
2707 wimlib_delete_image(WIMStruct *wim, int image);
2708 
2717 extern int
2718 wimlib_delete_path(WIMStruct *wim, int image,
2719  const wimlib_tchar *path, int delete_flags);
2720 
2788 extern int
2789 wimlib_export_image(WIMStruct *src_wim, int src_image,
2790  WIMStruct *dest_wim,
2791  const wimlib_tchar *dest_name,
2792  const wimlib_tchar *dest_description,
2793  int export_flags);
2794 
2902 extern int
2903 wimlib_extract_image(WIMStruct *wim, int image,
2904  const wimlib_tchar *target, int extract_flags);
2905 
2944 extern int
2945 wimlib_extract_image_from_pipe(int pipe_fd,
2946  const wimlib_tchar *image_num_or_name,
2947  const wimlib_tchar *target, int extract_flags);
2948 
2958 extern int
2960  const wimlib_tchar *image_num_or_name,
2961  const wimlib_tchar *target,
2962  int extract_flags,
2963  wimlib_progress_func_t progfunc,
2964  void *progctx);
2965 
2982 extern int
2983 wimlib_extract_pathlist(WIMStruct *wim, int image,
2984  const wimlib_tchar *target,
2985  const wimlib_tchar *path_list_file,
2986  int extract_flags);
2987 
3061 extern int
3063  int image,
3064  const wimlib_tchar *target,
3065  const wimlib_tchar * const *paths,
3066  size_t num_paths,
3067  int extract_flags);
3068 
3083 extern int
3084 wimlib_extract_xml_data(WIMStruct *wim, FILE *fp);
3085 
3098 extern void
3099 wimlib_free(WIMStruct *wim);
3100 
3114 extern const wimlib_tchar *
3116 
3130 extern const wimlib_tchar *
3132 
3150 extern const wimlib_tchar *
3151 wimlib_get_image_description(const WIMStruct *wim, int image);
3152 
3169 extern const wimlib_tchar *
3170 wimlib_get_image_name(const WIMStruct *wim, int image);
3171 
3196 extern const wimlib_tchar *
3197 wimlib_get_image_property(const WIMStruct *wim, int image,
3198  const wimlib_tchar *property_name);
3199 
3211 extern uint32_t
3212 wimlib_get_version(void);
3213 
3228 extern int
3229 wimlib_get_wim_info(WIMStruct *wim, struct wimlib_wim_info *info);
3230 
3258 extern int
3259 wimlib_get_xml_data(WIMStruct *wim, void **buf_ret, size_t *bufsize_ret);
3260 
3280 extern int
3281 wimlib_global_init(int init_flags);
3282 
3289 extern void
3290 wimlib_global_cleanup(void);
3291 
3308 extern bool
3309 wimlib_image_name_in_use(const WIMStruct *wim, const wimlib_tchar *name);
3310 
3353 extern int
3354 wimlib_iterate_dir_tree(WIMStruct *wim, int image, const wimlib_tchar *path,
3355  int flags,
3356  wimlib_iterate_dir_tree_callback_t cb, void *user_ctx);
3357 
3387 extern int
3388 wimlib_iterate_lookup_table(WIMStruct *wim, int flags,
3390  void *user_ctx);
3391 
3428 extern int
3429 wimlib_join(const wimlib_tchar * const *swms,
3430  unsigned num_swms,
3431  const wimlib_tchar *output_path,
3432  int swm_open_flags,
3433  int wim_write_flags);
3434 
3446 extern int
3447 wimlib_join_with_progress(const wimlib_tchar * const *swms,
3448  unsigned num_swms,
3449  const wimlib_tchar *output_path,
3450  int swm_open_flags,
3451  int wim_write_flags,
3452  wimlib_progress_func_t progfunc,
3453  void *progctx);
3454 
3455 
3531 extern int
3533  int image,
3534  const wimlib_tchar *dir,
3535  int mount_flags,
3536  const wimlib_tchar *staging_dir);
3537 
3607 extern int
3608 wimlib_open_wim(const wimlib_tchar *wim_file,
3609  int open_flags,
3610  WIMStruct **wim_ret);
3611 
3623 extern int
3624 wimlib_open_wim_with_progress(const wimlib_tchar *wim_file,
3625  int open_flags,
3626  WIMStruct **wim_ret,
3627  wimlib_progress_func_t progfunc,
3628  void *progctx);
3629 
3689 extern int
3690 wimlib_overwrite(WIMStruct *wim, int write_flags, unsigned num_threads);
3691 
3708 extern void
3709 wimlib_print_available_images(const WIMStruct *wim, int image);
3710 
3716 extern void
3717 wimlib_print_header(const WIMStruct *wim);
3718 
3760 extern int
3762  const wimlib_tchar * const *resource_wimfiles_or_globs,
3763  unsigned count,
3764  int ref_flags,
3765  int open_flags);
3766 
3787 extern int
3788 wimlib_reference_resources(WIMStruct *wim, WIMStruct **resource_wims,
3789  unsigned num_resource_wims, int ref_flags);
3790 
3852 extern int
3853 wimlib_reference_template_image(WIMStruct *wim, int new_image,
3854  WIMStruct *template_wim, int template_image,
3855  int flags);
3856 
3872 extern void
3874  wimlib_progress_func_t progfunc,
3875  void *progctx);
3876 
3886 extern int
3887 wimlib_rename_path(WIMStruct *wim, int image,
3888  const wimlib_tchar *source_path, const wimlib_tchar *dest_path);
3889 
3920 extern int
3922  const wimlib_tchar *image_name_or_num);
3923 
3941 extern int
3942 wimlib_set_error_file(FILE *fp);
3943 
3960 extern int
3961 wimlib_set_error_file_by_name(const wimlib_tchar *path);
3962 
3981 extern int
3982 wimlib_set_image_descripton(WIMStruct *wim, int image,
3983  const wimlib_tchar *description);
3984 
4004 extern int
4005 wimlib_set_image_flags(WIMStruct *wim, int image, const wimlib_tchar *flags);
4006 
4028 extern int
4029 wimlib_set_image_name(WIMStruct *wim, int image, const wimlib_tchar *name);
4030 
4057 extern int
4058 wimlib_set_image_property(WIMStruct *wim, int image,
4059  const wimlib_tchar *property_name,
4060  const wimlib_tchar *property_value);
4061 
4090 extern int
4091 wimlib_set_memory_allocator(void *(*malloc_func)(size_t),
4092  void (*free_func)(void *),
4093  void *(*realloc_func)(void *, size_t));
4094 
4120 extern int
4121 wimlib_set_output_chunk_size(WIMStruct *wim, uint32_t chunk_size);
4122 
4129 extern int
4130 wimlib_set_output_pack_chunk_size(WIMStruct *wim, uint32_t chunk_size);
4131 
4151 extern int
4153  enum wimlib_compression_type ctype);
4154 
4161 extern int
4163  enum wimlib_compression_type ctype);
4164 
4187 extern int
4188 wimlib_set_print_errors(bool show_messages);
4189 
4213 extern int
4214 wimlib_set_wim_info(WIMStruct *wim, const struct wimlib_wim_info *info,
4215  int which);
4216 
4255 extern int
4256 wimlib_split(WIMStruct *wim,
4257  const wimlib_tchar *swm_name,
4258  uint64_t part_size,
4259  int write_flags);
4260 
4298 extern int
4299 wimlib_verify_wim(WIMStruct *wim, int verify_flags);
4300 
4334 extern int
4335 wimlib_unmount_image(const wimlib_tchar *dir, int unmount_flags);
4336 
4344 extern int
4345 wimlib_unmount_image_with_progress(const wimlib_tchar *dir,
4346  int unmount_flags,
4347  wimlib_progress_func_t progfunc,
4348  void *progctx);
4349 
4445 extern int
4447  int image,
4448  const struct wimlib_update_command *cmds,
4449  size_t num_cmds,
4450  int update_flags);
4451 
4513 extern int
4514 wimlib_write(WIMStruct *wim,
4515  const wimlib_tchar *path,
4516  int image,
4517  int write_flags,
4518  unsigned num_threads);
4519 
4540 extern int
4542  int fd,
4543  int image,
4544  int write_flags,
4545  unsigned num_threads);
4546 
4564 struct wimlib_compressor;
4565 
4567 struct wimlib_decompressor;
4568 
4598 extern int
4599 wimlib_set_default_compression_level(int ctype, unsigned int compression_level);
4600 
4609 extern uint64_t
4611  size_t max_block_size,
4612  unsigned int compression_level);
4613 
4614 #define WIMLIB_COMPRESSOR_FLAG_DESTRUCTIVE 0x80000000
4615 
4684 extern int
4686  size_t max_block_size,
4687  unsigned int compression_level,
4688  struct wimlib_compressor **compressor_ret);
4689 
4710 extern size_t
4711 wimlib_compress(const void *uncompressed_data, size_t uncompressed_size,
4712  void *compressed_data, size_t compressed_size_avail,
4713  struct wimlib_compressor *compressor);
4714 
4721 extern void
4722 wimlib_free_compressor(struct wimlib_compressor *compressor);
4723 
4757 extern int
4759  size_t max_block_size,
4760  struct wimlib_decompressor **decompressor_ret);
4761 
4789 extern int
4790 wimlib_decompress(const void *compressed_data, size_t compressed_size,
4791  void *uncompressed_data, size_t uncompressed_size,
4792  struct wimlib_decompressor *decompressor);
4793 
4800 extern void
4801 wimlib_free_decompressor(struct wimlib_decompressor *decompressor);
4802 
4803 
4809 #ifdef __cplusplus
4810 }
4811 #endif
4812 
4813 #endif /* _WIMLIB_H */