1ZIP_REGISTER_CANCEL_C... BSD Library Functions Manual ZIP_REGISTER_CANCEL_C...
2
4 zip_register_cancel_callback_with_state — allow cancelling during
5 zip_close
6
8 libzip (-lzip)
9
11 #include <zip.h>
12
13 typedef void (*zip_cancel_callback)(zip_t *, double, void *);
14
15 void
16 zip_register_cancel_callback_with_state(zip_t *archive,
17 zip_cancel_callback callback, void (*ud_free)(void *), void *ud);
18
20 This function can be used to cancel writing of a zip archive during
21 zip_close(3).
22
23 The zip_register_cancel_callback_with_state() function registers a call‐
24 back function callback for the zip archive archive. The ud_free function
25 is called during cleanup for deleting the userdata supplied in ud.
26
27 The callback function is called during zip_close(3) in regular intervals
28 (after every zip archive entry that's completely written to disk, and
29 while writing data for entries) with zip archive archive, the current
30 progress state (see zip_register_progress_callback_with_state(3)) as a
31 double, and the user-provided user-data ud as arguments. The progress
32 state is a double in the range from 0.0 to 1.0.
33
34 The callback function should be fast, since it will be called often.
35
37 libzip(3), zip_close(3), zip_register_progress_callback_with_state(3)
38
40 zip_register_cancel_callback_with_state() was added in libzip 1.6.0.
41
43 Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
44
45BSD April 6, 2021 BSD