diff options
author | Dan McGee <dan@archlinux.org> | 2011-09-02 00:16:56 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-03 04:45:03 +0200 |
commit | 37da18aee8d925ee5cd9f526f2c61d07e9db5b66 (patch) | |
tree | 3ed740826f4463c8779080b07b57adbde1fe5c3b /lib/libalpm/trans.h | |
parent | d88e524e7c6e902dcf1c0afed52def0d8b430b25 (diff) | |
download | pacman-37da18aee8d925ee5cd9f526f2c61d07e9db5b66.tar.gz pacman-37da18aee8d925ee5cd9f526f2c61d07e9db5b66.tar.xz |
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/trans.h')
-rw-r--r-- | lib/libalpm/trans.h | 26 |
1 files changed, 1 insertions, 25 deletions
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); |