X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=include%2Fwimlib.h;h=44008c789070797aaf4e895b58139cf64a48323e;hb=ce7a3173855e654bf1aa52f1b7d7e676667192cd;hp=16f4ba9c2813be433b11c7b330c2c7ede4f249e7;hpb=e8c3ca2d1d0cac3d64985b45a9f654d2029a7518;p=wimlib diff --git a/include/wimlib.h b/include/wimlib.h index 16f4ba9c..44008c78 100644 --- a/include/wimlib.h +++ b/include/wimlib.h @@ -31,7 +31,7 @@ * * \section intro Introduction * - * This is the documentation for the library interface of wimlib 1.4.0, a C + * This is the documentation for the library interface of wimlib 1.4.1, a C * library for creating, modifying, extracting, and mounting files in the * Windows Imaging Format. This documentation is intended for developers only. * If you have installed wimlib and want to know how to use the @b wimlib-imagex @@ -164,7 +164,7 @@ #define WIMLIB_MINOR_VERSION 4 /** Patch version of the library (for example, the 5 in 1.2.5). */ -#define WIMLIB_PATCH_VERSION 0 +#define WIMLIB_PATCH_VERSION 1 /** * Opaque structure that represents a WIM file. This is an in-memory structure @@ -191,6 +191,15 @@ typedef wchar_t wimlib_tchar; typedef char wimlib_tchar; #endif +#ifdef __WIN32__ +/** Path separator for WIM paths passed back to progress callbacks. */ +# define WIMLIB_WIM_PATH_SEPARATOR '\\' +# define WIMLIB_WIM_PATH_SEPARATOR_STRING L"\\" +#else +/** Path separator for WIM paths passed back to progress callbacks. */ +# define WIMLIB_WIM_PATH_SEPARATOR '/' +# define WIMLIB_WIM_PATH_SEPARATOR_STRING "/" +#endif /** * Specifies the compression type of a WIM file. */ @@ -290,6 +299,18 @@ enum wimlib_progress_msg { * @a info will point to ::wimlib_progress_info.rename. */ WIMLIB_PROGRESS_MSG_RENAME, + /** + * A WIM update command is just about to be executed; @a info will point + * to ::wimlib_progress_info.update. + */ + WIMLIB_PROGRESS_MSG_UPDATE_BEGIN_COMMAND, + + /** + * A WIM update command is just about to be executed; @a info will point + * to ::wimlib_progress_info.update. + */ + WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND, + /** The contents of the WIM are being checked against the integrity * table. Only happens when wimlib_open_wim() is called with the * ::WIMLIB_OPEN_FLAG_CHECK_INTEGRITY flag. @a info will point to @@ -438,6 +459,22 @@ union wimlib_progress_info { const wimlib_tchar *to; } rename; + /** Valid on messages ::WIMLIB_PROGRESS_MSG_UPDATE_BEGIN_COMMAND and + * ::WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND. */ + struct wimlib_progress_info_update { + /** Pointer to the update command that will be executed or has + * just been executed. */ + const struct wimlib_update_command *command; + + /** Number of update commands that have been completed so far. + */ + size_t completed_commands; + + /** Number of update commands that are being executed as part of + * this call to wimlib_update_image(). */ + size_t total_commands; + } update; + /** Valid on messages ::WIMLIB_PROGRESS_MSG_VERIFY_INTEGRITY and * ::WIMLIB_PROGRESS_MSG_CALC_INTEGRITY. */ struct wimlib_progress_info_integrity { @@ -722,6 +759,18 @@ struct wimlib_capture_config { /** Extract files to standard output rather than to the filesystem. */ #define WIMLIB_EXTRACT_FLAG_TO_STDOUT 0x00000400 +/** Instead of ignoring files and directories with names that cannot be + * represented on the current platform (note: Windows has more restrictions on + * filenames than UNIX), try to replace characters or append junk to the names + * so that they can be extracted in some form. */ +#define WIMLIB_EXTRACT_FLAG_REPLACE_INVALID_FILENAMES 0x00000800 + +/** On Windows, when there exist two or more files with the same case + * insensitive name but different case sensitive names, try to extract them all + * by appending junk to the end of them, rather than arbitrarily extracting only + * one. */ +#define WIMLIB_EXTRACT_FLAG_ALL_CASE_CONFLICTS 0x00001000 + /****************************** * WIMLIB_MOUNT_FLAG_* ******************************/ @@ -779,6 +828,17 @@ struct wimlib_capture_config { /** See ::WIMLIB_WRITE_FLAG_RECOMPRESS */ #define WIMLIB_UNMOUNT_FLAG_RECOMPRESS 0x00000008 +/** Do a "lazy" unmount (detach filesystem immediately, even if busy) */ +#define WIMLIB_UNMOUNT_FLAG_LAZY 0x00000010 + +/****************************** + * WIMLIB_UPDATE_FLAG_* + ******************************/ + +/** Send ::WIMLIB_PROGRESS_MSG_UPDATE_BEGIN_COMMAND and + * ::WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND messages. */ +#define WIMLIB_UPDATE_FLAG_SEND_PROGRESS 0x00000001 + /****************************** * WIMLIB_WRITE_FLAG_* ******************************/ @@ -979,15 +1039,15 @@ enum wimlib_error_code { * Pointer to the ::WIMStruct for the WIM file to which the image is to be * added. * @param name - * Name to give the new image. + * Name to give the new image. If @c NULL or empty, the new image is given + * no name. If nonempty, it must specify a name that does not already + * exist in @a wim. * @param new_idx_ret * If non-NULL, the index of the newly added image is returned * in this location. * * @return 0 on success; nonzero on failure. The possible error codes are: * - * @retval ::WIMLIB_ERR_INVALID_PARAM - * @a name was @c NULL or an empty string. * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED * @a wim is part of a split WIM. * @retval ::WIMLIB_ERR_IMAGE_NAME_COLLISION @@ -1022,8 +1082,9 @@ wimlib_add_empty_image(WIMStruct *wim, * A path to a directory or unmounted NTFS volume that will be captured as * a WIM image. * @param name - * The name to give the image. It must be nonempty and must specify a name - * that does not yet exist in @a wim. + * Name to give the new image. If @c NULL or empty, the new image is given + * no name. If nonempty, it must specify a name that does not already + * exist in @a wim. * @param config * Capture configuration that specifies files, directories, or path globs * to exclude from being captured. If @c NULL, a dummy configuration where @@ -2468,7 +2529,7 @@ wimlib_unmount_image(const wimlib_tchar *dir, * @param num_cmds * Number of commands in @a cmds. * @param update_flags - * Reserved; must be 0. + * ::WIMLIB_UPDATE_FLAG_SEND_PROGRESS or 0. * @param progress_func * If non-NULL, a function that will be called periodically with the * progress of the current operation.