index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-09-01 17:16:56 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-02 21:45:03 -0500 |
commit | 37da18aee8d925ee5cd9f526f2c61d07e9db5b66 (patch) | |
tree | 3ed740826f4463c8779080b07b57adbde1fe5c3b /lib/libalpm/handle.h | |
parent | d88e524e7c6e902dcf1c0afed52def0d8b430b25 (diff) |
-rw-r--r-- | lib/libalpm/handle.h | 24 |
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index 9e038581..8ceecd32 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -30,6 +30,25 @@ #include <curl/curl.h> #endif +#define EVENT(h, e, d1, d2) \ +do { \ + if((h)->eventcb) { \ + (h)->eventcb(e, d1, d2); \ + } \ +} while(0) +#define QUESTION(h, q, d1, d2, d3, r) \ +do { \ + if((h)->convcb) { \ + (h)->convcb(q, d1, d2, d3, r); \ + } \ +} while(0) +#define PROGRESS(h, e, p, per, n, r) \ +do { \ + if((h)->progresscb) { \ + (h)->progresscb(e, p, per, n, r); \ + } \ +} while(0) + struct __alpm_handle_t { /* internal usage */ alpm_db_t *db_local; /* local db pointer */ @@ -48,7 +67,10 @@ struct __alpm_handle_t { alpm_cb_log logcb; /* Log callback function */ alpm_cb_download dlcb; /* Download callback function */ alpm_cb_totaldl totaldlcb; /* Total download callback function */ - alpm_cb_fetch fetchcb; /* Download file callback function */ + alpm_cb_fetch fetchcb; /* Download file callback function */ + alpm_cb_event eventcb; + alpm_cb_conv convcb; + alpm_cb_progress progresscb; /* filesystem paths */ char *root; /* Root path, default '/' */ |