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_management_revoke_denomination_key.c | |
parent | 87bc48f5138e65f900d581e902c8f6f07cdd0a6c (diff) | |
download | exchange-fd91a6adede7af1f477f8858a7109351d9899417.tar.xz |
implement first new client API
Diffstat (limited to 'src/lib/exchange_api_management_revoke_denomination_key.c')
-rw-r--r-- | src/lib/exchange_api_management_revoke_denomination_key.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/lib/exchange_api_management_revoke_denomination_key.c b/src/lib/exchange_api_management_revoke_denomination_key.c index 8eb3a05e0..8a7404e5b 100644 --- a/src/lib/exchange_api_management_revoke_denomination_key.c +++ b/src/lib/exchange_api_management_revoke_denomination_key.c @@ -29,7 +29,34 @@ /** * @brief Handle for a POST /management/denominations/$H_DENOM_PUB/revoke request. */ -struct TALER_EXCHANGE_ManagementRevokeDenominationKeyHandle; +struct TALER_EXCHANGE_ManagementRevokeDenominationKeyHandle +{ + + /** + * The url for this request. + */ + char *url; + + /** + * Handle for the request. + */ + struct GNUNET_CURL_Job *job; + + /** + * Function to call with the result. + */ + TALER_EXCHANGE_ManagementRevokeDenominationKeyCallback cb; + + /** + * Closure for @a cb. + */ + void *cb_cls; + + /** + * Reference to the execution context. + */ + struct GNUNET_CURL_Context *ctx; +}; /** @@ -60,4 +87,13 @@ TALER_EXCHANGE_management_revoke_denomination_key ( */ void TALER_EXCHANGE_management_revoke_denomination_key_cancel ( - struct TALER_EXCHANGE_ManagementRevokeDenominationKeyHandle *rh); + struct TALER_EXCHANGE_ManagementRevokeDenominationKeyHandle *rh) +{ + if (NULL != rh->job) + { + GNUNET_CURL_job_cancel (rh->job); + rh->job = NULL; + } + GNUNET_free (rh->url); + GNUNET_free (rh); +} |