mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-02-01 04:10:48 +00:00
* include/wget/wget.h (_wget_bar_ctx): Remove unused elements expected_size and filename. Rename slotpos to _slotpos to reflect that it should not be used by the client. * include/wget/wget.h: Remove declaration for old API functions bar_register and bar_deregister. Define declarations for wget_bar_slot_begin, wget_bar_slot_register and wget_bar_slot_deregister. * libwget/bar.c (_bar_slot_status_t): Define new enum to store the status of a slot of the progress bar. (_bar_slot_t): Remove unused element last_ctx. Also, define slot elements: filename, file_size, bytes_downloaded and status. (wget_bar_slot_begin): Define new function. Invoked when the client has started downloading a new file. (wget_bar_slot_register): New function to register a new file in a progress bar slot. (wget_bar_deregister): Remove old function (wget_bar_slot_deregister): New function, called after file has finished downloading. Successfully or unsuccessfully. (wget_bar_deregister): Remove old function (_bar_set_progress): last_ctx is no longer used. Instead data is stored within the slot struct itself (_bar_update_slot): Same (_bar_print_final): Same (wget_bar_deinit): Free the filename stored in the slot * src/bar.c: Edit to reflect the changes in libwget API * src/wget.c (_get_header): Same (http_send_request): Same (http_receive_response): Same * src/wget_bar.h: Same