]> wimlib.net Git - wimlib/blobdiff - include/wimlib.h
Honor WIM_HDR_FLAG_READONLY
[wimlib] / include / wimlib.h
index 44008c789070797aaf4e895b58139cf64a48323e..b7a21cf443ecb078c0b7694cfd7bc6164f828b89 100644 (file)
@@ -223,7 +223,7 @@ enum wimlib_progress_msg {
 
        /** A WIM image is about to be extracted.  @a info will point to
         * ::wimlib_progress_info.extract. */
-       WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGIN,
+       WIMLIB_PROGRESS_MSG_EXTRACT_IMAGE_BEGIN = 0,
 
        /** A file or directory tree within a WIM image (not the full image) is
         * about to be extracted.  @a info will point to
@@ -299,18 +299,6 @@ 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
@@ -335,6 +323,19 @@ enum wimlib_progress_msg {
        /** A wimlib_split() operation is in progress, and a split part has been
         * finished. @a info will point to ::wimlib_progress_info.split. */
        WIMLIB_PROGRESS_MSG_SPLIT_END_PART,
+
+       /**
+        * 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 has just been executed; @a info will point to
+        * ::wimlib_progress_info.update.
+        */
+       WIMLIB_PROGRESS_MSG_UPDATE_END_COMMAND,
+
 };
 
 /** A pointer to this union is passed to the user-supplied
@@ -1021,6 +1022,7 @@ enum wimlib_error_code {
        WIMLIB_ERR_VOLUME_LACKS_FEATURES,
        WIMLIB_ERR_WRITE,
        WIMLIB_ERR_XML,
+       WIMLIB_ERR_WIM_IS_MARKED_READONLY,
 };
 
 
@@ -2274,8 +2276,7 @@ wimlib_resolve_image(WIMStruct *wim,
  *     @a boot_idx does not specify an existing image in @a wim, and it was not
  *     0.
  * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED
- *     @a wim is part of a split WIM.  We do not support changing the boot
- *     index of a split WIM.
+ *     @a wim is part of a split WIM.
  */
 extern int
 wimlib_set_boot_idx(WIMStruct *wim, int boot_idx);
@@ -2299,6 +2300,8 @@ wimlib_set_boot_idx(WIMStruct *wim, int boot_idx);
  * @retval ::WIMLIB_ERR_NOMEM
  *     Failed to allocate the memory needed to duplicate the @a description
  *     string.
+ * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED
+ *     @a wim is part of a split WIM.
  */
 extern int
 wimlib_set_image_descripton(WIMStruct *wim, int image,
@@ -2323,6 +2326,8 @@ wimlib_set_image_descripton(WIMStruct *wim, int image,
  *     @a image does not specify a single existing image in @a wim.
  * @retval ::WIMLIB_ERR_NOMEM
  *     Failed to allocate the memory needed to duplicate the @a flags string.
+ * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED
+ *     @a wim is part of a split WIM.
  */
 extern int wimlib_set_image_flags(WIMStruct *wim, int image,
                                  const wimlib_tchar *flags);
@@ -2337,17 +2342,19 @@ extern int wimlib_set_image_flags(WIMStruct *wim, int image,
  * @param image
  *     The number of the image for which to change the name.
  * @param name
- *     The new name to give the image.  It must be a nonempty string.
+ *     New 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.
  *
  * @return 0 on success; nonzero on error.
  * @retval ::WIMLIB_ERR_IMAGE_NAME_COLLISION
  *     There is already an image named @a name in @a wim.
- * @retval ::WIMLIB_ERR_INVALID_PARAM
- *     @a name was @c NULL or the empty string.
  * @retval ::WIMLIB_ERR_INVALID_IMAGE
  *     @a image does not specify a single existing image in @a wim.
  * @retval ::WIMLIB_ERR_NOMEM
  *     Failed to allocate the memory needed to duplicate the @a name string.
+ * @retval ::WIMLIB_ERR_SPLIT_UNSUPPORTED
+ *     @a wim is part of a split WIM.
  */
 extern int wimlib_set_image_name(WIMStruct *wim, int image,
                                 const wimlib_tchar *name);