diff options
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r-- | lib/libalpm/handle.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index b9d71db8..bc968c72 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -166,6 +166,24 @@ alpm_cb_totaldl SYMEXPORT alpm_option_get_totaldlcb(alpm_handle_t *handle) return handle->totaldlcb; } +alpm_cb_event SYMEXPORT alpm_option_get_eventcb(alpm_handle_t *handle) +{ + CHECK_HANDLE(handle, return NULL); + return handle->eventcb; +} + +alpm_cb_conv SYMEXPORT alpm_option_get_convcb(alpm_handle_t *handle) +{ + CHECK_HANDLE(handle, return NULL); + return handle->convcb; +} + +alpm_cb_progress SYMEXPORT alpm_option_get_progresscb(alpm_handle_t *handle) +{ + CHECK_HANDLE(handle, return NULL); + return handle->progresscb; +} + const char SYMEXPORT *alpm_option_get_root(alpm_handle_t *handle) { CHECK_HANDLE(handle, return NULL); @@ -290,6 +308,27 @@ int SYMEXPORT alpm_option_set_totaldlcb(alpm_handle_t *handle, alpm_cb_totaldl c return 0; } +int SYMEXPORT alpm_option_set_eventcb(alpm_handle_t *handle, alpm_cb_event cb) +{ + CHECK_HANDLE(handle, return -1); + handle->eventcb = cb; + return 0; +} + +int SYMEXPORT alpm_option_set_convcb(alpm_handle_t *handle, alpm_cb_conv cb) +{ + CHECK_HANDLE(handle, return -1); + handle->convcb = cb; + return 0; +} + +int SYMEXPORT alpm_option_set_progresscb(alpm_handle_t *handle, alpm_cb_progress cb) +{ + CHECK_HANDLE(handle, return -1); + handle->progresscb = cb; + return 0; +} + static char *canonicalize_path(const char *path) { char *new_path; size_t len; |