Improved callback/states support to make libxbps std{err,out} printf free.

This is a major API/ABI change, documentation has been updated accordingly.
This commit is contained in:
Juan RP
2011-11-24 11:23:08 +01:00
parent 4ed6b5ed2c
commit 3ccfec7054
29 changed files with 910 additions and 726 deletions

View File

@ -161,13 +161,13 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
xhp->debug = debug;
xhp->xbps_state_cb = state_cb;
xhp->xbps_fetch_cb = fetch_file_progress_cb;
xhp->xfcd->cookie = &xfer;
xhp->state_cb = state_cb;
xhp->fetch_cb = fetch_file_progress_cb;
xhp->fetch_cb_data = &xfer;
if (flags & XBPS_FLAG_VERBOSE)
xhp->xbps_unpack_cb = unpack_progress_cb_verbose;
xhp->unpack_cb = unpack_progress_cb_verbose;
else
xhp->xbps_unpack_cb = unpack_progress_cb;
xhp->unpack_cb = unpack_progress_cb;
if (rootdir)
xhp->rootdir = prop_string_create_cstring(rootdir);