cash2ecash

cash2ecash: cash acceptor that issues digital cash (experimental)
Log | Files | Refs | README | LICENSE

commit ba72783dfaa0a86792df2c5adce108d5e51fd1b1
parent 01d76ab69fa5f99e3a66d6bd3e9e87699f3fd352
Author: Tellenbach Reto <tellr1@bfh.ch>
Date:   Mon,  8 Jun 2026 09:54:34 +0200

[new] Tapler-api: GET /withdrawals api implmentation done

Diffstat:
Msrc/lib/bank_api_get_withdrawals.c | 21++++++++++++++++-----
Msrc/lib/bank_api_get_withdrawals.h | 5++++-
2 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/lib/bank_api_get_withdrawals.c b/src/lib/bank_api_get_withdrawals.c @@ -214,9 +214,9 @@ struct TALER_BANK_GetWithdrawalHandle * TALER_BANK_get_withdrawal ( struct GNUNET_CURL_Context *ctx, const char *base_url, const char *wopid, - TALER_BANK_WithdrawalCallback withdrawals_cb, - void *withdrawals_cb_cls) + void *withdrawals_cb_cls, + const unsigned long *timeout_ms) { struct TALER_BANK_GetWithdrawalHandle *withdrawal; char *url; @@ -229,9 +229,20 @@ TALER_BANK_get_withdrawal ( struct GNUNET_CURL_Context *ctx, GNUNET_asprintf(&url, "withdrawals/%s", wopid); - withdrawal->job_url = TALER_url_join(base_url, - url, - NULL); + if (NULL != timeout_ms) + { + withdrawal->job_url = TALER_url_join(base_url, + url, + "timeout_ms", + *timeout_ms, + NULL); + } + else + { + withdrawal->job_url = TALER_url_join(base_url, + url, + NULL); + } if(NULL == withdrawal->job_url) { GNUNET_break(0); diff --git a/src/lib/bank_api_get_withdrawals.h b/src/lib/bank_api_get_withdrawals.h @@ -135,6 +135,8 @@ struct TALER_BANK_GetWithdrawalHandle; * @param wopid withdrawal operation id * @param withdrawal_cb callback * @param withdrawal_cb_cls callback context + * @param timeout_ms timeout to long-polling, + * ignored when NULL, therfor no long-poll * @return NULL on failure */ struct TALER_BANK_GetWithdrawalHandle * @@ -142,7 +144,8 @@ TALER_BANK_get_withdrawal ( struct GNUNET_CURL_Context *ctx, const char *base_url, const char *wopid, TALER_BANK_WithdrawalCallback withdrawals_cb, - void *withdrawals_cb_cls); + void *withdrawals_cb_cls, + const unsigned long *timeout_ms); /**