donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 7327be4c29fad5fb6a82fb0ad3f662d784bcc162
parent 45493fd318e35f0a0df4203ba875bbf8239cf302
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
Date:   Sun, 17 Dec 2023 17:37:13 +0100

[header] add bearer token to charity GET requests

Diffstat:
Msrc/include/donau_service.h | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/include/donau_service.h b/src/include/donau_service.h @@ -780,7 +780,7 @@ struct CharitySummary /** * charity id */ - unsigned int charity_id; + uint64_t charity_id; /** * charity name @@ -790,12 +790,12 @@ struct CharitySummary /** * Max donation amout for this charitiy and year. */ - struct TALER_Amount max; + struct TALER_Amount max_per_year; /** * Current donation amount for this charity and year. */ - struct TALER_Amount current; + struct TALER_Amount receipts_to_date; }; @@ -838,7 +838,7 @@ struct DONAU_GetCharitiesResponse /** * Number of charities */ - unsigned int num_charity; + uint64_t num_charity; } ok; @@ -870,9 +870,7 @@ typedef void * * @param ctx curl context * @param url donau base URL - * @param charity_pub public key of the charity to inspect - * @param timeout how long to wait for an affirmative reply - * (enables long polling if the charity does not yet exist) + * @param bearer for authentication * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. @@ -882,6 +880,7 @@ struct DONAU_CharitiesGetHandle * DONAU_charities_get ( struct GNUNET_CURL_Context *ctx, const char *url, + const struct DONAU_BearerToken bearer, DONAU_GetCharitiesResponseCallback cb, void *cb_cls); @@ -909,7 +908,7 @@ struct CharityHistoryYear /** * final donation amount at the end of @a year; */ - struct TALER_Amount amount; + struct TALER_Amount final_amount; }; @@ -931,12 +930,12 @@ struct Charity /** * Max donation amout for this charitiy and year. */ - struct TALER_Amount amount; + struct TALER_Amount max_per_year; /** * donation history */ - struct CharityHistoryYear *history; + struct CharityHistoryYear *donation_history; /** * number of charity history years @@ -1012,6 +1011,7 @@ typedef void * * @param ctx curl context * @param url donau base URL + * @param bearer for authentication * @param cb the callback to call when a reply for this request is available * @param cb_cls closure for the above callback * @return a handle for this request; NULL if the inputs are invalid (i.e. @@ -1021,6 +1021,7 @@ struct DONAU_CharityGetHandle * DONAU_charity_get ( struct GNUNET_CURL_Context *ctx, const char *url, + const struct DONAU_BearerToken bearer, DONAU_GetCharityResponseCallback cb, void *cb_cls);