Share transaction callbacks for xbps-{bin,repo}, reposync cb support.

This commit is contained in:
Juan RP
2011-07-28 09:25:30 +02:00
parent d7d077a377
commit 6f783389dd
15 changed files with 199 additions and 153 deletions

View File

@ -35,16 +35,16 @@
#include "xbps_api_impl.h"
#define RUN_TRANS_CB(s, d, p, bf, burl) \
do { \
if (xhp->xbps_transaction_cb != NULL) { \
xhp->xtcd->state = s; \
xhp->xtcd->desc = d; \
xhp->xtcd->pkgver = p; \
xhp->xtcd->binpkg_fname = bf; \
xhp->xtcd->binpkg_repourl = burl; \
(*xhp->xbps_transaction_cb)(xhp->xtcd); \
} \
#define RUN_TRANS_CB(s, d, p, bf, burl) \
do { \
if (xhp->xbps_transaction_cb != NULL) { \
xhp->xtcd->state = s; \
xhp->xtcd->desc = d; \
xhp->xtcd->pkgver = p; \
xhp->xtcd->binpkg_fname = bf; \
xhp->xtcd->repourl = burl; \
(*xhp->xbps_transaction_cb)(xhp->xtcd); \
} \
} while (0)
#define RUN_TRANS_ERR_CB(s, p, r) \