summaryrefslogtreecommitdiffstats
path: root/src/pacman/callback.h
AgeCommit message (Collapse)AuthorFilesLines
2017-01-04Update copyright yearsAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25Do not #define _RESERVED_IDENTIFIERSIvy Foster1-3/+3
Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04Update copyright years for 2016Allan McRae1-1/+1
make update-copyright OLD=2015 NEW=2016 Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01Update copyright notices for 2015Allan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18Fix pointer declarations to be globally consistentMicah Saint Germain1-1/+1
Refactored inconsistent pointer declarations to better improve consistency throughout the pacman codebase which will, in turn, increase readability to the user. Expected format of a pointer declaration: `typename *varname` Signed-off-by: Micah Saint Germain <micah@lexme.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-30Revert "Remove log_cb, add ALPM_EVENT_LOG instead"Andrew Gregory1-0/+4
Moving logging to the event callback caused warnings under clang due to non-literal format strings and silenced all log messages when --print was used. This reverts commit cd793c5ab7689cc8cbc18277375b368060e5acfe. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Conflicts: lib/libalpm/alpm.h src/pacman/callback.c Signed-off-by: Allan McRae <allan@archlinux.org>
2014-06-24Update the question callbackOlivier Brunel1-2/+1
Much like with events, instead of using a bunch of void* arguments for all questions, we now send one pointer to an alpm_question_t union. This contains the type of question that was triggered. With this information, a question-specific struct can be accessed in order to get additional arguments. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Remove log_cb, add ALPM_EVENT_LOG insteadOlivier Brunel1-4/+0
When ALPM emits a log message, it still goes through _alpm_log() but instead of calling a specific log callback, it goes as an event. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-03-03Update the event callbackOlivier Brunel1-1/+1
Instead of using two void* arguments for all events, we now send one pointer to an alpm_event_t struct. This contains the type of event that was triggered. With this information, the pointer can then be typecasted to the event-specific struct in order to get additional arguments. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz1-1/+1
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06Update copyright years for 2014Allan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-13Add format attributes to all required functionsAllan McRae1-0/+1
Fixes all clang warnings with -Wformat-literal. Also, fix genuine formating issue discovered once adding these attributes and add a cast to prevent a gcc warning. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-03Update copyright year for 2013Allan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-02-20Update copyright yearsAllan McRae1-1/+1
Add 2012 to the copyright range for all libalpm and pacman source files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-03Former transaction callback rename refactorDan McGee1-6/+6
Put all the callback stuff in alpm.h in one spot, and make the following renames for clarity with the new structure: ALPM_TRANS_EVT_* --> ALPM_EVENT_* ALPM_TRANS_CONV_* --> ALPM_QUESTION_* ALPM_TRANS_PROGRESS_* --> ALPM_PROGRESS_* alpm_option_get_convcb() --> alpm_option_get_questioncb() alpm_option_set_convcb() --> alpm_option_set_questioncb() Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-28Rename pmtransprog_t to alpm_transprog_tAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransconv_t to alpm_transconv_tAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmtransevt_t to alpm_transevt_tAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-28Rename pmloglevel_t to alpm_loglevel_tAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-02-24Mark log callback format string constDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-08Use size_t for alpm_list sizesAllan McRae1-1/+1
There is a lot of swtiching between size_t and int for alpm_list sizes in the codebase. Start converting these to all be size_t by adjusting the return type of alpm_list_count and fixing all additional warnings given by -Wconversion that are generated by this change. Dan: a few more small changes to ensure things compile, adjusting some printf format string characters to accommodate the larger size on x86_64. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-08Update copyright years for 2011Allan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-15Bump copyright dates to 2010Dan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01Update copyright headers and messagesDan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04Reimplement TotalDownload functionalityDan McGee1-0/+2
Add a new totaldlcb callback function to libalpm and make pacman utilize it when the TotalDownload option is enabled. This callback function is pretty simple- it is meant to be called once at the beginning of a "list download" action, and once at the end (with value 0 to indicate the list has been finished). The frontend is responsible for keeping track of adding individual file download amounts to the total xfered amount in order to display some sort of overall progress. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-04Use correct C type for file sizesDan McGee1-1/+3
We have been using unsigned long as a file size type for a while, which works but isn't quite correct and could easily break. Worse was probably our use of int in the download callback functions, which could be restrictive for packages > 2GB in size. Switch all file size variables to use off_t, which is the preferred type for file sizes. Note that at least on Linux, all applications compiled against libalpm must now be sure to use large file support, where _FILE_OFFSET_BITS is defined to be 64 or there will be some weird issues that crop up. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-28Start removing some junk from the function templateDan McGee1-2/+1
I screwed up originally when I accepted the TotalDownload patch, 8ec27835f40e3df1ce409bc3d913587c474a30c3. I didn't realize how deeply it modified libalpm and I probably shouldn't have let it do what it did. This commit reverts much of what that patch added in order to clean up our internal function calls. We can find another way to do it right down the road here but for now it has to go. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-11Update GNU GPL boilerplate and copyright datesDan McGee1-3/+1
Update the GPL boilerplate to direct people to the GNU website for a copy of the license, as well as bump all of Judd's copyrights to 2007. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-11Implement TotalDownload option.Nathan Jones1-1/+2
Setting this option will change the download progress to show the amount downloaded, download rate, ETA, and download percent of the entire download list rather than per each individual file. The progress bar is still based on the completion of the current file regardless if the TotalDownload option is set. This closes FS#7205. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Remove logmask stuff from backend; switch logging callback to new pm_printfDan McGee1-1/+1
Remove the logmask functionality from the backend as it has been moved to the frontend, and change the logging callback function to use pm_printf. In addition, make much better use of va_list- use the args list instead of a arbitrarily chosen string to print to in the logging functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Set the correct type on the log callback functionDan McGee1-1/+1
Somehow missed this earlier when changing everything to types. unsigned short -> pmloglevel_t wherever necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Pacman side code consolidation- unify callback functions to one fileDan McGee1-0/+45
Some more major code reorginization here. The download progress callback function has been renamed and moved to callback.c, which is the former trans.c with the download and log callbacks added. In addition, this allows util.c to be cleaned up as fill_progress can now be static in callback.c. We've also cut two more source files out. Signed-off-by: Dan McGee <dan@archlinux.org>