From 37da18aee8d925ee5cd9f526f2c61d07e9db5b66 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 1 Sep 2011 17:16:56 -0500 Subject: Move all callbacks up to the handle level This was just disgusting before, unnecessary to limit these to only usage in a transaction. Still a lot of more room for cleanup but we'll start by attaching them to the handle rather than the transaction we may or may not even want to use these callbacks. Signed-off-by: Dan McGee --- lib/libalpm/trans.h | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'lib/libalpm/trans.h') diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h index 6d5c08d1..a2be5a5c 100644 --- a/lib/libalpm/trans.h +++ b/lib/libalpm/trans.h @@ -42,34 +42,10 @@ struct __alpm_trans_t { alpm_list_t *add; /* list of (alpm_pkg_t *) */ alpm_list_t *remove; /* list of (alpm_pkg_t *) */ alpm_list_t *skip_remove; /* list of (char *) */ - alpm_trans_cb_event cb_event; - alpm_trans_cb_conv cb_conv; - alpm_trans_cb_progress cb_progress; }; -#define EVENT(t, e, d1, d2) \ -do { \ - if((t)->cb_event) { \ - (t)->cb_event(e, d1, d2); \ - } \ -} while(0) -#define QUESTION(t, q, d1, d2, d3, r) \ -do { \ - if((t)->cb_conv) { \ - (t)->cb_conv(q, d1, d2, d3, r); \ - } \ -} while(0) -#define PROGRESS(t, e, p, per, h, r) \ -do { \ - if((t)->cb_progress) { \ - (t)->cb_progress(e, p, per, h, r); \ - } \ -} while(0) - void _alpm_trans_free(alpm_trans_t *trans); -int _alpm_trans_init(alpm_trans_t *trans, alpm_transflag_t flags, - alpm_trans_cb_event event, alpm_trans_cb_conv conv, - alpm_trans_cb_progress progress); +int _alpm_trans_init(alpm_trans_t *trans, alpm_transflag_t flags); int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn, const char *script, const char *ver, const char *oldver); -- cgit v1.2.3-24-g4f1b