From a26095f8fc27eb564fd5b49c0d99e7821c21e2e8 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Wed, 4 May 2005 19:55:23 +0000 Subject: event transaction callback rework to prepare the introduction of a conversation callback --- lib/libalpm/trans.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libalpm/trans.h') diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h index 403cf116..96b9083b 100644 --- a/lib/libalpm/trans.h +++ b/lib/libalpm/trans.h @@ -36,7 +36,7 @@ typedef struct __pmtrans_t { unsigned char state; PMList *targets; /* PMList of (char *) */ PMList *packages; /* PMList of (pmpkg_t *) or (pmsyncpkg_t *) */ - alpm_trans_cb cb; + alpm_trans_cb_event cb_event; } pmtrans_t; #define FREETRANS(p) \ @@ -46,16 +46,16 @@ do { \ p = NULL; \ } \ } while (0) -#define TRANS_CB(t, e, d1, d2) \ +#define EVENT(t, e, d1, d2) \ do { \ - if((t) && (t)->cb) { \ - (t)->cb(e, d1, d2); \ + if((t) && (t)->cb_event) { \ + (t)->cb_event(e, d1, d2); \ } \ } while(0) pmtrans_t *trans_new(); void trans_free(pmtrans_t *trans); -int trans_init(pmtrans_t *trans, unsigned char type, unsigned char flags, alpm_trans_cb cb); +int trans_init(pmtrans_t *trans, unsigned char type, unsigned char flags, alpm_trans_cb_event event); int trans_sysupgrade(pmtrans_t *trans); int trans_addtarget(pmtrans_t *trans, char *target); int trans_prepare(pmtrans_t *trans, PMList **data); -- cgit v1.2.3-24-g4f1b