2005-03-19 04:00:40 -05:00
|
|
|
/*
|
2007-04-25 20:02:07 -04:00
|
|
|
* callback.h
|
|
|
|
*
|
2016-01-02 22:48:43 -05:00
|
|
|
* Copyright (c) 2006-2016 Pacman Development Team <pacman-dev@archlinux.org>
|
2009-07-01 03:08:33 -04:00
|
|
|
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
2007-04-25 20:02:07 -04:00
|
|
|
*
|
2005-03-19 04:00:40 -05:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2007-12-10 23:55:22 -05:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-03-19 04:00:40 -05:00
|
|
|
*/
|
2016-09-03 23:14:49 -04:00
|
|
|
#ifndef PM_CALLBACK_H
|
|
|
|
#define PM_CALLBACK_H
|
2005-03-19 04:00:40 -05:00
|
|
|
|
2008-06-01 22:47:31 -04:00
|
|
|
#include <sys/types.h> /* off_t */
|
|
|
|
|
2007-03-05 20:21:41 -05:00
|
|
|
#include <alpm.h>
|
|
|
|
|
2011-09-01 18:35:50 -04:00
|
|
|
/* callback to handle messages/notifications from libalpm */
|
2014-01-10 10:25:14 -05:00
|
|
|
void cb_event(alpm_event_t *event);
|
2005-10-09 02:09:57 -04:00
|
|
|
|
2011-09-01 18:35:50 -04:00
|
|
|
/* callback to handle questions from libalpm (yes/no) */
|
2014-12-14 21:01:22 -05:00
|
|
|
void cb_question(alpm_question_t *question);
|
2005-03-19 04:00:40 -05:00
|
|
|
|
2011-09-01 18:35:50 -04:00
|
|
|
/* callback to handle display of progress */
|
|
|
|
void cb_progress(alpm_progress_t event, const char *pkgname, int percent,
|
2010-12-08 00:13:36 -05:00
|
|
|
size_t howmany, size_t remain);
|
2006-10-15 15:34:52 -04:00
|
|
|
|
2008-06-02 00:10:30 -04:00
|
|
|
/* callback to handle receipt of total download value */
|
|
|
|
void cb_dl_total(off_t total);
|
2007-04-25 20:02:07 -04:00
|
|
|
/* callback to handle display of download progress */
|
2008-06-01 22:47:31 -04:00
|
|
|
void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total);
|
2007-04-25 20:02:07 -04:00
|
|
|
|
2014-09-28 17:45:35 -04:00
|
|
|
/* callback to handle messages/notifications from pacman library */
|
|
|
|
__attribute__((format(printf, 2, 0)))
|
|
|
|
void cb_log(alpm_loglevel_t level, const char *fmt, va_list args);
|
|
|
|
|
2016-09-03 23:14:49 -04:00
|
|
|
#endif /* PM_CALLBACK_H */
|
2005-03-19 04:00:40 -05:00
|
|
|
|
2014-01-22 18:06:11 -05:00
|
|
|
/* vim: set noet: */
|