1ZIP_REGISTER_CANCEL_C... BSD Library Functions Manual ZIP_REGISTER_CANCEL_C...
2

NAME

4     zip_register_cancel_callback_with_state — allow cancelling during
5     zip_close
6

LIBRARY

8     libzip (-lzip)
9

SYNOPSIS

11     #include <zip.h>
12
13     typedef int (*zip_cancel_callback)(zip_t *, 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

DESCRIPTION

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 and the user-
30     provided user-data ud as arguments.  When the callback function returns a
31     non-zero value, writing is cancelled and zip_close(3) returns an error.
32
33     The callback function should be fast, since it will be called often.
34

SEE ALSO

36     libzip(3), zip_close(3), zip_register_progress_callback_with_state(3)
37

HISTORY

39     zip_register_cancel_callback_with_state() was added in libzip 1.6.0.
40

AUTHORS

42     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
43
44BSD                              June 18, 2022                             BSD
Impressum