diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-12-28 11:14:00 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-12-28 11:14:00 +0100 |
commit | aff9dc18485bc57755096aa5b69ed1e16cb1a32b (patch) | |
tree | 400a600618b7f9fcf72b90da2abfee19375a9a33 | |
parent | 9facc2d3811be421f0ad4a2a3b3be4f266efb904 (diff) | |
download | exchange-aff9dc18485bc57755096aa5b69ed1e16cb1a32b.tar.xz |
-define purse deletion C API
-rw-r--r-- | src/include/taler_exchange_service.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 7ad1c2a2d..0e33f7770 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -4943,6 +4943,65 @@ TALER_EXCHANGE_purse_create_with_deposit_cancel ( /** + * Response generated for a purse deletion request. + */ +struct TALER_EXCHANGE_PurseDeleteResponse +{ + /** + * Full HTTP response. + */ + struct TALER_EXCHANGE_HttpResponse hr; +}; + + +/** + * Function called with information about the deletion + * of a purse. + * + * @param cls closure + * @param pdr HTTP response data + */ +typedef void +(*TALER_EXCHANGE_PurseDeleteCallback) ( + void *cls, + const struct TALER_EXCHANGE_PurseDeleteResponse *pdr); + + +/** + * @brief Handle for a DELETE /purses/$PID request. + */ +struct TALER_EXCHANGE_PurseDeleteHandle; + + +/** + * Asks the exchange to delete a purse. Will only succeed if + * the purse was not yet merged and did not yet time out. + * + * @param exchange the exchange to interact with + * @param purse_priv private key of the purse + * @param cb function to call with the exchange's result + * @param cb_cls closure for @a cb + * @return the request handle; NULL upon error + */ +struct TALER_EXCHANGE_PurseCreateDepositHandle * +TALER_EXCHANGE_purse_delete ( + struct TALER_EXCHANGE_Handle *exchange, + const struct TALER_PurseContractPrivateKeyP *purse_priv, + TALER_EXCHANGE_PurseDeleteCallback cb, + void *cb_cls); + + +/** + * Cancel #TALER_EXCHANGE_purse_delete() operation. + * + * @param pdh handle of the operation to cancel + */ +void +TALER_EXCHANGE_purse_delete_cancel ( + struct TALER_EXCHANGE_PurseDeleteHandle *pdh); + + +/** * Response generated for an account merge request. */ struct TALER_EXCHANGE_AccountMergeResponse |