2005-03-19 04:00:40 -05:00
|
|
|
/*
|
2007-04-25 20:02:07 -04:00
|
|
|
* callback.h
|
|
|
|
*
|
2011-01-05 23:45:15 -05:00
|
|
|
* Copyright (c) 2006-2011 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
|
|
|
*/
|
2007-04-25 20:02:07 -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 */
|
|
|
|
void cb_event(alpm_event_t event, void *data1, void *data2);
|
2005-10-09 02:09:57 -04:00
|
|
|
|
2011-09-01 18:35:50 -04:00
|
|
|
/* callback to handle questions from libalpm (yes/no) */
|
|
|
|
void cb_question(alpm_question_t event, void *data1, void *data2,
|
2007-01-23 22:02:53 -05:00
|
|
|
void *data3, int *response);
|
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
|
|
|
|
|
|
|
/* callback to handle messages/notifications from pacman library */
|
2011-06-28 00:41:07 -04:00
|
|
|
void cb_log(alpm_loglevel_t level, const char *fmt, va_list args);
|
2007-04-25 20:02:07 -04:00
|
|
|
|
|
|
|
#endif /* _PM_CALLBACK_H */
|
2005-03-19 04:00:40 -05:00
|
|
|
|
|
|
|
/* vim: set ts=2 sw=2 noet: */
|