diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-11-25 21:19:13 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-11-25 21:19:13 +0100 |
commit | fd91a6adede7af1f477f8858a7109351d9899417 (patch) | |
tree | 4845cc9411576a99bbc2ac75e95b78150ed1c692 /src/lib/exchange_api_auditor_add_denomination.c | |
parent | 87bc48f5138e65f900d581e902c8f6f07cdd0a6c (diff) | |
download | exchange-fd91a6adede7af1f477f8858a7109351d9899417.tar.gz exchange-fd91a6adede7af1f477f8858a7109351d9899417.tar.bz2 exchange-fd91a6adede7af1f477f8858a7109351d9899417.zip |
implement first new client API
Diffstat (limited to 'src/lib/exchange_api_auditor_add_denomination.c')
-rw-r--r-- | src/lib/exchange_api_auditor_add_denomination.c | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/src/lib/exchange_api_auditor_add_denomination.c b/src/lib/exchange_api_auditor_add_denomination.c index a4d85f8f3..ce18c3d5e 100644 --- a/src/lib/exchange_api_auditor_add_denomination.c +++ b/src/lib/exchange_api_auditor_add_denomination.c @@ -29,7 +29,34 @@ /** * @brief Handle for a POST /auditor/$AUDITOR_PUB/$H_DENOM_PUB request. */ -struct TALER_EXCHANGE_AuditorAddDenominationHandle; +struct TALER_EXCHANGE_AuditorAddDenominationHandle +{ + + /** + * The url for this request. + */ + char *url; + + /** + * Handle for the request. + */ + struct GNUNET_CURL_Job *job; + + /** + * Function to call with the result. + */ + TALER_EXCHANGE_AuditorAddDenominationCallback cb; + + /** + * Closure for @a cb. + */ + void *cb_cls; + + /** + * Reference to the execution context. + */ + struct GNUNET_CURL_Context *ctx; +}; /** @@ -58,8 +85,17 @@ TALER_EXCHANGE_add_auditor_denomination ( /** * Cancel #TALER_EXCHANGE_add_auditor_denomination() operation. * - * @param gh handle of the operation to cancel + * @param ah handle of the operation to cancel */ void TALER_EXCHANGE_add_auditor_denomination_cancel ( - struct TALER_EXCHANGE_AuditorAddDenominationHandle *ah); + struct TALER_EXCHANGE_AuditorAddDenominationHandle *ah) +{ + if (NULL != ah->job) + { + GNUNET_CURL_job_cancel (ah->job); + ah->job = NULL; + } + GNUNET_free (ah->url); + GNUNET_free (ah); +} |