Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.h')
-rw-r--r--lib/libalpm/handle.h24
1 files changed, 23 insertions, 1 deletions
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 '/' */