exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 080cc5ac08d98eed92b39ef6ea66c66e6ff4f081
parent d2a1c511389e3f64d963d8a0c58f1690c8d0c378
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 11 Jul 2026 13:44:22 +0200

improve closure types

Diffstat:
Msrc/auditor/taler-auditor-httpd_get-monitoring-amount-arithmetic-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-bad-sig-losses.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-balances.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-closure-lags.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-coin-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.c | 8+++++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-denomination-pending.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-denominations-without-sigs.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-deposit-confirmations.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-early-aggregation.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-emergency-by-count.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-emergency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-fee-time-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-historic-denomination-revenue.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-historic-reserve-summary.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-misattribution-in-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-pending-deposits.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-progress.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-purses.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserve-balance-insufficient-inconsistency.c | 8+++++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserve-balance-summary-wrong-inconsistency.c | 8+++++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-reserves.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-row-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-row-minor-inconsistencies.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-wire-format-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-httpd_get-monitoring-wire-out-inconsistency.c | 6+++---
Msrc/auditor/taler-auditor-sync.c | 7++++---
Msrc/auditor/taler-helper-auditor-aggregation.c | 17+++++++++++------
Msrc/auditor/taler-helper-auditor-coins.c | 62+++++++++++++++++++++++++++++++-------------------------------
Msrc/auditor/taler-helper-auditor-purses.c | 44+++++++++++++++++++++++---------------------
Msrc/auditor/taler-helper-auditor-reserves.c | 47++++++++++++++++++++++++++---------------------
Msrc/auditor/taler-helper-auditor-transfer.c | 15+++++++++------
Msrc/auditor/taler-helper-auditor-wire-debit.c | 9++++++---
Msrc/exchange/taler-exchange-aggregator.c | 9+++++----
Msrc/exchange/taler-exchange-httpd_common_kyc.c | 8+++++---
Msrc/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-accounts.c | 8++++----
Msrc/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.c | 13+++++++------
Msrc/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-decisions.c | 7+++----
Msrc/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-kyc-statistics-NAMES.c | 7+++----
Msrc/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-legitimizations.c | 7+++----
Msrc/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-transfers.c | 8++++++--
Msrc/exchange/taler-exchange-httpd_get-keys.c | 51+++++++++++++++++++++++++++------------------------
Msrc/exchange/taler-exchange-httpd_get-kyc-info-ACCESS_TOKEN.c | 7++++---
Msrc/exchange/taler-exchange-httpd_get-reserves-RESERVE_PUB-attest.c | 7++++---
Msrc/exchange/taler-exchange-httpd_get-transfers-WTID.c | 15++++++++-------
Msrc/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-attest.c | 7++++---
Msrc/include/auditor-database/get_amount_arithmetic_inconsistency.h | 11+++++++++--
Msrc/include/auditor-database/get_auditor_closure_lags.h | 13++++++++++---
Msrc/include/auditor-database/get_bad_sig_losses.h | 13++++++++++---
Msrc/include/auditor-database/get_balances.h | 12+++++++++---
Msrc/include/auditor-database/get_coin_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_denomination_key_validity_withdraw_inconsistency.h | 19+++++++++++++++----
Msrc/include/auditor-database/get_denomination_pending.h | 13++++++++++---
Msrc/include/auditor-database/get_denominations_without_sigs.h | 13++++++++++---
Msrc/include/auditor-database/get_deposit_confirmations.h | 10++++++++--
Msrc/include/auditor-database/get_emergency.h | 13++++++++++---
Msrc/include/auditor-database/get_emergency_by_count.h | 13++++++++++---
Msrc/include/auditor-database/get_exchange_signkeys.h | 10++++++++--
Msrc/include/auditor-database/get_fee_time_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_misattribution_in_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_progress_points.h | 13++++++++++---
Msrc/include/auditor-database/get_purse_not_closed_inconsistencies.h | 13++++++++++---
Msrc/include/auditor-database/get_purses.h | 12+++++++++---
Msrc/include/auditor-database/get_reserve_balance_insufficient_inconsistency.h | 18+++++++++++++++---
Msrc/include/auditor-database/get_reserve_balance_summary_wrong_inconsistency.h | 18+++++++++++++++---
Msrc/include/auditor-database/get_reserve_in_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_reserve_not_closed_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_reserves.h | 12+++++++++---
Msrc/include/auditor-database/get_row_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_row_minor_inconsistencies.h | 13++++++++++---
Msrc/include/auditor-database/get_wire_format_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/get_wire_out_inconsistency.h | 13++++++++++---
Msrc/include/auditor-database/select_early_aggregations.h | 10++++++++--
Msrc/include/auditor-database/select_historic_denom_revenue.h | 13++++++++++---
Msrc/include/auditor-database/select_historic_reserve_revenue.h | 13++++++++++---
Msrc/include/auditor-database/select_pending_deposits.h | 13++++++++++---
Msrc/include/auditor-database/select_purse_expired.h | 13++++++++++---
Msrc/include/exchange-database/get_expired_reserves.h | 11+++++++++--
Msrc/include/exchange-database/get_global_fees.h | 13++++++++++---
Msrc/include/exchange-database/get_unfinished_close_requests.h | 11+++++++++--
Msrc/include/exchange-database/get_wire_accounts.h | 13++++++++++---
Msrc/include/exchange-database/get_wire_fees.h | 13++++++++++---
Msrc/include/exchange-database/iterate_active_auditors.h | 13++++++++++---
Msrc/include/exchange-database/iterate_active_signkeys.h | 13++++++++++---
Msrc/include/exchange-database/iterate_auditor_denominations.h | 13++++++++++---
Msrc/include/exchange-database/iterate_denomination_info.h | 13++++++++++---
Msrc/include/exchange-database/iterate_denominations.h | 11+++++++++--
Msrc/include/exchange-database/iterate_kyc_reference.h | 13++++++++++---
Msrc/include/exchange-database/lookup_aml_history.h | 13++++++++++---
Msrc/include/exchange-database/lookup_kyc_history.h | 13++++++++++---
Msrc/include/exchange-database/lookup_records_by_table.h | 12+++++++++---
Msrc/include/exchange-database/lookup_wire_transfer.h | 13++++++++++---
Msrc/include/exchange-database/select_account_merges_above_serial_id.h | 11+++++++++--
Msrc/include/exchange-database/select_aggregations_above_serial.h | 13++++++++++---
Msrc/include/exchange-database/select_all_kyc_attributes.h | 13++++++++++---
Msrc/include/exchange-database/select_all_purse_decisions_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_all_purse_deletions_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_aml_attributes.h | 13++++++++++---
Msrc/include/exchange-database/select_aml_decisions.h | 13++++++++++---
Msrc/include/exchange-database/select_aml_measures.h | 13++++++++++---
Msrc/include/exchange-database/select_aml_statistics.h | 13++++++++++---
Msrc/include/exchange-database/select_batch_deposits_missing_wire.h | 13++++++++++---
Msrc/include/exchange-database/select_coin_deposits_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_exchange_debit_transfers.h | 10++++++++--
Msrc/include/exchange-database/select_exchange_kycauth_transfers.h | 11+++++++++--
Msrc/include/exchange-database/select_kyc_accounts.h | 13++++++++++---
Msrc/include/exchange-database/select_kyc_attributes.h | 13++++++++++---
Msrc/include/exchange-database/select_purse_decisions_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_purse_deposits_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_purse_deposits_by_purse.h | 13++++++++++---
Msrc/include/exchange-database/select_purse_merges_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_purse_requests_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_recoup_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_recoup_refresh_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_refreshes_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_refunds_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_refunds_by_coin.h | 13++++++++++---
Msrc/include/exchange-database/select_reserve_closed_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_reserve_open_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/select_reserves_in_above_serial_id.h | 11+++++++++--
Msrc/include/exchange-database/select_reserves_in_above_serial_id_by_account.h | 11+++++++++--
Msrc/include/exchange-database/select_wallet_merges.h | 10++++++++--
Msrc/include/exchange-database/select_wire_out_above_serial_id.h | 11+++++++++--
Msrc/include/exchange-database/select_wire_out_above_serial_id_by_account.h | 11+++++++++--
Msrc/include/exchange-database/select_withdrawals_above_serial_id.h | 13++++++++++---
Msrc/include/exchange-database/update_rules.h | 10++++++++--
Msrc/include/exchangedb_lib.h | 28++++++++++++++++++++++------
Msrc/include/taler/exchange/common.h | 17+++++++++++++++++
Msrc/include/taler/exchange/post-reveal-melt.h | 1+
Msrc/include/taler/exchange/post-withdraw.h | 1+
Msrc/testing/testing_api_cmd_age_withdraw.c | 17+++++++++++------
Msrc/testing/testing_api_cmd_auditor_add.c | 9++++++---
Msrc/testing/testing_api_cmd_auditor_add_denom_sig.c | 9++++++---
Msrc/testing/testing_api_cmd_auditor_del.c | 9++++++---
Msrc/testing/testing_api_cmd_batch_deposit.c | 10++++++----
Msrc/testing/testing_api_cmd_coin_history.c | 9++++++---
Msrc/testing/testing_api_cmd_contract_get.c | 9++++++---
Msrc/testing/testing_api_cmd_deposit.c | 10++++++----
Msrc/testing/testing_api_cmd_deposits_get.c | 10+++++++---
Msrc/testing/testing_api_cmd_purse_create_deposit.c | 10++++++----
Msrc/testing/testing_api_cmd_purse_delete.c | 10++++++----
Msrc/testing/testing_api_cmd_purse_deposit.c | 10++++++----
Msrc/testing/testing_api_cmd_purse_get.c | 8+++++---
Msrc/testing/testing_api_cmd_purse_merge.c | 9+++++----
Msrc/testing/testing_api_cmd_recoup.c | 8+++++---
Msrc/testing/testing_api_cmd_recoup_refresh.c | 9++++++---
Msrc/testing/testing_api_cmd_refresh.c | 16++++++++++------
Msrc/testing/testing_api_cmd_refund.c | 8+++++---
Msrc/testing/testing_api_cmd_reserve_attest.c | 8+++++---
Msrc/testing/testing_api_cmd_reserve_close.c | 8+++++---
Msrc/testing/testing_api_cmd_reserve_get.c | 8+++++---
Msrc/testing/testing_api_cmd_reserve_get_attestable.c | 9++++++---
Msrc/testing/testing_api_cmd_reserve_history.c | 8+++++---
Msrc/testing/testing_api_cmd_reserve_open.c | 8+++++---
Msrc/testing/testing_api_cmd_reserve_purse.c | 10++++++----
Msrc/testing/testing_api_cmd_revoke_denom_key.c | 9++++++---
Msrc/testing/testing_api_cmd_revoke_sign_key.c | 9++++++---
Msrc/testing/testing_api_cmd_set_wire_fee.c | 9++++++---
Msrc/testing/testing_api_cmd_transfer_get.c | 8+++++---
Msrc/testing/testing_api_cmd_wire_add.c | 8+++++---
Msrc/testing/testing_api_cmd_wire_del.c | 9++++++---
164 files changed, 1301 insertions(+), 586 deletions(-)

diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-amount-arithmetic-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-amount-arithmetic-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-amount-arithmetic-inconsistency.h" +#define TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_amount_arithmetic_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add deposit confirmation to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue add_amount_arithmetic_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_AmountArithmeticInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-bad-sig-losses.c b/src/auditor/taler-auditor-httpd_get-monitoring-bad-sig-losses.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-bad-sig-losses.h" +#define TALER_AUDITORDB_BAD_SIG_LOSSES_RESULT_CLOSURE json_t #include "auditor-database/get_bad_sig_losses.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add bad-sig-losses to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue add_bad_sig_losses ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_BadSigLosses *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-balances.c b/src/auditor/taler-auditor-httpd_get-monitoring-balances.c @@ -22,22 +22,22 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-balances.h" +#define TALER_AUDITORDB_BALANCES_RESULT_CLOSURE json_t #include "auditor-database/get_balances.h" #include "auditor-database/preflight.h" /** * Add balance to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of with balance data * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_balances ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_Balances *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-closure-lags.c b/src/auditor/taler-auditor-httpd_get-monitoring-closure-lags.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-closure-lags.h" +#define TALER_AUDITORDB_CLOSURE_LAGS_RESULT_CLOSURE json_t #include "auditor-database/get_auditor_closure_lags.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add closure-lags to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_closure_lags ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_ClosureLags *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-coin-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-coin-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-coin-inconsistency.h" +#define TALER_AUDITORDB_COIN_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_coin_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,18 +30,17 @@ /** * Add deposit confirmation to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue add_coin_inconsistency ( - void *cls, + json_t *list, uint64_t serial_id, const struct TALER_AUDITORDB_CoinInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.c @@ -23,6 +23,9 @@ #include "taler-auditor-httpd.h" #include \ "taler-auditor-httpd_get-monitoring-denomination-key-validity-withdraw-inconsistency.h" +#define \ + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_RESULT_CLOSURE \ + json_t #include \ "auditor-database/get_denomination_key_validity_withdraw_inconsistency.h" #include "auditor-database/preflight.h" @@ -30,16 +33,15 @@ /** * Add denomination-key-validity-withdraw-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate */ static enum GNUNET_GenericReturnValue process_denomination_key_validity_withdraw_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-denomination-pending.c b/src/auditor/taler-auditor-httpd_get-monitoring-denomination-pending.c @@ -22,24 +22,24 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-denomination-pending.h" +#define TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE json_t #include "auditor-database/get_denomination_pending.h" #include "auditor-database/preflight.h" /** * Add denomination-pending to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_denomination_pending ( - void *cls, + json_t *list, uint64_t serial_id, const struct TALER_AUDITORDB_DenominationPending *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-denominations-without-sigs.c b/src/auditor/taler-auditor-httpd_get-monitoring-denominations-without-sigs.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-denominations-without-sigs.h" +#define TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIGS_RESULT_CLOSURE json_t #include "auditor-database/get_denominations_without_sigs.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add denominations-without-sigs to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_denominations_without_sigs ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_DenominationsWithoutSigs *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-deposit-confirmations.c b/src/auditor/taler-auditor-httpd_get-monitoring-deposit-confirmations.c @@ -28,6 +28,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-deposit-confirmations.h" +#define TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE json_t #include "auditor-database/get_deposit_confirmations.h" #include "auditor-database/preflight.h" @@ -35,16 +36,15 @@ /** * Add deposit confirmation to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of deposit confirmation * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue add_deposit_confirmation ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_DepositConfirmation *dc) { - json_t *list = cls; json_t *obj; json_t *coin_pubs_json = json_array (); json_t *coin_sigs_json = json_array (); diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-early-aggregation.c b/src/auditor/taler-auditor-httpd_get-monitoring-early-aggregation.c @@ -23,22 +23,22 @@ #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-early-aggregation.h" #include "auditor-database/preflight.h" +#define TALER_AUDITORDB_EARLY_AGGREGATIONS_RESULT_CLOSURE json_t #include "auditor-database/select_early_aggregations.h" /** * Add early aggregation record to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param ea early aggregation record * @return #GNUNET_OK */ static enum GNUNET_GenericReturnValue add_early_aggregation ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_EarlyAggregation *ea) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-emergency-by-count.c b/src/auditor/taler-auditor-httpd_get-monitoring-emergency-by-count.c @@ -22,22 +22,22 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-emergency-by-count.h" +#define TALER_AUDITORDB_EMERGENCIES_BY_COUNT_RESULT_CLOSURE json_t #include "auditor-database/get_emergency_by_count.h" #include "auditor-database/preflight.h" /** * Add emergency-by-count to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_emergency_by_count ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_EmergenciesByCount *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-emergency.c b/src/auditor/taler-auditor-httpd_get-monitoring-emergency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-emergency.h" +#define TALER_AUDITORDB_EMERGENCY_RESULT_CLOSURE json_t #include "auditor-database/get_emergency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add emergency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_emergency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_Emergency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-fee-time-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-fee-time-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-fee-time-inconsistency.h" +#define TALER_AUDITORDB_FEE_TIME_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_fee_time_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add fee-time-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_fee_time_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_FeeTimeInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-historic-denomination-revenue.c b/src/auditor/taler-auditor-httpd_get-monitoring-historic-denomination-revenue.c @@ -25,13 +25,14 @@ #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-historic-denomination-revenue.h" #include "auditor-database/preflight.h" +#define TALER_AUDITORDB_HISTORIC_DENOMINATION_REVENUE_DATA_RESULT_CLOSURE json_t #include "auditor-database/select_historic_denom_revenue.h" /** * Add historic-denomination-revenue to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param denom_pub_hash public key hash of the denomination * @param revenue_timestamp when was the revenue effective @@ -41,14 +42,13 @@ */ static enum GNUNET_GenericReturnValue process_historic_denomination_revenue ( - void *cls, + json_t *list, uint64_t serial_id, const struct TALER_DenominationHashP *denom_pub_hash, struct GNUNET_TIME_Timestamp revenue_timestamp, const struct TALER_Amount *revenue_balance, const struct TALER_Amount *loss_balance) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-historic-reserve-summary.c b/src/auditor/taler-auditor-httpd_get-monitoring-historic-reserve-summary.c @@ -25,12 +25,13 @@ #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-historic-reserve-summary.h" #include "auditor-database/preflight.h" +#define TALER_AUDITORDB_HISTORIC_RESERVE_REVENUE_DATA_RESULT_CLOSURE json_t #include "auditor-database/select_historic_reserve_revenue.h" /** * Add historic-reserve-summary to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param start_time beginning of aggregated time interval * @param end_time end of aggregated time interval @@ -40,13 +41,12 @@ */ static enum GNUNET_GenericReturnValue process_historic_reserve_summary ( - void *cls, + json_t *list, uint64_t serial_id, struct GNUNET_TIME_Timestamp start_time, struct GNUNET_TIME_Timestamp end_time, const struct TALER_Amount *reserve_profits) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-misattribution-in-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-misattribution-in-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-misattribution-in-inconsistency.h" +#define TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_misattribution_in_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add misattribution-in-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_misattribution_in_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_MisattributionInInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-pending-deposits.c b/src/auditor/taler-auditor-httpd_get-monitoring-pending-deposits.c @@ -23,13 +23,14 @@ #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-pending-deposits.h" #include "auditor-database/preflight.h" +#define TALER_AUDITORDB_WIRE_MISSING_RESULT_CLOSURE json_t #include "auditor-database/select_pending_deposits.h" /** * Add pending deposit to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param row_id row ID of the alert in the auditor database * @param batch_deposit_serial_id where in the exchange table are we * @param total_amount value of all missing deposits, including fees @@ -39,7 +40,7 @@ */ static void add_pending_deposit ( - void *cls, + json_t *list, uint64_t row_id, uint64_t batch_deposit_serial_id, const struct TALER_Amount *total_amount, @@ -47,7 +48,6 @@ add_pending_deposit ( struct GNUNET_TIME_Timestamp deadline, bool suppressed) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-progress.c b/src/auditor/taler-auditor-httpd_get-monitoring-progress.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-progress.h" +#define TALER_AUDITORDB_PROGRESS_POINTS_RESULT_CLOSURE json_t #include "auditor-database/get_progress_points.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add progress to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct with progress data * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_progress ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_Progress *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.c b/src/auditor/taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.c @@ -22,22 +22,22 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-purse-not-closed-inconsistencies.h" +#define TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCIES_RESULT_CLOSURE json_t #include "auditor-database/get_purse_not_closed_inconsistencies.h" #include "auditor-database/preflight.h" /** * Add purse-not-closed-inconsistencies to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_purse_not_closed_inconsistencies ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_PurseNotClosedInconsistencies *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-purses.c b/src/auditor/taler-auditor-httpd_get-monitoring-purses.c @@ -24,24 +24,24 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-purses.h" +#define TALER_AUDITORDB_PURSES_RESULT_CLOSURE json_t #include "auditor-database/get_purses.h" #include "auditor-database/preflight.h" /** * Add purses to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_purses ( - void *cls, + json_t *list, uint64_t serial_id, const struct TALER_AUDITORDB_Purses *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserve-balance-insufficient-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserve-balance-insufficient-inconsistency.c @@ -23,6 +23,9 @@ #include "taler-auditor-httpd.h" #include \ "taler-auditor-httpd_get-monitoring-reserve-balance-insufficient-inconsistency.h" +#define \ + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_RESULT_CLOSURE \ + json_t #include \ "auditor-database/get_reserve_balance_insufficient_inconsistency.h" #include "auditor-database/preflight.h" @@ -31,16 +34,15 @@ /** * Add reserve-balance-insufficient-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_reserve_balance_insufficient_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_ReserveBalanceInsufficientInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserve-balance-summary-wrong-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserve-balance-summary-wrong-inconsistency.c @@ -23,6 +23,9 @@ #include "taler-auditor-httpd.h" #include \ "taler-auditor-httpd_get-monitoring-reserve-balance-summary-wrong-inconsistency.h" +#define \ + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_RESULT_CLOSURE \ + json_t #include \ "auditor-database/get_reserve_balance_summary_wrong_inconsistency.h" #include "auditor-database/preflight.h" @@ -31,16 +34,15 @@ /** * Add reserve-balance-summary-wrong-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_reserve_balance_summary_wrong_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-reserve-in-inconsistency.h" +#define TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_reserve_in_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add reserve-in-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_reserve_in_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_ReserveInInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-reserve-not-closed-inconsistency.h" +#define TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_reserve_not_closed_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add reserve-not-closed-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_reserve_not_closed_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_ReserveNotClosedInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-reserves.c b/src/auditor/taler-auditor-httpd_get-monitoring-reserves.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-reserves.h" +#define TALER_AUDITORDB_RESERVES_RESULT_CLOSURE json_t #include "auditor-database/get_reserves.h" #include "auditor-database/preflight.h" @@ -29,18 +30,17 @@ /** * Add reserves to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_reserves ( - void *cls, + json_t *list, uint64_t serial_id, const struct TALER_AUDITORDB_Reserves *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-row-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-row-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-row-inconsistency.h" +#define TALER_AUDITORDB_ROW_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_row_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,18 +30,17 @@ /** * Add deposit confirmation to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param serial_id location of the @a dc in the database * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue add_row_inconsistency ( - void *cls, + json_t *list, uint64_t serial_id, const struct TALER_AUDITORDB_RowInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-row-minor-inconsistencies.c b/src/auditor/taler-auditor-httpd_get-monitoring-row-minor-inconsistencies.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-row-minor-inconsistencies.h" +#define TALER_AUDITORDB_ROW_MINOR_INCONSISTENCIES_RESULT_CLOSURE json_t #include "auditor-database/get_row_minor_inconsistencies.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add row-minor-inconsistencies to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_row_minor_inconsistencies ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_RowMinorInconsistencies *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-wire-format-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-wire-format-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-wire-format-inconsistency.h" +#define TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_wire_format_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add wire-format-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_wire_format_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_WireFormatInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-httpd_get-monitoring-wire-out-inconsistency.c b/src/auditor/taler-auditor-httpd_get-monitoring-wire-out-inconsistency.c @@ -22,6 +22,7 @@ #include "taler/taler_mhd_lib.h" #include "taler-auditor-httpd.h" #include "taler-auditor-httpd_get-monitoring-wire-out-inconsistency.h" +#define TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY_RESULT_CLOSURE json_t #include "auditor-database/get_wire_out_inconsistency.h" #include "auditor-database/preflight.h" @@ -29,16 +30,15 @@ /** * Add wire-out-inconsistency to the list. * - * @param[in,out] cls a `json_t *` array to extend + * @param[in,out] list a `json_t *` array to extend * @param dc struct of inconsistencies * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ static enum GNUNET_GenericReturnValue process_wire_out_inconsistency ( - void *cls, + json_t *list, const struct TALER_AUDITORDB_WireOutInconsistency *dc) { - json_t *list = cls; json_t *obj; obj = GNUNET_JSON_PACK ( diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c @@ -104,6 +104,8 @@ #include "exchange-database/insert_kyc_requirement_process.h" #include "exchange-database/insert_partner.h" #include "exchange-database/insert_purse_request.h" +struct InsertContext; +#define TALER_EXCHANGEDB_REPLICATION_RESULT_CLOSURE struct InsertContext #include "exchange-database/insert_records_by_table.h" #include "exchange-database/insert_reserve_closed.h" #include "exchange-database/insert_reserve_open_deposit.h" @@ -351,16 +353,15 @@ struct InsertContext /** * Function called on data to replicate in the auditor's database. * - * @param cls closure, a `struct InsertContext` + * @param ctx closure, a `struct InsertContext` * @param td record from an exchange table * @return #GNUNET_OK to continue to iterate, * #GNUNET_SYSERR to fail with an error */ static enum GNUNET_GenericReturnValue -do_insert (void *cls, +do_insert (struct InsertContext *ctx, const struct TALER_EXCHANGEDB_TableData *td) { - struct InsertContext *ctx = cls; enum GNUNET_DB_QueryStatus qs; if (0 >= ctx->qs) diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c @@ -21,6 +21,11 @@ #include "platform.h" #include <gnunet/gnunet_util_lib.h> #include "auditordb_lib.h" +/* WIRE_TRANSFER_OUT's callback typedef also lives in exchangedb_lib.h, so its + closure override must be established before that header is included. */ +struct AggregationContext; +#define TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE struct \ + AggregationContext #include "exchangedb_lib.h" #include "taler/taler_bank_service.h" #include "taler/taler_signatures.h" @@ -42,6 +47,8 @@ #include "exchange-database/get_coin_transactions.h" #include "exchange-database/get_known_coin.h" #include "exchange-database/get_wire_fee.h" +struct WireCheckContext; +#define TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE struct WireCheckContext #include "exchange-database/lookup_wire_transfer.h" #include "exchange-database/select_wire_out_above_serial_id.h" @@ -777,7 +784,7 @@ check_transaction_history_for_deposit ( * Function called with the results of the lookup of the * transaction data associated with a wire transfer identifier. * - * @param[in,out] cls a `struct WireCheckContext` + * @param[in,out] wcc a `struct WireCheckContext` * @param rowid which row in the table is the information from (for diagnostics) * @param merchant_pub public key of the merchant (should be same for all callbacks with the same @e cls) * @param account_pay_uri where did we transfer the funds? @@ -793,7 +800,7 @@ check_transaction_history_for_deposit ( */ static void wire_transfer_information_cb ( - void *cls, + struct WireCheckContext *wcc, uint64_t rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_FullPayto account_pay_uri, @@ -805,7 +812,6 @@ wire_transfer_information_cb ( const struct TALER_Amount *coin_value, const struct TALER_Amount *deposit_fee) { - struct WireCheckContext *wcc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct TALER_Amount computed_value; struct TALER_Amount total_deposit_without_refunds; @@ -1189,7 +1195,7 @@ get_wire_fee (struct AggregationContext *ac, * Check that a wire transfer made by the exchange is valid * (has matching deposits). * - * @param cls a `struct AggregationContext` + * @param ac a `struct AggregationContext` * @param rowid identifier of the respective row in the database * @param date timestamp of the wire transfer (roughly) * @param wtid wire transfer subject @@ -1198,14 +1204,13 @@ get_wire_fee (struct AggregationContext *ac, * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration */ static enum GNUNET_GenericReturnValue -check_wire_out_cb (void *cls, +check_wire_out_cb (struct AggregationContext *ac, uint64_t rowid, struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_FullPayto payto_uri, const struct TALER_Amount *amount) { - struct AggregationContext *ac = cls; struct WireCheckContext wcc; struct TALER_Amount final_amount; struct TALER_Amount exchange_gain; diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c @@ -45,6 +45,17 @@ #include "exchange-database/get_coin_transactions.h" #include "exchange-database/get_denomination_revocation.h" #include "exchange-database/get_known_coin.h" +struct CoinContext; +#define TALER_EXCHANGEDB_DENOMINATION_RESULT_CLOSURE enum GNUNET_DB_QueryStatus +#define TALER_EXCHANGEDB_DEPOSIT_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_PURSE_REFUND_COIN_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_RECOUP_REFRESH_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_REFRESHES_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_REFUND_RESULT_CLOSURE struct CoinContext +#define TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE struct CoinContext #include "exchange-database/iterate_denomination_info.h" #include "exchange-database/select_auditor_denom_sig.h" #include "exchange-database/select_coin_deposits_above_serial_id.h" @@ -1002,7 +1013,7 @@ cleanup_denomination (void *cls, * taler-helper-auditor-reserves.c::#handle_withdrawals(), so we do not check * it again here. * - * @param cls our `struct CoinContext` + * @param cc our `struct CoinContext` * @param rowid unique serial ID for the refresh session in our DB * @param num_denom_serials number of elements in @e denom_serials array * @param denom_serials array with length @e num_denom_serials of serial ID's of denominations in our DB @@ -1020,7 +1031,7 @@ cleanup_denomination (void *cls, */ static enum GNUNET_GenericReturnValue withdraw_cb ( - void *cls, + struct CoinContext *cc, uint64_t rowid, size_t num_denom_serials, const uint64_t *denom_serials, @@ -1035,7 +1046,6 @@ withdraw_cb ( struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee) { - struct CoinContext *cc = cls; /* Note: some optimization potential here: lots of fields we could avoid fetching from the database with a custom function. */ @@ -1275,7 +1285,7 @@ reduce_denom_balance (struct DenominationSummary *dso, * denomination has less, the fresh coins increased outstanding * balances). * - * @param cls closure + * @param cc closure * @param rowid unique serial ID for the refresh session in our DB * @param old_denom_pub denomination public key of @a coin_pub * @param coin_pub public key of the coin @@ -1288,7 +1298,7 @@ reduce_denom_balance (struct DenominationSummary *dso, * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -refresh_session_cb (void *cls, +refresh_session_cb (struct CoinContext *cc, uint64_t rowid, const struct TALER_DenominationPublicKey *old_denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -1299,7 +1309,6 @@ refresh_session_cb (void *cls, uint64_t new_denom_serials[static num_nds], const struct TALER_RefreshCommitmentP *rc) { - struct CoinContext *cc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct DenominationSummary *dso; enum GNUNET_DB_QueryStatus qs; @@ -1544,7 +1553,7 @@ refresh_session_cb (void *cls, * Function called with details about deposits that have been made, * with the goal of auditing the deposit's execution. * - * @param cls closure + * @param cc closure * @param rowid unique serial ID for the deposit in our DB * @param exchange_timestamp when did the exchange get the deposit * @param deposit deposit details @@ -1553,14 +1562,13 @@ refresh_session_cb (void *cls, * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -deposit_cb (void *cls, +deposit_cb (struct CoinContext *cc, uint64_t rowid, struct GNUNET_TIME_Timestamp exchange_timestamp, const struct TALER_EXCHANGEDB_Deposit *deposit, const struct TALER_DenominationPublicKey *denom_pub, bool done) { - struct CoinContext *cc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct DenominationSummary *ds; enum GNUNET_DB_QueryStatus qs; @@ -1724,7 +1732,7 @@ deposit_cb (void *cls, * refunded amount back to the outstanding balance of the respective * denomination. * - * @param cls closure + * @param cc closure * @param rowid unique serial ID for the refund in our DB * @param denom_pub denomination public key of @a coin_pub * @param coin_pub public key of the coin @@ -1737,7 +1745,7 @@ deposit_cb (void *cls, * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -refund_cb (void *cls, +refund_cb (struct CoinContext *cc, uint64_t rowid, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -1748,7 +1756,6 @@ refund_cb (void *cls, bool full_refund, const struct TALER_Amount *amount_with_fee) { - struct CoinContext *cc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct DenominationSummary *ds; struct TALER_Amount amount_without_fee; @@ -1891,7 +1898,7 @@ refund_cb (void *cls, * Function called with details about purse refunds that have been made, with * the goal of auditing the purse refund's execution. * - * @param cls closure + * @param cc closure * @param rowid row of the purse-refund * @param amount_with_fee amount of the deposit into the purse * @param coin_pub coin that is to be refunded the @a given amount_with_fee @@ -1900,13 +1907,12 @@ refund_cb (void *cls, */ static enum GNUNET_GenericReturnValue purse_refund_coin_cb ( - void *cls, + struct CoinContext *cc, uint64_t rowid, const struct TALER_Amount *amount_with_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_DenominationPublicKey *denom_pub) { - struct CoinContext *cc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct DenominationSummary *ds; enum GNUNET_DB_QueryStatus qs; @@ -1986,7 +1992,7 @@ purse_refund_coin_cb ( * refunded amounts back to the outstanding balance of the respective * denominations. * - * @param cls closure + * @param cc closure * @param rowid unique serial ID for the refund in our DB * @param purse_pub public key of the purse * @param reserve_pub public key of the targeted reserve (ignored) @@ -1994,13 +2000,12 @@ purse_refund_coin_cb ( * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -purse_refund_cb (void *cls, +purse_refund_cb (struct CoinContext *cc, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *val) { - struct CoinContext *cc = cls; enum GNUNET_DB_QueryStatus qs; (void) val; /* irrelevant on refund */ @@ -2183,7 +2188,7 @@ check_recoup (struct CoinContext *cc, /** * Function called about recoups the exchange has to perform. * - * @param cls a `struct CoinContext *` + * @param cc a `struct CoinContext *` * @param rowid row identifier used to uniquely identify the recoup operation * @param timestamp when did we receive the recoup request * @param amount how much should be added back to the reserve @@ -2195,7 +2200,7 @@ check_recoup (struct CoinContext *cc, * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -recoup_cb (void *cls, +recoup_cb (struct CoinContext *cc, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -2205,7 +2210,6 @@ recoup_cb (void *cls, const struct TALER_CoinSpendSignatureP *coin_sig, const union GNUNET_CRYPTO_BlindingSecretP *coin_blind) { - struct CoinContext *cc = cls; enum GNUNET_DB_QueryStatus qs; GNUNET_assert (rowid >= TALER_ARL_USE_PP (coins_recoup_serial_id)); /* should be monotonically increasing */ @@ -2260,7 +2264,7 @@ recoup_cb (void *cls, * coin balances, as those are already updated when we check the coin * history. * - * @param cls a `struct CoinContext *` + * @param cc a `struct CoinContext *` * @param rowid row identifier used to uniquely identify the recoup operation * @param timestamp when did we receive the recoup request * @param amount how much should be added back to the old coin @@ -2273,7 +2277,7 @@ recoup_cb (void *cls, * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -recoup_refresh_cb (void *cls, +recoup_refresh_cb (struct CoinContext *cc, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -2284,7 +2288,6 @@ recoup_refresh_cb (void *cls, const struct TALER_CoinSpendSignatureP *coin_sig, const union GNUNET_CRYPTO_BlindingSecretP *coin_blind) { - struct CoinContext *cc = cls; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; enum GNUNET_DB_QueryStatus qs; @@ -2397,23 +2400,21 @@ recoup_refresh_cb (void *cls, * denomination and to warn if there are denominations not approved * by this auditor. * - * @param cls closure, pointer to `enum GNUNET_DB_QueryStatus` + * @param iqs closure, pointer to `enum GNUNET_DB_QueryStatus` * @param denom_serial row ID of the denominations table of the exchange DB * @param denom_pub public key, sometimes NULL (!) * @param issue issuing information with value, fees and other info about the denomination. */ static void check_denomination ( - void *cls, + enum GNUNET_DB_QueryStatus *iqs, uint64_t denom_serial, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue) { - enum GNUNET_DB_QueryStatus *iqs = cls; enum GNUNET_DB_QueryStatus qs; struct TALER_AuditorSignatureP auditor_sig; - (void) cls; (void) denom_pub; qs = TALER_EXCHANGEDB_select_auditor_denom_sig (TALER_ARL_edb, &issue->denom_hash, @@ -2476,7 +2477,7 @@ check_denomination ( * Function called with details about purse deposits that have been made, with * the goal of auditing the deposit's execution. * - * @param cls closure + * @param cc closure * @param rowid unique serial ID for the deposit in our DB * @param deposit deposit details * @param reserve_pub which reserve is the purse merged into, NULL if unknown @@ -2489,7 +2490,7 @@ check_denomination ( */ static enum GNUNET_GenericReturnValue purse_deposit_cb ( - void *cls, + struct CoinContext *cc, uint64_t rowid, const struct TALER_EXCHANGEDB_PurseDeposit *deposit, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -2498,7 +2499,6 @@ purse_deposit_cb ( const struct TALER_Amount *purse_total, const struct TALER_DenominationPublicKey *denom_pub) { - struct CoinContext *cc = cls; enum GNUNET_DB_QueryStatus qs; struct TALER_DenominationHashP dh; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; diff --git a/src/auditor/taler-helper-auditor-purses.c b/src/auditor/taler-helper-auditor-purses.c @@ -38,11 +38,20 @@ #include "auditor-database/insert_purse_info.h" #include "auditor-database/insert_purse_not_closed_inconsistencies.h" #include "auditor-database/insert_row_inconsistency.h" +struct PurseContext; +#define TALER_AUDITORDB_EXPIRED_PURSE_RESULT_CLOSURE struct PurseContext #include "auditor-database/select_purse_expired.h" #include "auditor-database/update_auditor_progress.h" #include "auditor-database/update_balance.h" #include "auditor-database/update_purse_info.h" #include "exchange-database/get_global_fee.h" +struct PurseContext; +#define TALER_EXCHANGEDB_ACCOUNT_MERGE_RESULT_CLOSURE struct PurseContext +#define TALER_EXCHANGEDB_ALL_PURSE_DECISION_RESULT_CLOSURE struct PurseContext +#define TALER_EXCHANGEDB_ALL_PURSE_DELETIONS_RESULT_CLOSURE struct PurseContext +#define TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE struct PurseContext +#define TALER_EXCHANGEDB_PURSE_MERGE_RESULT_CLOSURE struct PurseContext +#define TALER_EXCHANGEDB_PURSE_REQUEST_RESULT_CLOSURE struct PurseContext #include "exchange-database/select_account_merges_above_serial_id.h" #include "exchange-database/select_all_purse_decisions_above_serial_id.h" #include "exchange-database/select_all_purse_deletions_above_serial_id.h" @@ -510,7 +519,7 @@ setup_purse (struct PurseContext *pc, /** * Function called on purse requests. * - * @param cls closure + * @param pc closure * @param rowid which row in the database was the request stored in * @param purse_pub public key of the purse * @param merge_pub public key representing the merge capability @@ -524,7 +533,7 @@ setup_purse (struct PurseContext *pc, */ static enum GNUNET_GenericReturnValue handle_purse_requested ( - void *cls, + struct PurseContext *pc, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseMergePublicKeyP *merge_pub, @@ -535,7 +544,6 @@ handle_purse_requested ( const struct TALER_Amount *target_amount, const struct TALER_PurseContractSignatureP *purse_sig) { - struct PurseContext *pc = cls; struct PurseSummary *ps; struct GNUNET_HashCode key; @@ -611,7 +619,7 @@ handle_purse_requested ( * Function called with details about purse deposits that have been made, with * the goal of auditing the deposit's execution. * - * @param cls closure + * @param pc closure * @param rowid unique serial ID for the deposit in our DB * @param deposit deposit details * @param reserve_pub which reserve is the purse merged into, NULL if unknown @@ -624,7 +632,7 @@ handle_purse_requested ( */ static enum GNUNET_GenericReturnValue handle_purse_deposits ( - void *cls, + struct PurseContext *pc, uint64_t rowid, const struct TALER_EXCHANGEDB_PurseDeposit *deposit, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -633,7 +641,6 @@ handle_purse_deposits ( const struct TALER_Amount *purse_total, const struct TALER_DenominationPublicKey *denom_pub) { - struct PurseContext *pc = cls; struct TALER_Amount amount_minus_fee; const char *base_url = (NULL == deposit->exchange_base_url) @@ -764,7 +771,7 @@ handle_purse_deposits ( * Function called with details about purse merges that have been made, with * the goal of auditing the purse merge execution. * - * @param cls closure + * @param pc closure * @param rowid unique serial ID for the deposit in our DB * @param partner_base_url where is the reserve, NULL for this exchange * @param amount total amount expected in the purse @@ -779,7 +786,7 @@ handle_purse_deposits ( */ static enum GNUNET_GenericReturnValue handle_purse_merged ( - void *cls, + struct PurseContext *pc, uint64_t rowid, const char *partner_base_url, const struct TALER_Amount *amount, @@ -791,7 +798,6 @@ handle_purse_merged ( const struct TALER_PurseContractPublicKeyP *purse_pub, struct GNUNET_TIME_Timestamp merge_timestamp) { - struct PurseContext *pc = cls; struct PurseSummary *ps; enum GNUNET_DB_QueryStatus qs; @@ -878,7 +884,7 @@ handle_purse_merged ( * Function called with details about account merge requests that have been * made, with the goal of auditing the account merge execution. * - * @param cls closure + * @param pc closure * @param rowid unique serial ID for the deposit in our DB * @param reserve_pub reserve affected by the merge * @param purse_pub purse being merged @@ -894,7 +900,7 @@ handle_purse_merged ( */ static enum GNUNET_GenericReturnValue handle_account_merged ( - void *cls, + struct PurseContext *pc, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_PurseContractPublicKeyP *purse_pub, @@ -907,7 +913,6 @@ handle_account_merged ( struct GNUNET_TIME_Timestamp merge_timestamp, const struct TALER_ReserveSignatureP *reserve_sig) { - struct PurseContext *pc = cls; struct PurseSummary *ps; enum GNUNET_DB_QueryStatus qs; @@ -984,7 +989,7 @@ handle_account_merged ( /** * Function called with details about purse decisions that have been made. * - * @param cls closure + * @param pc closure * @param rowid unique serial ID for the deposit in our DB * @param purse_pub which purse was the decision made on * @param refunded true if decision was to refund @@ -992,12 +997,11 @@ handle_account_merged ( */ static enum GNUNET_GenericReturnValue handle_purse_decision ( - void *cls, + struct PurseContext *pc, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, bool refunded) { - struct PurseContext *pc = cls; struct PurseSummary *ps; struct GNUNET_HashCode key; enum GNUNET_DB_QueryStatus qs; @@ -1137,7 +1141,7 @@ handle_purse_decision ( /** * Function called on explicitly deleted purses. * - * @param cls closure + * @param pc closure * @param deletion_serial_id row ID with the deletion data * @param purse_pub public key of the purse * @param purse_sig signature affirming deletion of the purse @@ -1145,12 +1149,11 @@ handle_purse_decision ( */ static enum GNUNET_GenericReturnValue handle_purse_deletion ( - void *cls, + struct PurseContext *pc, uint64_t deletion_serial_id, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseContractSignatureP *purse_sig) { - struct PurseContext *pc = cls; struct PurseSummary *ps; ps = setup_purse (pc, @@ -1206,7 +1209,7 @@ handle_purse_deletion ( /** * Function called on expired purses. * - * @param cls closure + * @param pc closure * @param purse_pub public key of the purse * @param balance amount of money in the purse * @param expiration_date when did the purse expire? @@ -1214,12 +1217,11 @@ handle_purse_deletion ( */ static enum GNUNET_GenericReturnValue handle_purse_expired ( - void *cls, + struct PurseContext *pc, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_Amount *balance, struct GNUNET_TIME_Timestamp expiration_date) { - struct PurseContext *pc = cls; enum GNUNET_DB_QueryStatus qs; struct TALER_AUDITORDB_PurseNotClosedInconsistencies pnci = { .amount = *balance, diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c @@ -19,6 +19,11 @@ * @author Christian Grothoff */ #include "platform.h" +/* RESERVE_IN's callback typedef also lives in exchangedb_lib.h (pulled in + transitively by report-lib.h below), so its closure override must be + established before any of those includes. */ +struct ReserveContext; +#define TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE struct ReserveContext #include "auditordb_lib.h" #include "report-lib.h" #include "taler/taler_dbevents.h" @@ -48,6 +53,13 @@ #include "exchange-database/get_denomination_revocation.h" #include "exchange-database/get_wire_fee.h" #include "exchange-database/reserves_get.h" +struct ReserveContext; +#define TALER_EXCHANGEDB_ACCOUNT_MERGE_RESULT_CLOSURE struct ReserveContext +#define TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE struct ReserveContext +#define TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE struct ReserveContext +#define TALER_EXCHANGEDB_RESERVE_CLOSED_RESULT_CLOSURE struct ReserveContext +#define TALER_EXCHANGEDB_RESERVE_OPEN_RESULT_CLOSURE struct ReserveContext +#define TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE struct ReserveContext #include "exchange-database/select_account_merges_above_serial_id.h" #include "exchange-database/select_purse_decisions_above_serial_id.h" #include "exchange-database/select_recoup_above_serial_id.h" @@ -482,7 +494,7 @@ setup_reserve (struct ReserveContext *rc, /** * Function called with details about incoming wire transfers. * - * @param cls our `struct ReserveContext` + * @param rc our `struct ReserveContext` * @param rowid unique serial ID for the refresh session in our DB * @param reserve_pub public key of the reserve (also the WTID) * @param credit amount that was received @@ -493,7 +505,7 @@ setup_reserve (struct ReserveContext *rc, */ static enum GNUNET_GenericReturnValue handle_reserve_in ( - void *cls, + struct ReserveContext *rc, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *credit, @@ -501,7 +513,6 @@ handle_reserve_in ( uint64_t wire_reference, struct GNUNET_TIME_Timestamp execution_date) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; struct GNUNET_TIME_Timestamp expiry; @@ -539,7 +550,7 @@ handle_reserve_in ( * Function called with details about withdraw operations. Verifies * the signature and updates the reserve's balance. * - * @param cls our `struct ReserveContext` + * @param rc our `struct ReserveContext` * @param rowid unique serial ID for the refresh session in our DB * @param num_denom_serials number of elements in @e denom_serials array * @param denom_serials array with length @e num_denom_serials of serial ID's of denominations in our DB @@ -557,7 +568,7 @@ handle_reserve_in ( */ static enum GNUNET_GenericReturnValue handle_withdrawals ( - void *cls, + struct ReserveContext *rc, uint64_t rowid, size_t num_denom_serials, const uint64_t *denom_serials, @@ -572,7 +583,6 @@ handle_withdrawals ( struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue; struct TALER_Amount auditor_amount; @@ -777,7 +787,7 @@ handle_withdrawals ( * Function called with details about withdraw operations. Verifies * the signature and updates the reserve's balance. * - * @param cls our `struct ReserveContext` + * @param rc our `struct ReserveContext` * @param rowid unique serial ID for the refresh session in our DB * @param timestamp when did we receive the recoup request * @param amount how much should be added back to the reserve @@ -791,7 +801,7 @@ handle_withdrawals ( */ static enum GNUNET_GenericReturnValue handle_recoup_by_reserve ( - void *cls, + struct ReserveContext *rc, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -801,7 +811,6 @@ handle_recoup_by_reserve ( const struct TALER_CoinSpendSignatureP *coin_sig, const union GNUNET_CRYPTO_BlindingSecretP *coin_blind) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; struct GNUNET_TIME_Timestamp expiry; struct TALER_MasterSignatureP msig; @@ -1006,7 +1015,7 @@ get_closing_fee (const struct TALER_FullPayto receiver_account, /** * Function called about reserve opening operations. * - * @param cls closure + * @param rc closure * @param rowid row identifier used to uniquely identify the reserve closing operation * @param reserve_payment how much to pay from the * reserve's own balance for opening the reserve @@ -1020,7 +1029,7 @@ get_closing_fee (const struct TALER_FullPayto receiver_account, */ static enum GNUNET_GenericReturnValue handle_reserve_open ( - void *cls, + struct ReserveContext *rc, uint64_t rowid, const struct TALER_Amount *reserve_payment, struct GNUNET_TIME_Timestamp request_timestamp, @@ -1029,7 +1038,6 @@ handle_reserve_open ( const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_ReserveSignatureP *reserve_sig) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; enum GNUNET_DB_QueryStatus qs; @@ -1095,7 +1103,7 @@ handle_reserve_open ( * Function called about reserve closing operations * the aggregator triggered. * - * @param cls closure + * @param rc closure * @param rowid row identifier used to uniquely identify the reserve closing operation * @param execution_date when did we execute the close operation * @param amount_with_fee how much did we debit the reserve @@ -1109,7 +1117,7 @@ handle_reserve_open ( */ static enum GNUNET_GenericReturnValue handle_reserve_closed ( - void *cls, + struct ReserveContext *rc, uint64_t rowid, struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee, @@ -1119,7 +1127,6 @@ handle_reserve_closed ( const struct TALER_WireTransferIdentifierRawP *transfer_details, uint64_t close_request_row) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; (void) transfer_details; @@ -1305,7 +1312,7 @@ handle_reserve_closed ( * made, with the goal of accounting for the merge fee paid by the reserve (if * applicable). * - * @param cls closure + * @param rc closure * @param rowid unique serial ID for the deposit in our DB * @param reserve_pub reserve affected by the merge * @param purse_pub purse being merged @@ -1321,7 +1328,7 @@ handle_reserve_closed ( */ static enum GNUNET_GenericReturnValue handle_account_merged ( - void *cls, + struct ReserveContext *rc, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_PurseContractPublicKeyP *purse_pub, @@ -1334,7 +1341,6 @@ handle_account_merged ( struct GNUNET_TIME_Timestamp merge_timestamp, const struct TALER_ReserveSignatureP *reserve_sig) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; enum GNUNET_DB_QueryStatus qs; @@ -1402,7 +1408,7 @@ handle_account_merged ( * Only updates the reserve balance, the actual verifications are done in the * purse helper. * - * @param cls closure + * @param rc closure * @param rowid unique serial ID for the refund in our DB * @param purse_pub public key of the purse * @param reserve_pub which reserve is the purse credited to @@ -1410,13 +1416,12 @@ handle_account_merged ( * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ static enum GNUNET_GenericReturnValue -purse_decision_cb (void *cls, +purse_decision_cb (struct ReserveContext *rc, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *purse_value) { - struct ReserveContext *rc = cls; struct ReserveSummary *rs; GNUNET_assert (rowid >= TALER_ARL_USE_PP ( diff --git a/src/auditor/taler-helper-auditor-transfer.c b/src/auditor/taler-helper-auditor-transfer.c @@ -43,7 +43,12 @@ #include "auditor-database/update_balance.h" #include "exchange-database/preflight.h" #include "exchange-database/rollback.h" +struct AggregationContext; +#define TALER_EXCHANGEDB_AGGREGATION_RESULT_CLOSURE struct AggregationContext #include "exchange-database/select_aggregations_above_serial.h" +struct ImportMissingWireContext; +#define TALER_EXCHANGEDB_WIRE_MISSING_RESULT_CLOSURE struct \ + ImportMissingWireContext #include "exchange-database/select_batch_deposits_missing_wire.h" #include "exchange-database/start_read_only.h" @@ -132,7 +137,7 @@ struct ImportMissingWireContext * Function called on deposits that need to be checked for their * wire transfer. * - * @param cls closure, points to a `struct ImportMissingWireContext` + * @param wc closure, points to a `struct ImportMissingWireContext` * @param batch_deposit_serial_id serial of the entry in the batch deposits table * @param total_amount value of the missing deposits, including fee * @param wire_target_h_payto where should the funds be wired @@ -140,13 +145,12 @@ struct ImportMissingWireContext */ static void import_wire_missing_cb ( - void *cls, + struct ImportMissingWireContext *wc, uint64_t batch_deposit_serial_id, const struct TALER_Amount *total_amount, const struct TALER_FullPaytoHashP *wire_target_h_payto, struct GNUNET_TIME_Timestamp deadline) { - struct ImportMissingWireContext *wc = cls; enum GNUNET_DB_QueryStatus qs; if (wc->err < 0) @@ -248,19 +252,18 @@ struct AggregationContext * Function called on aggregations that were done for * a (batch) deposit. * - * @param cls closure + * @param ac closure * @param amount affected amount * @param tracking_serial_id where in the table are we * @param batch_deposit_serial_id which batch deposit was aggregated */ static void clear_finished_transfer_cb ( - void *cls, + struct AggregationContext *ac, const struct TALER_Amount *amount, uint64_t tracking_serial_id, uint64_t batch_deposit_serial_id) { - struct AggregationContext *ac = cls; enum GNUNET_DB_QueryStatus qs; if (0 > ac->err) diff --git a/src/auditor/taler-helper-auditor-wire-debit.c b/src/auditor/taler-helper-auditor-wire-debit.c @@ -34,6 +34,10 @@ #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_curl_lib.h> #include "auditordb_lib.h" +/* WIRE_TRANSFER_OUT's callback typedef also lives in exchangedb_lib.h, so its + closure override must be established before that header is included. */ +struct WireAccount; +#define TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE struct WireAccount #include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" @@ -1105,7 +1109,7 @@ complain_out_not_found (void *cls, * Function called with details about outgoing wire transfers * as claimed by the exchange DB. * - * @param cls a `struct WireAccount` + * @param wa a `struct WireAccount` * @param rowid unique serial ID in wire_out table * @param date timestamp of the transfer (roughly) * @param wtid wire transfer subject @@ -1115,14 +1119,13 @@ complain_out_not_found (void *cls, */ static enum GNUNET_GenericReturnValue wire_out_cb ( - void *cls, + struct WireAccount *wa, uint64_t rowid, struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_FullPayto payto_uri, const struct TALER_Amount *amount) { - struct WireAccount *wa = cls; struct GNUNET_HashCode key; struct WireTransferOutInfo *roi; diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c @@ -50,6 +50,8 @@ #include "exchange-database/update_aggregation_transient.h" #include "exchange-database/event_notify.h" #include "exchange-database/wire_prepare_data_insert.h" +struct AggregationUnit; +#define TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE struct AggregationUnit #include "exchange-database/update_rules.h" /** @@ -643,12 +645,12 @@ rollback_aggregation (struct AggregationUnit *au) * Function called with legitimization rule set. Check * how that affects the aggregation process. * - * @param[in] cls a `struct AggregationUnit *` + * @param[in] au a `struct AggregationUnit *` * @param[in] rur new legitimization rule set to evaluate */ static void evaluate_rules ( - void *cls, + struct AggregationUnit *au, struct TALER_EXCHANGEDB_RuleUpdaterResult *rur); @@ -806,10 +808,9 @@ trigger_wire_transfer (struct AggregationUnit *au) static void evaluate_rules ( - void *cls, + struct AggregationUnit *au, struct TALER_EXCHANGEDB_RuleUpdaterResult *rur) { - struct AggregationUnit *au = cls; struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs = rur->lrs; enum GNUNET_DB_QueryStatus qs; const struct TALER_KYCLOGIC_KycRule *requirement; diff --git a/src/exchange/taler-exchange-httpd_common_kyc.c b/src/exchange/taler-exchange-httpd_common_kyc.c @@ -36,6 +36,9 @@ #include "exchange-database/preflight.h" #include "exchange-database/rollback.h" #include "exchange-database/start.h" +struct TEH_LegitimizationCheckHandle; +#define TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE \ + struct TEH_LegitimizationCheckHandle #include "exchange-database/update_rules.h" #include "exchange-database/account_history.h" #include "exchange-database/persist_aml_program_result.h" @@ -1370,16 +1373,15 @@ amount_iterator_wrapper_cb ( * Function called with the current rule set. Called with an open * database transaction. * - * @param cls a `struct TEH_LegitimizationCheckHandle *` + * @param lch a `struct TEH_LegitimizationCheckHandle *` * @param rur includes legitimziation rule set that applies to the account * (owned by callee, callee must free the lrs!) */ static void current_rules_cb ( - void *cls, + struct TEH_LegitimizationCheckHandle *lch, struct TALER_EXCHANGEDB_RuleUpdaterResult *rur) { - struct TEH_LegitimizationCheckHandle *lch = cls; struct TALER_KYCLOGIC_LegitimizationRuleSet *lrs = rur->lrs; struct GNUNET_AsyncScopeSave old_scope; enum GNUNET_DB_QueryStatus qs; diff --git a/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-accounts.c b/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-accounts.c @@ -26,6 +26,8 @@ #include "taler/taler_mhd_lib.h" #include "taler/taler_signatures.h" #include "taler-exchange-httpd.h" +struct ResponseContext; +#define TALER_EXCHANGEDB_AML_ACCOUNT_LIST_RESULT_CLOSURE struct ResponseContext #include "exchange-database/select_kyc_accounts.h" #include "taler-exchange-httpd_get-aml-OFFICER_PUB-accounts.h" @@ -127,7 +129,7 @@ free_rc (struct ResponseContext *rc) /** * Return account summary information. * - * @param cls closure + * @param rc closure * @param row_id current row in AML status table * @param h_payto account for which the attribute data is stored * @param open_time when was the account opened formally, @@ -141,7 +143,7 @@ free_rc (struct ResponseContext *rc) */ static void record_cb ( - void *cls, + struct ResponseContext *rc, uint64_t row_id, const struct TALER_NormalizedPaytoHashP *h_payto, struct GNUNET_TIME_Timestamp open_time, @@ -151,8 +153,6 @@ record_cb ( bool to_investigate, struct TALER_FullPayto payto) { - struct ResponseContext *rc = cls; - if ( (NULL == comments) && (GNUNET_TIME_absolute_is_never (open_time.abs_time)) ) comments = "transacted amounts below limits that trigger account opening"; diff --git a/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.c b/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.c @@ -27,6 +27,9 @@ #include "taler/taler_kyclogic_lib.h" #include "taler/taler_signatures.h" #include "taler-exchange-httpd.h" +struct ResponseContext; +#define TALER_EXCHANGEDB_AML_ATTRIBUTE_RESULT_CLOSURE struct ResponseContext +#define TALER_EXCHANGEDB_AML_HISTORY_RESULT_CLOSURE struct ResponseContext #include "exchange-database/select_aml_attributes.h" #include \ "taler-exchange-httpd_get-aml-OFFICER_PUB-attributes-H_NORMALIZED_PAYTO.h" @@ -321,7 +324,7 @@ dump_attachments (struct ResponseContext *rc, /** * Return AML account attributes. * - * @param cls closure + * @param rc closure * @param row_id current row in kyc_attributes table * @param collection_time when were the attributes collected * @param by_aml_officer was the attribute set filed by the AML officer @@ -331,7 +334,7 @@ dump_attachments (struct ResponseContext *rc, */ static void detail_cb ( - void *cls, + struct ResponseContext *rc, uint64_t row_id, struct GNUNET_TIME_Timestamp collection_time, bool by_aml_officer, @@ -340,7 +343,6 @@ detail_cb ( const void *enc_attributes) { static char *datadir = NULL; - struct ResponseContext *rc = cls; json_t *attrs; const char *form_id; @@ -479,7 +481,7 @@ pdf_cb (void *cls, * Function called with the latest AML decision on an * account. Used to build the cover page. * - * @param cls a `struct ResponseContext *` + * @param rc a `struct ResponseContext *` * @param outcome_serial_id row ID of the decision * @param decision_time when was the decision taken * @param justification what was the given justification @@ -492,7 +494,7 @@ pdf_cb (void *cls, */ static void build_cover_page ( - void *cls, + struct ResponseContext *rc, uint64_t outcome_serial_id, struct GNUNET_TIME_Timestamp decision_time, const char *justification, @@ -502,7 +504,6 @@ build_cover_page ( bool to_investigate, bool is_active) { - struct ResponseContext *rc = cls; json_t *cover; json_t *defr = NULL; diff --git a/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-decisions.c b/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-decisions.c @@ -25,6 +25,7 @@ #include "taler/taler_json_lib.h" #include "taler/taler_mhd_lib.h" #include "taler-exchange-httpd.h" +#define TALER_EXCHANGEDB_AML_DECISION_RESULT_CLOSURE json_t #include "exchange-database/select_aml_decisions.h" #include "taler-exchange-httpd_post-aml-OFFICER_PUB-decision.h" #include "taler-exchange-httpd_get-metrics.h" @@ -37,7 +38,7 @@ /** * Return AML status. * - * @param cls closure + * @param records closure * @param row_id current row in AML status table * @param justification human-readable reason for the decision * @param h_payto account for which the attribute data is stored @@ -53,7 +54,7 @@ */ static void record_cb ( - void *cls, + json_t *records, uint64_t row_id, const char *justification, const struct TALER_NormalizedPaytoHashP *h_payto, @@ -66,8 +67,6 @@ record_cb ( struct TALER_FullPayto payto, const json_t *account_rules) { - json_t *records = cls; - GNUNET_assert ( 0 == json_array_append_new ( diff --git a/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-kyc-statistics-NAMES.c b/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-kyc-statistics-NAMES.c @@ -25,6 +25,7 @@ #include "taler/taler_json_lib.h" #include "taler/taler_mhd_lib.h" #include "taler-exchange-httpd.h" +#define TALER_EXCHANGEDB_AML_STATISTICS_RESULT_CLOSURE json_t #include "exchange-database/select_aml_statistics.h" #include "taler-exchange-httpd_get-aml-OFFICER_PUB-kyc-statistics-NAMES.h" #include "taler-exchange-httpd_get-metrics.h" @@ -38,18 +39,16 @@ /** * Function called with AML statistics (counters). * - * @param cls JSON array to build + * @param stats JSON array to build * @param name name of the counter * @param cnt number of events for @a name in the query range */ static void add_stat ( - void *cls, + json_t *stats, const char *name, uint64_t cnt) { - json_t *stats = cls; - GNUNET_assert ( 0 == json_array_append_new ( diff --git a/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-legitimizations.c b/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-legitimizations.c @@ -25,6 +25,7 @@ #include "taler/taler_json_lib.h" #include "taler/taler_mhd_lib.h" #include "taler-exchange-httpd.h" +#define TALER_EXCHANGEDB_LEGITIMIZATION_MEASURE_RESULT_CLOSURE json_t #include "exchange-database/select_aml_measures.h" #include "taler-exchange-httpd_get-aml-OFFICER_PUB-legitimizations.h" #include "taler-exchange-httpd_get-metrics.h" @@ -37,7 +38,7 @@ /** * Return LEGITIMIZATION measure. * - * @param cls closure + * @param measures closure * @param h_payto hash of account the measure applies to * @param start_time when was the process started * @param jmeasures object of type ``LegitimizationMeasures`` @@ -46,15 +47,13 @@ */ static void record_cb ( - void *cls, + json_t *measures, struct TALER_NormalizedPaytoHashP *h_payto, struct GNUNET_TIME_Absolute start_time, const json_t *jmeasures, bool is_finished, uint64_t measure_serial_id) { - json_t *measures = cls; - GNUNET_assert ( 0 == json_array_append_new ( diff --git a/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-transfers.c b/src/exchange/taler-exchange-httpd_get-aml-OFFICER_PUB-transfers.c @@ -24,6 +24,11 @@ #include <pthread.h> #include "taler/taler_json_lib.h" #include "taler/taler_mhd_lib.h" +/* Tighten the closure of the shared AML-transfer iterator callback used below + (record_cb) to the JSON array it accumulates into. Must be defined before + taler-exchange-httpd.h, which transitively includes exchangedb_lib.h where the + TALER_EXCHANGEDB_AmlTransferCallback typedef lives. */ +#define TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE json_t #include "taler-exchange-httpd.h" #include "exchange-database/select_exchange_kycauth_transfers.h" #include "taler-exchange-httpd_get-aml-OFFICER_PUB-transfers.h" @@ -58,13 +63,12 @@ enum TransferType */ static void record_cb ( - void *cls, + json_t *transfers, uint64_t row_id, const char *payto_uri, struct GNUNET_TIME_Absolute execution_time, const struct TALER_Amount *amount) { - json_t *transfers = cls; GNUNET_assert ( 0 == diff --git a/src/exchange/taler-exchange-httpd_get-keys.c b/src/exchange/taler-exchange-httpd_get-keys.c @@ -33,6 +33,17 @@ #include "exchange-database/event_listen.h" #include "exchange-database/event_listen_cancel.h" #include "exchange-database/event_notify.h" +struct TEH_KeyStateHandle; +struct AddContext; +#define TALER_EXCHANGEDB_GLOBAL_FEE_RESULT_CLOSURE struct TEH_KeyStateHandle +#define TALER_EXCHANGEDB_WIRE_ACCOUNT_RESULT_CLOSURE json_t +#define TALER_EXCHANGEDB_WIRE_FEE_RESULT_CLOSURE struct AddContext +#define TALER_EXCHANGEDB_AUDITORS_RESULT_CLOSURE struct TEH_KeyStateHandle +#define TALER_EXCHANGEDB_ACTIVE_SIGNKEYS_RESULT_CLOSURE struct \ + TEH_KeyStateHandle +#define TALER_EXCHANGEDB_AUDITOR_DENOMINATIONS_RESULT_CLOSURE struct \ + TEH_KeyStateHandle +#define TALER_EXCHANGEDB_DENOMINATIONS_RESULT_CLOSURE struct TEH_KeyStateHandle #include "exchange-database/get_global_fees.h" #include "exchange-database/get_wire_accounts.h" #include "exchange-database/get_wire_fees.h" @@ -477,9 +488,9 @@ wire_update_event_cb (void *cls, /** - * Add information about a wire account to @a cls. + * Add information about a wire account to @a a. * - * @param cls a `json_t *` array to expand with wire account details + * @param a a `json_t *` array to expand with wire account details * @param payto_uri the exchange bank account URI to add * @param conversion_url URL of a conversion service, NULL if there is no conversion * @param open_banking_gateway URL of an open banking gateway, NULL if there is none @@ -493,7 +504,7 @@ wire_update_event_cb (void *cls, */ static void add_wire_account ( - void *cls, + json_t *a, const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, @@ -504,8 +515,6 @@ add_wire_account ( const char *bank_label, int64_t priority) { - json_t *a = cls; - if (GNUNET_OK != TALER_exchange_wire_signature_check ( payto_uri, @@ -591,9 +600,9 @@ struct AddContext /** - * Add information about a wire account to @a cls. + * Add information about a wire account to @a ac. * - * @param cls a `struct AddContext` + * @param ac a `struct AddContext` * @param fees the wire fees we charge * @param start_date from when are these fees valid (start date) * @param end_date until when are these fees valid (end date, exclusive) @@ -601,13 +610,12 @@ struct AddContext * fee (of purpose #TALER_SIGNATURE_MASTER_WIRE_FEES) */ static void -add_wire_fee (void *cls, +add_wire_fee (struct AddContext *ac, const struct TALER_WireFeeSet *fees, struct GNUNET_TIME_Timestamp start_date, struct GNUNET_TIME_Timestamp end_date, const struct TALER_MasterSignatureP *master_sig) { - struct AddContext *ac = cls; struct WireFeeSet *wfs; if (GNUNET_OK != @@ -1262,7 +1270,7 @@ TEH_keys_finished () /** * Function called with information about the exchange's denomination keys. * - * @param cls closure with a `struct TEH_KeyStateHandle *` + * @param ksh closure with a `struct TEH_KeyStateHandle *` * @param denom_pub public key of the denomination * @param h_denom_pub hash of @a denom_pub * @param meta meta data information about the denomination type (value, expirations, fees) @@ -1272,14 +1280,13 @@ TEH_keys_finished () */ static void denomination_info_cb ( - void *cls, + struct TEH_KeyStateHandle *ksh, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_DenominationHashP *h_denom_pub, const struct TALER_EXCHANGEDB_DenominationKeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig, bool recoup_possible) { - struct TEH_KeyStateHandle *ksh = cls; struct TEH_DenominationKey *dk; if (GNUNET_TIME_absolute_is_past (meta->expire_deposit.abs_time)) @@ -1349,19 +1356,18 @@ denomination_info_cb ( /** * Function called with information about the exchange's online signing keys. * - * @param cls closure with a `struct TEH_KeyStateHandle *` + * @param ksh closure with a `struct TEH_KeyStateHandle *` * @param exchange_pub the public key * @param meta meta data information about the denomination type (expirations) * @param master_sig master signature affirming the validity of this denomination */ static void signkey_info_cb ( - void *cls, + struct TEH_KeyStateHandle *ksh, const struct TALER_ExchangePublicKeyP *exchange_pub, const struct TALER_EXCHANGEDB_SignkeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig) { - struct TEH_KeyStateHandle *ksh = cls; struct SigningKey *sk; struct GNUNET_PeerIdentity pid; @@ -1450,19 +1456,18 @@ get_auditor_sigs (void *cls, /** * Function called with information about the exchange's auditors. * - * @param cls closure with a `struct TEH_KeyStateHandle *` + * @param ksh closure with a `struct TEH_KeyStateHandle *` * @param auditor_pub the public key of the auditor * @param auditor_url URL of the REST API of the auditor * @param auditor_name human readable official name of the auditor */ static void auditor_info_cb ( - void *cls, + struct TEH_KeyStateHandle *ksh, const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, const char *auditor_name) { - struct TEH_KeyStateHandle *ksh = cls; struct GetAuditorSigsContext ctx; ctx.denom_keys = json_array (); @@ -1490,19 +1495,18 @@ auditor_info_cb ( * Function called with information about the denominations * audited by the exchange's auditors. * - * @param cls closure with a `struct TEH_KeyStateHandle *` + * @param ksh closure with a `struct TEH_KeyStateHandle *` * @param auditor_pub the public key of an auditor * @param h_denom_pub hash of a denomination key audited by this auditor * @param auditor_sig signature from the auditor affirming this */ static void auditor_denom_cb ( - void *cls, + struct TEH_KeyStateHandle *ksh, const struct TALER_AuditorPublicKeyP *auditor_pub, const struct TALER_DenominationHashP *h_denom_pub, const struct TALER_AuditorSignatureP *auditor_sig) { - struct TEH_KeyStateHandle *ksh = cls; struct TEH_DenominationKey *dk; struct TEH_AuditorSignature *as; @@ -2479,7 +2483,7 @@ CLEANUP: /** * Called with information about global fees. * - * @param cls `struct TEH_KeyStateHandle *` we are building + * @param ksh `struct TEH_KeyStateHandle *` we are building * @param fees the global fees we charge * @param purse_timeout when do purses time out * @param history_expiration how long are account histories preserved @@ -2491,7 +2495,7 @@ CLEANUP: */ static void global_fee_info_cb ( - void *cls, + struct TEH_KeyStateHandle *ksh, const struct TALER_GlobalFeeSet *fees, struct GNUNET_TIME_Relative purse_timeout, struct GNUNET_TIME_Relative history_expiration, @@ -2500,7 +2504,6 @@ global_fee_info_cb ( struct GNUNET_TIME_Timestamp end_date, const struct TALER_MasterSignatureP *master_sig) { - struct TEH_KeyStateHandle *ksh = cls; struct TEH_GlobalFee *gf; if (GNUNET_OK != diff --git a/src/exchange/taler-exchange-httpd_get-kyc-info-ACCESS_TOKEN.c b/src/exchange/taler-exchange-httpd_get-kyc-info-ACCESS_TOKEN.c @@ -41,6 +41,8 @@ #include "exchange-database/insert_active_legitimization_measure.h" #include "exchange-database/lookup_h_payto_by_access_token.h" #include "exchange-database/lookup_kyc_status_by_token.h" +struct KycPoller; +#define TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE struct KycPoller #include "exchange-database/update_rules.h" @@ -488,16 +490,15 @@ resume_with_reply (struct KycPoller *kyp, /** * Function called with the current rule set. * - * @param cls closure with a `struct KycPoller *` + * @param kyp closure with a `struct KycPoller *` * @param rur includes legitimziation rule set that applies to the account * (owned by callee, callee must free the lrs!) */ static void current_rules_cb ( - void *cls, + struct KycPoller *kyp, struct TALER_EXCHANGEDB_RuleUpdaterResult *rur) { - struct KycPoller *kyp = cls; enum GNUNET_DB_QueryStatus qs; uint64_t legitimization_measure_last_row; json_t *jmeasures; diff --git a/src/exchange/taler-exchange-httpd_get-reserves-RESERVE_PUB-attest.c b/src/exchange/taler-exchange-httpd_get-reserves-RESERVE_PUB-attest.c @@ -26,6 +26,8 @@ #include "taler-exchange-httpd_get-keys.h" #include "taler-exchange-httpd_get-reserves-RESERVE_PUB-attest.h" #include "taler-exchange-httpd_responses.h" +struct ReserveAttestContext; +#define TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE struct ReserveAttestContext #include "exchange-database/select_kyc_attributes.h" @@ -52,7 +54,7 @@ struct ReserveAttestContext * Function called with information about all applicable * legitimization processes for the given user. * - * @param cls our `struct ReserveAttestContext *` + * @param rsc our `struct ReserveAttestContext *` * @param h_payto account for which the attribute data is stored * @param provider_name provider that must be checked * @param collection_time when was the data collected @@ -61,7 +63,7 @@ struct ReserveAttestContext * @param enc_attributes encrypted attribute data */ static void -kyc_process_cb (void *cls, +kyc_process_cb (struct ReserveAttestContext *rsc, const struct TALER_NormalizedPaytoHashP *h_payto, const char *provider_name, struct GNUNET_TIME_Timestamp collection_time, @@ -69,7 +71,6 @@ kyc_process_cb (void *cls, size_t enc_attributes_size, const void *enc_attributes) { - struct ReserveAttestContext *rsc = cls; json_t *attrs; json_t *val; const char *name; diff --git a/src/exchange/taler-exchange-httpd_get-transfers-WTID.c b/src/exchange/taler-exchange-httpd_get-transfers-WTID.c @@ -27,8 +27,12 @@ #include "taler-exchange-httpd_responses.h" #include "taler/taler_json_lib.h" #include "taler/taler_mhd_lib.h" +#define TALER_EXCHANGEDB_REFUND_COIN_RESULT_CLOSURE struct TALER_Amount #include "exchange-database/select_refunds_by_coin.h" #include "exchange-database/get_wire_fee.h" +struct WtidTransactionContext; +#define TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE \ + struct WtidTransactionContext #include "exchange-database/lookup_wire_transfer.h" @@ -264,16 +268,14 @@ struct WtidTransactionContext /** * Callback that totals up the applicable refunds. * - * @param cls a `struct TALER_Amount` where we keep the total + * @param total a `struct TALER_Amount` where we keep the total * @param amount_with_fee amount being refunded */ static enum GNUNET_GenericReturnValue -add_refunds (void *cls, +add_refunds (struct TALER_Amount *total, const struct TALER_Amount *amount_with_fee) { - struct TALER_Amount *total = cls; - if (0 > TALER_amount_add (total, total, @@ -290,7 +292,7 @@ add_refunds (void *cls, * Function called with the results of the lookup of the individual deposits * that were aggregated for the given wire transfer. * - * @param cls our context for transmission + * @param ctx our context for transmission * @param rowid which row in the DB is the information from (for diagnostics), ignored * @param merchant_pub public key of the merchant (should be same for all callbacks with the same @e cls) * @param account_payto_uri where the funds were sent @@ -304,7 +306,7 @@ add_refunds (void *cls, */ static void handle_deposit_data ( - void *cls, + struct WtidTransactionContext *ctx, uint64_t rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_FullPayto account_payto_uri, @@ -316,7 +318,6 @@ handle_deposit_data ( const struct TALER_Amount *deposit_value, const struct TALER_Amount *deposit_fee) { - struct WtidTransactionContext *ctx = cls; struct TALER_Amount total_refunds; struct TALER_Amount dval; struct TALER_Amount dfee; diff --git a/src/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-attest.c b/src/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-attest.c @@ -28,6 +28,8 @@ #include "taler-exchange-httpd_get-keys.h" #include "taler-exchange-httpd_post-reserves-RESERVE_PUB-attest.h" #include "taler-exchange-httpd_responses.h" +struct ReserveAttestContext; +#define TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE struct ReserveAttestContext #include "exchange-database/select_kyc_attributes.h" @@ -154,7 +156,7 @@ reply_reserve_attest_success (struct MHD_Connection *connection, * available attributes and merges them into our result * set based on the details requested by the client. * - * @param cls our `struct ReserveAttestContext *` + * @param rsc our `struct ReserveAttestContext *` * @param h_payto account for which the attribute data is stored * @param provider_name provider that must be checked * @param collection_time when was the data collected @@ -163,7 +165,7 @@ reply_reserve_attest_success (struct MHD_Connection *connection, * @param enc_attributes encrypted attribute data */ static void -kyc_process_cb (void *cls, +kyc_process_cb (struct ReserveAttestContext *rsc, const struct TALER_NormalizedPaytoHashP *h_payto, const char *provider_name, struct GNUNET_TIME_Timestamp collection_time, @@ -171,7 +173,6 @@ kyc_process_cb (void *cls, size_t enc_attributes_size, const void *enc_attributes) { - struct ReserveAttestContext *rsc = cls; json_t *attrs; json_t *val; const char *name; diff --git a/src/include/auditor-database/get_amount_arithmetic_inconsistency.h b/src/include/auditor-database/get_amount_arithmetic_inconsistency.h @@ -29,9 +29,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_AmountArithmeticInconsistencyCallback. + */ +#define TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_AmountArithmeticInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_AmountArithmeticInconsistency *dc); @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_amount_arithmetic_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_AmountArithmeticInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_auditor_closure_lags.h b/src/include/auditor-database/get_auditor_closure_lags.h @@ -31,9 +31,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_CLOSURE_LAGS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ClosureLagsCallback. + */ +#define TALER_AUDITORDB_CLOSURE_LAGS_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ClosureLagsCallback)( - void *cls, + TALER_AUDITORDB_CLOSURE_LAGS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_ClosureLags *dc); @@ -48,7 +54,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ClosureLagsCallback)( - void *cls, + TALER_AUDITORDB_CLOSURE_LAGS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_ClosureLags *dc); /** @@ -70,6 +76,7 @@ TALER_AUDITORDB_get_auditor_closure_lags (struct bool return_suppressed, TALER_AUDITORDB_ClosureLagsCallback cb , - void *cb_cls); + TALER_AUDITORDB_CLOSURE_LAGS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_bad_sig_losses.h b/src/include/auditor-database/get_bad_sig_losses.h @@ -29,9 +29,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_BAD_SIG_LOSSES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_BadSigLossesCallback. + */ +#define TALER_AUDITORDB_BAD_SIG_LOSSES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_BadSigLossesCallback)( - void *cls, + TALER_AUDITORDB_BAD_SIG_LOSSES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_BadSigLosses *dc); @@ -46,7 +52,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_BadSigLossesCallback)( - void *cls, + TALER_AUDITORDB_BAD_SIG_LOSSES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_BadSigLosses *dc); /** @@ -71,6 +77,7 @@ TALER_AUDITORDB_get_bad_sig_losses (struct TALER_AUDITORDB_PostgresContext *pg, op_spec_pub, const char *op, TALER_AUDITORDB_BadSigLossesCallback cb, - void *cb_cls); + TALER_AUDITORDB_BAD_SIG_LOSSES_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_balances.h b/src/include/auditor-database/get_balances.h @@ -33,16 +33,22 @@ struct TALER_AUDITORDB_Balances }; +#ifndef TALER_AUDITORDB_BALANCES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_BalancesCallback. + */ +#define TALER_AUDITORDB_BALANCES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_BalancesCallback)( - void *cls, + TALER_AUDITORDB_BALANCES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_Balances *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_BalancesCallback)( - void *cls, + TALER_AUDITORDB_BALANCES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_Balances *dc); /** @@ -58,6 +64,6 @@ enum GNUNET_DB_QueryStatus TALER_AUDITORDB_get_balances (struct TALER_AUDITORDB_PostgresContext *pg, const char *balance_key, TALER_AUDITORDB_BalancesCallback cb, - void *cb_cls); + TALER_AUDITORDB_BALANCES_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/auditor-database/get_coin_inconsistency.h b/src/include/auditor-database/get_coin_inconsistency.h @@ -30,9 +30,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_COIN_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_CoinInconsistencyCallback. + */ +#define TALER_AUDITORDB_COIN_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_CoinInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_COIN_INCONSISTENCY_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_CoinInconsistency *dc); @@ -49,7 +55,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_CoinInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_COIN_INCONSISTENCY_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_CoinInconsistency *dc); @@ -72,7 +78,8 @@ TALER_AUDITORDB_get_coin_inconsistency (struct TALER_AUDITORDB_PostgresContext * bool return_suppressed, TALER_AUDITORDB_CoinInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_COIN_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_denomination_key_validity_withdraw_inconsistency.h b/src/include/auditor-database/get_denomination_key_validity_withdraw_inconsistency.h @@ -29,9 +29,19 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef \ + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistencyCallback. + */ +#define \ + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_RESULT_CLOSURE \ + void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_RESULT_CLOSURE + *cls, const struct TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistency *dc); @@ -47,7 +57,8 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_RESULT_CLOSURE + *cls, const struct TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistency *dc); @@ -74,7 +85,7 @@ TALER_AUDITORDB_get_denomination_key_validity_withdraw_inconsistency (struct return_suppressed, TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistencyCallback cb, - void * - cb_cls); + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_denomination_pending.h b/src/include/auditor-database/get_denomination_pending.h @@ -21,9 +21,15 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_DenominationPendingCallback. + */ +#define TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DenominationPendingCallback)( - void *cls, + TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_DenominationPending *dc); @@ -31,7 +37,7 @@ typedef enum GNUNET_GenericReturnValue /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DenominationPendingCallback)( - void *cls, + TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_DenominationPending *dc); @@ -52,6 +58,7 @@ TALER_AUDITORDB_get_denomination_pending (struct uint64_t offset, TALER_AUDITORDB_DenominationPendingCallback cb, - void *cb_cls); + TALER_AUDITORDB_DENOMINATION_PENDING_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_denominations_without_sigs.h b/src/include/auditor-database/get_denominations_without_sigs.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIGS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_DenominationsWithoutSigsCallback. + */ +#define TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIGS_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DenominationsWithoutSigsCallback)( - void *cls, + TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIGS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_DenominationsWithoutSigs *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DenominationsWithoutSigsCallback)( - void *cls, + TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIGS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_DenominationsWithoutSigs *dc); /** @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_denominations_without_sigs (struct bool return_suppressed, TALER_AUDITORDB_DenominationsWithoutSigsCallback cb, - void *cb_cls); + TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIGS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_deposit_confirmations.h b/src/include/auditor-database/get_deposit_confirmations.h @@ -34,9 +34,15 @@ * @param dc the deposit confirmation itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_DepositConfirmationCallback. + */ +#define TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_DepositConfirmationCallback)( - void *cls, + TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_DepositConfirmation *dc); /** @@ -57,6 +63,6 @@ TALER_AUDITORDB_get_deposit_confirmations ( uint64_t offset, bool return_suppressed, TALER_AUDITORDB_DepositConfirmationCallback cb, - void *cb_cls); + TALER_AUDITORDB_DEPOSIT_CONFIRMATION_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/auditor-database/get_emergency.h b/src/include/auditor-database/get_emergency.h @@ -29,9 +29,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_EMERGENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_EmergencyCallback. + */ +#define TALER_AUDITORDB_EMERGENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_EmergencyCallback)( - void *cls, + TALER_AUDITORDB_EMERGENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_Emergency *dc); @@ -46,7 +52,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_EmergencyCallback)( - void *cls, + TALER_AUDITORDB_EMERGENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_Emergency *dc); /** @@ -66,6 +72,7 @@ TALER_AUDITORDB_get_emergency (struct TALER_AUDITORDB_PostgresContext *pg, uint64_t offset, bool return_suppressed, TALER_AUDITORDB_EmergencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_EMERGENCY_RESULT_CLOSURE *cb_cls) +; #endif diff --git a/src/include/auditor-database/get_emergency_by_count.h b/src/include/auditor-database/get_emergency_by_count.h @@ -29,9 +29,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_EMERGENCIES_BY_COUNT_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_EmergenciesByCountCallback. + */ +#define TALER_AUDITORDB_EMERGENCIES_BY_COUNT_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_EmergenciesByCountCallback)( - void *cls, + TALER_AUDITORDB_EMERGENCIES_BY_COUNT_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_EmergenciesByCount *dc); @@ -46,7 +52,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_EmergenciesByCountCallback)( - void *cls, + TALER_AUDITORDB_EMERGENCIES_BY_COUNT_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_EmergenciesByCount *dc); /** @@ -68,6 +74,7 @@ TALER_AUDITORDB_get_emergency_by_count (struct TALER_AUDITORDB_PostgresContext * bool return_suppressed, TALER_AUDITORDB_EmergenciesByCountCallback cb, - void *cb_cls); + TALER_AUDITORDB_EMERGENCIES_BY_COUNT_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_exchange_signkeys.h b/src/include/auditor-database/get_exchange_signkeys.h @@ -31,9 +31,15 @@ struct TALER_AUDITORDB_ExchangeSignkeys struct GNUNET_TIME_Absolute ep_expire_legal; }; +#ifndef TALER_AUDITORDB_EXCHANGE_SIGNKEYS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ExchangeSignkeysCallback. + */ +#define TALER_AUDITORDB_EXCHANGE_SIGNKEYS_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ExchangeSignkeysCallback)( - void *cls, + TALER_AUDITORDB_EXCHANGE_SIGNKEYS_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_ExchangeSignkeys *dc); @@ -54,6 +60,6 @@ TALER_AUDITORDB_get_exchange_signkeys ( int64_t limit, uint64_t offset, TALER_AUDITORDB_ExchangeSignkeysCallback cb, - void *cb_cls); + TALER_AUDITORDB_EXCHANGE_SIGNKEYS_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/auditor-database/get_fee_time_inconsistency.h b/src/include/auditor-database/get_fee_time_inconsistency.h @@ -29,9 +29,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_FEE_TIME_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_FeeTimeInconsistencyCallback. + */ +#define TALER_AUDITORDB_FEE_TIME_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_FeeTimeInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_FEE_TIME_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_FeeTimeInconsistency *dc); @@ -46,7 +52,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_FeeTimeInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_FEE_TIME_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_FeeTimeInconsistency *dc); /** @@ -68,6 +74,7 @@ TALER_AUDITORDB_get_fee_time_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_FeeTimeInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_FEE_TIME_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_misattribution_in_inconsistency.h b/src/include/auditor-database/get_misattribution_in_inconsistency.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_MisattributionInInconsistencyCallback. + */ +#define TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_MisattributionInInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_MisattributionInInconsistency *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_MisattributionInInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_MisattributionInInconsistency *dc); /** @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_misattribution_in_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_MisattributionInInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_progress_points.h b/src/include/auditor-database/get_progress_points.h @@ -35,16 +35,22 @@ struct TALER_AUDITORDB_Progress uint64_t progress_offset; }; +#ifndef TALER_AUDITORDB_PROGRESS_POINTS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ProgressPointsCallback. + */ +#define TALER_AUDITORDB_PROGRESS_POINTS_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ProgressPointsCallback)( - void *cls, + TALER_AUDITORDB_PROGRESS_POINTS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_Progress *pp); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ProgressPointsCallback)( - void *cls, + TALER_AUDITORDB_PROGRESS_POINTS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_Progress *pp); /** @@ -60,7 +66,8 @@ enum GNUNET_DB_QueryStatus TALER_AUDITORDB_get_progress_points (struct TALER_AUDITORDB_PostgresContext *pg, const char *progress_key, TALER_AUDITORDB_ProgressPointsCallback cb, - void *cb_cls); + TALER_AUDITORDB_PROGRESS_POINTS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_purse_not_closed_inconsistencies.h b/src/include/auditor-database/get_purse_not_closed_inconsistencies.h @@ -29,9 +29,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCIES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_PurseNotClosedInconsistenciesCallback. + */ +#define TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCIES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_PurseNotClosedInconsistenciesCallback)( - void *cls, + TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCIES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_PurseNotClosedInconsistencies *dc); @@ -46,7 +52,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_PurseNotClosedInconsistenciesCallback)( - void *cls, + TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCIES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_PurseNotClosedInconsistencies *dc); /** @@ -69,6 +75,7 @@ TALER_AUDITORDB_get_purse_not_closed_inconsistencies (struct bool return_suppressed, TALER_AUDITORDB_PurseNotClosedInconsistenciesCallback cb, - void *cb_cls); + TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCIES_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_purses.h b/src/include/auditor-database/get_purses.h @@ -33,9 +33,15 @@ struct TALER_AUDITORDB_Purses }; +#ifndef TALER_AUDITORDB_PURSES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_PursesCallback. + */ +#define TALER_AUDITORDB_PURSES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_PursesCallback)( - void *cls, + TALER_AUDITORDB_PURSES_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_Purses *dc); @@ -43,7 +49,7 @@ typedef enum GNUNET_GenericReturnValue /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_PursesCallback)( - void *cls, + TALER_AUDITORDB_PURSES_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_Purses *dc); @@ -62,6 +68,6 @@ TALER_AUDITORDB_get_purses (struct TALER_AUDITORDB_PostgresContext *pg, int64_t limit, uint64_t offset, TALER_AUDITORDB_PursesCallback cb, - void *cb_cls); + TALER_AUDITORDB_PURSES_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/auditor-database/get_reserve_balance_insufficient_inconsistency.h b/src/include/auditor-database/get_reserve_balance_insufficient_inconsistency.h @@ -29,9 +29,19 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef \ + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ReserveBalanceInsufficientInconsistencyCallback. + */ +#define \ + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_RESULT_CLOSURE \ + void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveBalanceInsufficientInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_RESULT_CLOSURE *cls + , const struct TALER_AUDITORDB_ReserveBalanceInsufficientInconsistency *dc); @@ -46,7 +56,8 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveBalanceInsufficientInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_RESULT_CLOSURE *cls + , const struct TALER_AUDITORDB_ReserveBalanceInsufficientInconsistency *dc); /** @@ -71,6 +82,7 @@ TALER_AUDITORDB_get_reserve_balance_insufficient_inconsistency (struct , TALER_AUDITORDB_ReserveBalanceInsufficientInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_reserve_balance_summary_wrong_inconsistency.h b/src/include/auditor-database/get_reserve_balance_summary_wrong_inconsistency.h @@ -23,16 +23,27 @@ #include "auditordb_lib.h" +#ifndef \ + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistencyCallback. + */ +#define \ + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_RESULT_CLOSURE \ + void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_RESULT_CLOSURE * + cls, const struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_RESULT_CLOSURE * + cls, const struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency *dc); /** @@ -57,6 +68,7 @@ TALER_AUDITORDB_get_reserve_balance_summary_wrong_inconsistency (struct return_suppressed, TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_reserve_in_inconsistency.h b/src/include/auditor-database/get_reserve_in_inconsistency.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ReserveInInconsistencyCallback. + */ +#define TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveInInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_ReserveInInconsistency *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveInInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_ReserveInInconsistency *dc); /** @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_reserve_in_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_ReserveInInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_reserve_not_closed_inconsistency.h b/src/include/auditor-database/get_reserve_not_closed_inconsistency.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ReserveNotClosedInconsistencyCallback. + */ +#define TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveNotClosedInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_ReserveNotClosedInconsistency *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReserveNotClosedInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_ReserveNotClosedInconsistency *dc); /** @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_reserve_not_closed_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_ReserveNotClosedInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_reserves.h b/src/include/auditor-database/get_reserves.h @@ -39,9 +39,15 @@ struct TALER_AUDITORDB_Reserves }; +#ifndef TALER_AUDITORDB_RESERVES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ReservesCallback. + */ +#define TALER_AUDITORDB_RESERVES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReservesCallback)( - void *cls, + TALER_AUDITORDB_RESERVES_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_Reserves *dc); @@ -49,7 +55,7 @@ typedef enum GNUNET_GenericReturnValue /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ReservesCallback)( - void *cls, + TALER_AUDITORDB_RESERVES_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_Reserves *dc); @@ -68,6 +74,6 @@ TALER_AUDITORDB_get_reserves (struct TALER_AUDITORDB_PostgresContext *pg, int64_t limit, uint64_t offset, TALER_AUDITORDB_ReservesCallback cb, - void *cb_cls); + TALER_AUDITORDB_RESERVES_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/auditor-database/get_row_inconsistency.h b/src/include/auditor-database/get_row_inconsistency.h @@ -30,9 +30,15 @@ * @param dc the structure itself * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating */ +#ifndef TALER_AUDITORDB_ROW_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_RowInconsistencyCallback. + */ +#define TALER_AUDITORDB_ROW_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_RowInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_ROW_INCONSISTENCY_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_RowInconsistency *dc); @@ -49,7 +55,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_RowInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_ROW_INCONSISTENCY_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_AUDITORDB_RowInconsistency *dc); @@ -72,7 +78,8 @@ TALER_AUDITORDB_get_row_inconsistency (struct TALER_AUDITORDB_PostgresContext * bool return_suppressed, TALER_AUDITORDB_RowInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_ROW_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_row_minor_inconsistencies.h b/src/include/auditor-database/get_row_minor_inconsistencies.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_ROW_MINOR_INCONSISTENCIES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_RowMinorInconsistenciesCallback. + */ +#define TALER_AUDITORDB_ROW_MINOR_INCONSISTENCIES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_RowMinorInconsistenciesCallback)( - void *cls, + TALER_AUDITORDB_ROW_MINOR_INCONSISTENCIES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_RowMinorInconsistencies *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_RowMinorInconsistenciesCallback)( - void *cls, + TALER_AUDITORDB_ROW_MINOR_INCONSISTENCIES_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_RowMinorInconsistencies *dc); /** @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_row_minor_inconsistencies (struct bool return_suppressed, TALER_AUDITORDB_RowMinorInconsistenciesCallback cb, - void *cb_cls); + TALER_AUDITORDB_ROW_MINOR_INCONSISTENCIES_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/get_wire_format_inconsistency.h b/src/include/auditor-database/get_wire_format_inconsistency.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_WireFormatInconsistencyCallback. + */ +#define TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_WireFormatInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_WireFormatInconsistency *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_WireFormatInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_WireFormatInconsistency *dc); /** @@ -55,6 +61,7 @@ TALER_AUDITORDB_get_wire_format_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_WireFormatInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif // AUDITOR_DATABASE_GET_WIRE_FORMAT_INCONSISTENCY_H diff --git a/src/include/auditor-database/get_wire_out_inconsistency.h b/src/include/auditor-database/get_wire_out_inconsistency.h @@ -23,16 +23,22 @@ #include "auditordb_lib.h" +#ifndef TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_WireOutInconsistencyCallback. + */ +#define TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_WireOutInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_WireOutInconsistency *dc); /* Callback typedefs */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_WireOutInconsistencyCallback)( - void *cls, + TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_WireOutInconsistency *dc); /** @@ -54,6 +60,7 @@ TALER_AUDITORDB_get_wire_out_inconsistency (struct bool return_suppressed, TALER_AUDITORDB_WireOutInconsistencyCallback cb, - void *cb_cls); + TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY_RESULT_CLOSURE + *cb_cls); #endif // AUDITOR_DATABASE_GET_WIRE_OUT_INCONSISTENCY_H diff --git a/src/include/auditor-database/select_early_aggregations.h b/src/include/auditor-database/select_early_aggregations.h @@ -65,9 +65,15 @@ struct TALER_AUDITORDB_EarlyAggregation * @param ea event data * @return #GNUNET_OK to continue to iterate */ +#ifndef TALER_AUDITORDB_EARLY_AGGREGATIONS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_EarlyAggregationsCallback. + */ +#define TALER_AUDITORDB_EARLY_AGGREGATIONS_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_EarlyAggregationsCallback)( - void *cls, + TALER_AUDITORDB_EARLY_AGGREGATIONS_RESULT_CLOSURE *cls, const struct TALER_AUDITORDB_EarlyAggregation *ea); @@ -90,7 +96,7 @@ TALER_AUDITORDB_select_early_aggregations ( uint64_t offset, bool return_suppressed, TALER_AUDITORDB_EarlyAggregationsCallback cb, - void *cb_cls); + TALER_AUDITORDB_EARLY_AGGREGATIONS_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/auditor-database/select_historic_denom_revenue.h b/src/include/auditor-database/select_historic_denom_revenue.h @@ -42,9 +42,15 @@ * #GNUNET_NO to stop processing further rows * #GNUNET_SYSERR or other values on error. */ +#ifndef TALER_AUDITORDB_HISTORIC_DENOMINATION_REVENUE_DATA_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_HistoricDenominationRevenueDataCallback. + */ +#define TALER_AUDITORDB_HISTORIC_DENOMINATION_REVENUE_DATA_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)( - void *cls, + TALER_AUDITORDB_HISTORIC_DENOMINATION_REVENUE_DATA_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_DenominationHashP *denom_pub_hash, struct GNUNET_TIME_Timestamp revenue_timestamp, @@ -81,7 +87,7 @@ struct TALER_AUDITORDB_HistoricDenominationRevenue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)( - void *cls, + TALER_AUDITORDB_HISTORIC_DENOMINATION_REVENUE_DATA_RESULT_CLOSURE *cls, uint64_t serial_id, const struct TALER_DenominationHashP *denom_pub_hash, struct GNUNET_TIME_Timestamp revenue_timestamp, @@ -106,6 +112,7 @@ TALER_AUDITORDB_select_historic_denom_revenue (struct uint64_t offset, TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb, - void *cb_cls); + TALER_AUDITORDB_HISTORIC_DENOMINATION_REVENUE_DATA_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/select_historic_reserve_revenue.h b/src/include/auditor-database/select_historic_reserve_revenue.h @@ -40,9 +40,15 @@ * #GNUNET_NO to stop processing further rows * #GNUNET_SYSERR or other values on error. */ +#ifndef TALER_AUDITORDB_HISTORIC_RESERVE_REVENUE_DATA_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_HistoricReserveRevenueDataCallback. + */ +#define TALER_AUDITORDB_HISTORIC_RESERVE_REVENUE_DATA_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)( - void *cls, + TALER_AUDITORDB_HISTORIC_RESERVE_REVENUE_DATA_RESULT_CLOSURE *cls, uint64_t serial_id, struct GNUNET_TIME_Timestamp start_time, struct GNUNET_TIME_Timestamp end_time, @@ -66,7 +72,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)( - void *cls, + TALER_AUDITORDB_HISTORIC_RESERVE_REVENUE_DATA_RESULT_CLOSURE *cls, uint64_t serial_id, struct GNUNET_TIME_Timestamp start_time, struct GNUNET_TIME_Timestamp end_time, @@ -90,7 +96,8 @@ TALER_AUDITORDB_select_historic_reserve_revenue (struct uint64_t offset, TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb, - void *cb_cls); + TALER_AUDITORDB_HISTORIC_RESERVE_REVENUE_DATA_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/select_pending_deposits.h b/src/include/auditor-database/select_pending_deposits.h @@ -38,9 +38,15 @@ * @param deadline what was the earliest requested wire transfer deadline * @param suppressed true if this report was suppressed */ +#ifndef TALER_AUDITORDB_WIRE_MISSING_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_WireMissingCallback. + */ +#define TALER_AUDITORDB_WIRE_MISSING_RESULT_CLOSURE void +#endif typedef void (*TALER_AUDITORDB_WireMissingCallback) ( - void *cls, + TALER_AUDITORDB_WIRE_MISSING_RESULT_CLOSURE *cls, uint64_t row_id, uint64_t batch_deposit_serial_id, const struct TALER_Amount *total_amount, @@ -64,7 +70,7 @@ typedef void */ typedef void (*TALER_AUDITORDB_WireMissingCallback) ( - void *cls, + TALER_AUDITORDB_WIRE_MISSING_RESULT_CLOSURE *cls, uint64_t row_id, uint64_t batch_deposit_serial_id, const struct TALER_Amount *total_amount, @@ -93,6 +99,7 @@ TALER_AUDITORDB_select_pending_deposits (struct uint64_t offset, bool return_suppressed, TALER_AUDITORDB_WireMissingCallback cb, - void *cb_cls); + TALER_AUDITORDB_WIRE_MISSING_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/auditor-database/select_purse_expired.h b/src/include/auditor-database/select_purse_expired.h @@ -35,9 +35,15 @@ * @param expiration_date when did the purse expire? * @return #GNUNET_OK to continue to iterate */ +#ifndef TALER_AUDITORDB_EXPIRED_PURSE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_AUDITORDB_ExpiredPurseCallback. + */ +#define TALER_AUDITORDB_EXPIRED_PURSE_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ExpiredPurseCallback)( - void *cls, + TALER_AUDITORDB_EXPIRED_PURSE_RESULT_CLOSURE *cls, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_Amount *balance, struct GNUNET_TIME_Timestamp expiration_date); @@ -55,7 +61,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_ExpiredPurseCallback)( - void *cls, + TALER_AUDITORDB_EXPIRED_PURSE_RESULT_CLOSURE *cls, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_Amount *balance, struct GNUNET_TIME_Timestamp expiration_date); @@ -72,6 +78,7 @@ enum GNUNET_DB_QueryStatus TALER_AUDITORDB_select_purse_expired (struct TALER_AUDITORDB_PostgresContext *pg , TALER_AUDITORDB_ExpiredPurseCallback cb, - void *cb_cls); + TALER_AUDITORDB_EXPIRED_PURSE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/get_expired_reserves.h b/src/include/exchange-database/get_expired_reserves.h @@ -41,9 +41,15 @@ * #GNUNET_NO to retry * #GNUNET_SYSERR on hard failures (exit) */ +#ifndef TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReserveExpiredCallback. + */ +#define TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveExpiredCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE *cls, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *left, const struct TALER_FullPayto account_details, @@ -66,6 +72,7 @@ TALER_EXCHANGEDB_get_expired_reserves (struct TALER_EXCHANGEDB_PostgresContext * struct GNUNET_TIME_Timestamp now, TALER_EXCHANGEDB_ReserveExpiredCallback rec, - void *rec_cls); + TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE + *rec_cls); #endif diff --git a/src/include/exchange-database/get_global_fees.h b/src/include/exchange-database/get_global_fees.h @@ -39,9 +39,15 @@ * @param master_sig master key signature affirming that this is the correct * fee (of purpose #TALER_SIGNATURE_MASTER_GLOBAL_FEES) */ +#ifndef TALER_EXCHANGEDB_GLOBAL_FEE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_GlobalFeeCallback. + */ +#define TALER_EXCHANGEDB_GLOBAL_FEE_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_GlobalFeeCallback)( - void *cls, + TALER_EXCHANGEDB_GLOBAL_FEE_RESULT_CLOSURE *cls, const struct TALER_GlobalFeeSet *fees, struct GNUNET_TIME_Relative purse_timeout, struct GNUNET_TIME_Relative history_expiration, @@ -67,7 +73,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_GlobalFeeCallback)( - void *cls, + TALER_EXCHANGEDB_GLOBAL_FEE_RESULT_CLOSURE *cls, const struct TALER_GlobalFeeSet *fees, struct GNUNET_TIME_Relative purse_timeout, struct GNUNET_TIME_Relative history_expiration, @@ -88,6 +94,7 @@ enum GNUNET_DB_QueryStatus TALER_TALER_EXCHANGEDB_get_global_fees (struct TALER_EXCHANGEDB_PostgresContext *pg, TALER_EXCHANGEDB_GlobalFeeCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_GLOBAL_FEE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/get_unfinished_close_requests.h b/src/include/exchange-database/get_unfinished_close_requests.h @@ -41,9 +41,15 @@ * #GNUNET_NO to retry * #GNUNET_SYSERR on hard failures (exit) */ +#ifndef TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReserveExpiredCallback. + */ +#define TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveExpiredCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE *cls, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *left, const struct TALER_FullPayto account_details, @@ -68,6 +74,7 @@ TALER_EXCHANGEDB_get_unfinished_close_requests (struct , TALER_EXCHANGEDB_ReserveExpiredCallback rec, - void *rec_cls); + TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE + *rec_cls); #endif diff --git a/src/include/exchange-database/get_wire_accounts.h b/src/include/exchange-database/get_wire_accounts.h @@ -41,9 +41,15 @@ * @param bank_label label the wallet should use to display the account, can be NULL * @param priority priority for ordering bank account labels */ +#ifndef TALER_EXCHANGEDB_WIRE_ACCOUNT_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_WireAccountCallback. + */ +#define TALER_EXCHANGEDB_WIRE_ACCOUNT_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_WireAccountCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_ACCOUNT_RESULT_CLOSURE *cls, const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, @@ -73,7 +79,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_WireAccountCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_ACCOUNT_RESULT_CLOSURE *cls, const struct TALER_FullPayto payto_uri, const char *conversion_url, const char *open_banking_gateway, @@ -95,6 +101,7 @@ typedef void enum GNUNET_DB_QueryStatus TALER_EXCHANGEDB_get_wire_accounts (struct TALER_EXCHANGEDB_PostgresContext *pg, TALER_EXCHANGEDB_WireAccountCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_WIRE_ACCOUNT_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/get_wire_fees.h b/src/include/exchange-database/get_wire_fees.h @@ -36,9 +36,15 @@ * @param master_sig master key signature affirming that this is the correct * fee (of purpose #TALER_SIGNATURE_MASTER_WIRE_FEES) */ +#ifndef TALER_EXCHANGEDB_WIRE_FEE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_WireFeeCallback. + */ +#define TALER_EXCHANGEDB_WIRE_FEE_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_WireFeeCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_FEE_RESULT_CLOSURE *cls, const struct TALER_WireFeeSet *fees, struct GNUNET_TIME_Timestamp start_date, struct GNUNET_TIME_Timestamp end_date, @@ -58,7 +64,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_WireFeeCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_FEE_RESULT_CLOSURE *cls, const struct TALER_WireFeeSet *fees, struct GNUNET_TIME_Timestamp start_date, struct GNUNET_TIME_Timestamp end_date, @@ -79,6 +85,7 @@ TALER_TALER_EXCHANGEDB_get_wire_fees (struct TALER_EXCHANGEDB_PostgresContext * pg, const char *wire_method, TALER_EXCHANGEDB_WireFeeCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_WIRE_FEE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/iterate_active_auditors.h b/src/include/exchange-database/iterate_active_auditors.h @@ -33,9 +33,15 @@ * @param auditor_url URL of the REST API of the auditor * @param auditor_name human readable official name of the auditor */ +#ifndef TALER_EXCHANGEDB_AUDITORS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AuditorsCallback. + */ +#define TALER_EXCHANGEDB_AUDITORS_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AuditorsCallback)( - void *cls, + TALER_EXCHANGEDB_AUDITORS_RESULT_CLOSURE *cls, const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, const char *auditor_name); @@ -52,7 +58,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AuditorsCallback)( - void *cls, + TALER_EXCHANGEDB_AUDITORS_RESULT_CLOSURE *cls, const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, const char *auditor_name); @@ -70,6 +76,7 @@ enum GNUNET_DB_QueryStatus TALER_EXCHANGEDB_iterate_active_auditors (struct TALER_EXCHANGEDB_PostgresContext *pg, TALER_EXCHANGEDB_AuditorsCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AUDITORS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/iterate_active_signkeys.h b/src/include/exchange-database/iterate_active_signkeys.h @@ -34,9 +34,15 @@ * @param meta meta data information about the signing type (expirations) * @param master_sig master signature affirming the validity of this denomination */ +#ifndef TALER_EXCHANGEDB_ACTIVE_SIGNKEYS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ActiveSignkeysCallback. + */ +#define TALER_EXCHANGEDB_ACTIVE_SIGNKEYS_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_ActiveSignkeysCallback)( - void *cls, + TALER_EXCHANGEDB_ACTIVE_SIGNKEYS_RESULT_CLOSURE *cls, const struct TALER_ExchangePublicKeyP *exchange_pub, const struct TALER_EXCHANGEDB_SignkeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig); @@ -54,7 +60,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_ActiveSignkeysCallback)( - void *cls, + TALER_EXCHANGEDB_ACTIVE_SIGNKEYS_RESULT_CLOSURE *cls, const struct TALER_ExchangePublicKeyP *exchange_pub, const struct TALER_EXCHANGEDB_SignkeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig); @@ -74,6 +80,7 @@ TALER_EXCHANGEDB_iterate_active_signkeys (struct TALER_EXCHANGEDB_PostgresContext *pg, TALER_EXCHANGEDB_ActiveSignkeysCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ACTIVE_SIGNKEYS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/iterate_auditor_denominations.h b/src/include/exchange-database/iterate_auditor_denominations.h @@ -34,9 +34,15 @@ * @param h_denom_pub hash of a denomination key audited by this auditor * @param auditor_sig signature from the auditor affirming this */ +#ifndef TALER_EXCHANGEDB_AUDITOR_DENOMINATIONS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AuditorDenominationsCallback. + */ +#define TALER_EXCHANGEDB_AUDITOR_DENOMINATIONS_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AuditorDenominationsCallback)( - void *cls, + TALER_EXCHANGEDB_AUDITOR_DENOMINATIONS_RESULT_CLOSURE *cls, const struct TALER_AuditorPublicKeyP *auditor_pub, const struct TALER_DenominationHashP *h_denom_pub, const struct TALER_AuditorSignatureP *auditor_sig); @@ -54,7 +60,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AuditorDenominationsCallback)( - void *cls, + TALER_EXCHANGEDB_AUDITOR_DENOMINATIONS_RESULT_CLOSURE *cls, const struct TALER_AuditorPublicKeyP *auditor_pub, const struct TALER_DenominationHashP *h_denom_pub, const struct TALER_AuditorSignatureP *auditor_sig); @@ -76,6 +82,7 @@ TALER_EXCHANGEDB_iterate_auditor_denominations (struct , TALER_EXCHANGEDB_AuditorDenominationsCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AUDITOR_DENOMINATIONS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/iterate_denomination_info.h b/src/include/exchange-database/iterate_denomination_info.h @@ -35,9 +35,15 @@ * @param denom_pub public key of the denomination * @param issue detailed information about the denomination (value, expiration times, fees); */ +#ifndef TALER_EXCHANGEDB_DENOMINATION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_DenominationCallback. + */ +#define TALER_EXCHANGEDB_DENOMINATION_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_DenominationCallback)( - void *cls, + TALER_EXCHANGEDB_DENOMINATION_RESULT_CLOSURE *cls, uint64_t denom_serial, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue); @@ -56,7 +62,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_DenominationCallback)( - void *cls, + TALER_EXCHANGEDB_DENOMINATION_RESULT_CLOSURE *cls, uint64_t denom_serial, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_EXCHANGEDB_DenominationKeyInformation *issue); @@ -75,6 +81,7 @@ TALER_EXCHANGEDB_iterate_denomination_info (struct , TALER_EXCHANGEDB_DenominationCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_DENOMINATION_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/iterate_denominations.h b/src/include/exchange-database/iterate_denominations.h @@ -37,9 +37,15 @@ * @param recoup_possible true if the key was revoked and clients can currently recoup * coins of this denomination */ +#ifndef TALER_EXCHANGEDB_DENOMINATIONS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_DenominationsCallback. + */ +#define TALER_EXCHANGEDB_DENOMINATIONS_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_DenominationsCallback)( - void *cls, + TALER_EXCHANGEDB_DENOMINATIONS_RESULT_CLOSURE *cls, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_DenominationHashP *h_denom_pub, const struct TALER_EXCHANGEDB_DenominationKeyMetaData *meta, @@ -63,6 +69,7 @@ TALER_EXCHANGEDB_iterate_denominations (struct TALER_EXCHANGEDB_PostgresContext *pg, TALER_EXCHANGEDB_DenominationsCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_DENOMINATIONS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/iterate_kyc_reference.h b/src/include/exchange-database/iterate_kyc_reference.h @@ -37,9 +37,15 @@ * @param provider_user_id UID at a provider (can be NULL) * @param legi_id legitimization process ID (can be NULL) */ +#ifndef TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_LegitimizationProcessCallback. + */ +#define TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_LegitimizationProcessCallback)( - void *cls, + TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE *cls, const char *kyc_provider_name, const char *provider_user_id, const char *legi_id); @@ -59,7 +65,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_LegitimizationProcessCallback)( - void *cls, + TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE *cls, const char *kyc_provider_name, const char *provider_user_id, const char *legi_id); @@ -82,6 +88,7 @@ TALER_EXCHANGEDB_iterate_kyc_reference (struct h_payto, TALER_EXCHANGEDB_LegitimizationProcessCallback lpc, - void *lpc_cls); + TALER_EXCHANGEDB_LEGITIMIZATION_PROCESS_RESULT_CLOSURE + *lpc_cls); #endif diff --git a/src/include/exchange-database/lookup_aml_history.h b/src/include/exchange-database/lookup_aml_history.h @@ -41,9 +41,15 @@ * after the decision * @param is_active is this the active decision */ +#ifndef TALER_EXCHANGEDB_AML_HISTORY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlHistoryCallback. + */ +#define TALER_EXCHANGEDB_AML_HISTORY_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlHistoryCallback) ( - void *cls, + TALER_EXCHANGEDB_AML_HISTORY_RESULT_CLOSURE *cls, uint64_t outcome_serial_id, struct GNUNET_TIME_Timestamp decision_time, const char *justification, @@ -72,7 +78,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AmlHistoryCallback) ( - void *cls, + TALER_EXCHANGEDB_AML_HISTORY_RESULT_CLOSURE *cls, uint64_t outcome_serial_id, struct GNUNET_TIME_Timestamp decision_time, const char *justification, @@ -102,7 +108,8 @@ TALER_EXCHANGEDB_lookup_aml_history (struct TALER_EXCHANGEDB_PostgresContext *pg uint64_t offset, int64_t limit, TALER_EXCHANGEDB_AmlHistoryCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AML_HISTORY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/lookup_kyc_history.h b/src/include/exchange-database/lookup_kyc_history.h @@ -45,9 +45,15 @@ * @param encrypted_attributes_len number of bytes in @a encrypted_attributes * @param encrypted_attributes encrypted KYC attributes */ +#ifndef TALER_EXCHANGEDB_KYC_HISTORY_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_KycHistoryCallback. + */ +#define TALER_EXCHANGEDB_KYC_HISTORY_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_KycHistoryCallback) ( - void *cls, + TALER_EXCHANGEDB_KYC_HISTORY_RESULT_CLOSURE *cls, const char *provider_name, bool finished, enum TALER_ErrorCode error_code, @@ -82,7 +88,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_KycHistoryCallback) ( - void *cls, + TALER_EXCHANGEDB_KYC_HISTORY_RESULT_CLOSURE *cls, const char *provider_name, bool finished, enum TALER_ErrorCode error_code, @@ -110,6 +116,7 @@ TALER_EXCHANGEDB_lookup_kyc_history (struct TALER_EXCHANGEDB_PostgresContext *pg const struct TALER_NormalizedPaytoHashP * h_payto, TALER_EXCHANGEDB_KycHistoryCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_KYC_HISTORY_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/lookup_records_by_table.h b/src/include/exchange-database/lookup_records_by_table.h @@ -574,9 +574,15 @@ struct TALER_EXCHANGEDB_TableData * @return #GNUNET_OK to continue to iterate, * #GNUNET_SYSERR to fail with an error */ +#ifndef TALER_EXCHANGEDB_REPLICATION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReplicationCallback. + */ +#define TALER_EXCHANGEDB_REPLICATION_RESULT_CLOSURE void +#endif typedef int (*TALER_EXCHANGEDB_ReplicationCallback)( - void *cls, + TALER_EXCHANGEDB_REPLICATION_RESULT_CLOSURE *cls, const struct TALER_EXCHANGEDB_TableData *td); @@ -590,7 +596,7 @@ typedef int */ typedef int (*TALER_EXCHANGEDB_ReplicationCallback)( - void *cls, + TALER_EXCHANGEDB_REPLICATION_RESULT_CLOSURE *cls, const struct TALER_EXCHANGEDB_TableData *td); @@ -612,7 +618,7 @@ TALER_EXCHANGEDB_lookup_records_by_table ( enum TALER_EXCHANGEDB_ReplicatedTable table, uint64_t serial, TALER_EXCHANGEDB_ReplicationCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_REPLICATION_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/exchange-database/lookup_wire_transfer.h b/src/include/exchange-database/lookup_wire_transfer.h @@ -42,9 +42,15 @@ * @param coin_value amount contributed by this coin in total (with fee) * @param coin_fee applicable fee for this coin */ +#ifndef TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AggregationDataCallback. + */ +#define TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AggregationDataCallback)( - void *cls, + TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_FullPayto account_payto_uri, @@ -76,7 +82,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AggregationDataCallback)( - void *cls, + TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_FullPayto account_payto_uri, @@ -106,6 +112,7 @@ TALER_EXCHANGEDB_lookup_wire_transfer (struct TALER_EXCHANGEDB_PostgresContext * wtid, TALER_EXCHANGEDB_AggregationDataCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AGGREGATION_DATA_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_account_merges_above_serial_id.h b/src/include/exchange-database/select_account_merges_above_serial_id.h @@ -44,9 +44,15 @@ * @param reserve_sig signature by reserve approving the merge * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_ACCOUNT_MERGE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AccountMergeCallback. + */ +#define TALER_EXCHANGEDB_ACCOUNT_MERGE_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_AccountMergeCallback)( - void *cls, + TALER_EXCHANGEDB_ACCOUNT_MERGE_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_PurseContractPublicKeyP *purse_pub, @@ -77,6 +83,7 @@ TALER_EXCHANGEDB_select_account_merges_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_AccountMergeCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ACCOUNT_MERGE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_aggregations_above_serial.h b/src/include/exchange-database/select_aggregations_above_serial.h @@ -35,9 +35,15 @@ * @param tracking_serial_id where in the table are we * @param batch_deposit_serial_id which batch deposit was aggregated */ +#ifndef TALER_EXCHANGEDB_AGGREGATION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AggregationCallback. + */ +#define TALER_EXCHANGEDB_AGGREGATION_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AggregationCallback)( - void *cls, + TALER_EXCHANGEDB_AGGREGATION_RESULT_CLOSURE *cls, const struct TALER_Amount *amount, uint64_t tracking_serial_id, uint64_t batch_deposit_serial_id); @@ -55,7 +61,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AggregationCallback)( - void *cls, + TALER_EXCHANGEDB_AGGREGATION_RESULT_CLOSURE *cls, const struct TALER_Amount *amount, uint64_t tracking_serial_id, uint64_t batch_deposit_serial_id); @@ -79,7 +85,8 @@ TALER_EXCHANGEDB_select_aggregations_above_serial (struct min_tracking_serial_id, TALER_EXCHANGEDB_AggregationCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AGGREGATION_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_all_kyc_attributes.h b/src/include/exchange-database/select_all_kyc_attributes.h @@ -40,9 +40,15 @@ * @param enc_attributes the encrypted collected attributes * @return true to continue to iterate */ +#ifndef TALER_EXCHANGEDB_ALL_ATTRIBUTES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AllAttributesCallback. + */ +#define TALER_EXCHANGEDB_ALL_ATTRIBUTES_RESULT_CLOSURE void +#endif typedef bool (*TALER_EXCHANGEDB_AllAttributesCallback)( - void *cls, + TALER_EXCHANGEDB_ALL_ATTRIBUTES_RESULT_CLOSURE *cls, uint64_t row_id, const struct TALER_NormalizedPaytoHashP *h_payto, const char *provider_name, @@ -70,7 +76,7 @@ typedef bool */ typedef bool (*TALER_EXCHANGEDB_AllAttributesCallback)( - void *cls, + TALER_EXCHANGEDB_ALL_ATTRIBUTES_RESULT_CLOSURE *cls, uint64_t row_id, const struct TALER_NormalizedPaytoHashP *h_payto, const char *provider_name, @@ -96,6 +102,7 @@ TALER_EXCHANGEDB_select_all_kyc_attributes (struct uint64_t min_row_id, TALER_EXCHANGEDB_AllAttributesCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ALL_ATTRIBUTES_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_all_purse_decisions_above_serial_id.h b/src/include/exchange-database/select_all_purse_decisions_above_serial_id.h @@ -36,9 +36,15 @@ * @param refunded true if decision was to refund * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_ALL_PURSE_DECISION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AllPurseDecisionCallback. + */ +#define TALER_EXCHANGEDB_ALL_PURSE_DECISION_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_AllPurseDecisionCallback)( - void *cls, + TALER_EXCHANGEDB_ALL_PURSE_DECISION_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, bool refunded); @@ -57,7 +63,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_AllPurseDecisionCallback)( - void *cls, + TALER_EXCHANGEDB_ALL_PURSE_DECISION_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, bool refunded); @@ -79,7 +85,8 @@ TALER_EXCHANGEDB_select_all_purse_decisions_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_AllPurseDecisionCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ALL_PURSE_DECISION_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_all_purse_deletions_above_serial_id.h b/src/include/exchange-database/select_all_purse_deletions_above_serial_id.h @@ -36,9 +36,15 @@ * @param purse_sig signature affirming deletion of the purse * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_ALL_PURSE_DELETIONS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AllPurseDeletionsCallback. + */ +#define TALER_EXCHANGEDB_ALL_PURSE_DELETIONS_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_AllPurseDeletionsCallback)( - void *cls, + TALER_EXCHANGEDB_ALL_PURSE_DELETIONS_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseContractSignatureP *purse_sig); @@ -57,7 +63,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_AllPurseDeletionsCallback)( - void *cls, + TALER_EXCHANGEDB_ALL_PURSE_DELETIONS_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseContractSignatureP *purse_sig); @@ -79,6 +85,7 @@ TALER_EXCHANGEDB_select_all_purse_deletions_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_AllPurseDeletionsCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ALL_PURSE_DELETIONS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_aml_attributes.h b/src/include/exchange-database/select_aml_attributes.h @@ -37,9 +37,15 @@ * @param enc_attributes_size size of @a enc_attributes * @param enc_attributes the encrypted collected attributes */ +#ifndef TALER_EXCHANGEDB_AML_ATTRIBUTE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlAttributeCallback. + */ +#define TALER_EXCHANGEDB_AML_ATTRIBUTE_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlAttributeCallback)( - void *cls, + TALER_EXCHANGEDB_AML_ATTRIBUTE_RESULT_CLOSURE *cls, uint64_t row_id, struct GNUNET_TIME_Timestamp collection_time, bool by_aml_officer, @@ -62,7 +68,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AmlAttributeCallback)( - void *cls, + TALER_EXCHANGEDB_AML_ATTRIBUTE_RESULT_CLOSURE *cls, uint64_t row_id, struct GNUNET_TIME_Timestamp collection_time, bool by_aml_officer, @@ -92,7 +98,8 @@ TALER_EXCHANGEDB_select_aml_attributes (struct int64_t limit, TALER_EXCHANGEDB_AmlAttributeCallback cb , - void *cb_cls); + TALER_EXCHANGEDB_AML_ATTRIBUTE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_aml_decisions.h b/src/include/exchange-database/select_aml_decisions.h @@ -43,9 +43,15 @@ * @param payto payto URI of the account the decision is about * @param account_rules current active rules for the account */ +#ifndef TALER_EXCHANGEDB_AML_DECISION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlDecisionCallback. + */ +#define TALER_EXCHANGEDB_AML_DECISION_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlDecisionCallback)( - void *cls, + TALER_EXCHANGEDB_AML_DECISION_RESULT_CLOSURE *cls, uint64_t row_id, const char *justification, const struct TALER_NormalizedPaytoHashP *h_payto, @@ -79,7 +85,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AmlDecisionCallback)( - void *cls, + TALER_EXCHANGEDB_AML_DECISION_RESULT_CLOSURE *cls, uint64_t row_id, const char *justification, const struct TALER_NormalizedPaytoHashP *h_payto, @@ -118,6 +124,7 @@ TALER_EXCHANGEDB_select_aml_decisions (struct TALER_EXCHANGEDB_PostgresContext * uint64_t offset, int64_t limit, TALER_EXCHANGEDB_AmlDecisionCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AML_DECISION_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_aml_measures.h b/src/include/exchange-database/select_aml_measures.h @@ -36,9 +36,15 @@ * @param is_finished true if the measure was finished * @param measure_serial_id row ID of the measure in the exchange table */ +#ifndef TALER_EXCHANGEDB_LEGITIMIZATION_MEASURE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_LegitimizationMeasureCallback. + */ +#define TALER_EXCHANGEDB_LEGITIMIZATION_MEASURE_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_LegitimizationMeasureCallback) ( - void *cls, + TALER_EXCHANGEDB_LEGITIMIZATION_MEASURE_RESULT_CLOSURE *cls, struct TALER_NormalizedPaytoHashP *h_payto, struct GNUNET_TIME_Absolute start_time, const json_t *jmeasures, @@ -59,7 +65,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_LegitimizationMeasureCallback) ( - void *cls, + TALER_EXCHANGEDB_LEGITIMIZATION_MEASURE_RESULT_CLOSURE *cls, struct TALER_NormalizedPaytoHashP *h_payto, struct GNUNET_TIME_Absolute start_time, const json_t *jmeasures, @@ -91,6 +97,7 @@ TALER_EXCHANGEDB_select_aml_measures (struct TALER_EXCHANGEDB_PostgresContext * int64_t limit, TALER_EXCHANGEDB_LegitimizationMeasureCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_LEGITIMIZATION_MEASURE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_aml_statistics.h b/src/include/exchange-database/select_aml_statistics.h @@ -33,9 +33,15 @@ * @param name name of the counter * @param cnt number of events for @a name in the query range */ +#ifndef TALER_EXCHANGEDB_AML_STATISTICS_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlStatisticsCallback. + */ +#define TALER_EXCHANGEDB_AML_STATISTICS_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlStatisticsCallback)( - void *cls, + TALER_EXCHANGEDB_AML_STATISTICS_RESULT_CLOSURE *cls, const char *name, uint64_t cnt); @@ -50,7 +56,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AmlStatisticsCallback)( - void *cls, + TALER_EXCHANGEDB_AML_STATISTICS_RESULT_CLOSURE *cls, const char *name, uint64_t cnt); @@ -76,6 +82,7 @@ TALER_EXCHANGEDB_select_aml_statistics (struct struct GNUNET_TIME_Timestamp end_date, TALER_EXCHANGEDB_AmlStatisticsCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AML_STATISTICS_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_batch_deposits_missing_wire.h b/src/include/exchange-database/select_batch_deposits_missing_wire.h @@ -36,9 +36,15 @@ * @param wire_target_h_payto hash of the recipient account's payto URI * @param deadline what was the earliest requested wire transfer deadline */ +#ifndef TALER_EXCHANGEDB_WIRE_MISSING_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_WireMissingCallback. + */ +#define TALER_EXCHANGEDB_WIRE_MISSING_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_WireMissingCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_MISSING_RESULT_CLOSURE *cls, uint64_t batch_deposit_serial_id, const struct TALER_Amount *total_amount, const struct TALER_FullPaytoHashP *wire_target_h_payto, @@ -58,7 +64,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_WireMissingCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_MISSING_RESULT_CLOSURE *cls, uint64_t batch_deposit_serial_id, const struct TALER_Amount *total_amount, const struct TALER_FullPaytoHashP *wire_target_h_payto, @@ -82,6 +88,7 @@ TALER_EXCHANGEDB_select_batch_deposits_missing_wire (struct min_batch_deposit_serial_id, TALER_EXCHANGEDB_WireMissingCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_WIRE_MISSING_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_coin_deposits_above_serial_id.h b/src/include/exchange-database/select_coin_deposits_above_serial_id.h @@ -38,9 +38,15 @@ * @param done flag set if the deposit was already executed (or not) * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_DEPOSIT_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_DepositCallback. + */ +#define TALER_EXCHANGEDB_DEPOSIT_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_DepositCallback)( - void *cls, + TALER_EXCHANGEDB_DEPOSIT_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp exchange_timestamp, const struct TALER_EXCHANGEDB_Deposit *deposit, @@ -63,7 +69,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_DepositCallback)( - void *cls, + TALER_EXCHANGEDB_DEPOSIT_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp exchange_timestamp, const struct TALER_EXCHANGEDB_Deposit *deposit, @@ -88,6 +94,7 @@ TALER_EXCHANGEDB_select_coin_deposits_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_DepositCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_DEPOSIT_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_exchange_debit_transfers.h b/src/include/exchange-database/select_exchange_debit_transfers.h @@ -35,9 +35,15 @@ * @param execution_time when was the transfer made * @param amount wire amount of the transfer */ +#ifndef TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlTransferCallback. + */ +#define TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlTransferCallback)( - void *cls, + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE *cls, uint64_t row_id, const char *payto_uri, struct GNUNET_TIME_Absolute execution_time, @@ -64,7 +70,7 @@ TALER_EXCHANGEDB_select_exchange_debit_transfers ( int64_t limit, const struct TALER_NormalizedPaytoHashP *h_payto, TALER_EXCHANGEDB_AmlTransferCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/exchange-database/select_exchange_kycauth_transfers.h b/src/include/exchange-database/select_exchange_kycauth_transfers.h @@ -36,9 +36,15 @@ * @param execution_time when was the transfer made * @param amount wire amount of the transfer */ +#ifndef TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlTransferCallback. + */ +#define TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlTransferCallback)( - void *cls, + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE *cls, uint64_t row_id, const char *payto_uri, struct GNUNET_TIME_Absolute execution_time, @@ -69,6 +75,7 @@ TALER_EXCHANGEDB_select_exchange_kycauth_transfers (struct h_payto, TALER_EXCHANGEDB_AmlTransferCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_kyc_accounts.h b/src/include/exchange-database/select_kyc_accounts.h @@ -41,9 +41,15 @@ * @param to_investigate TRUE if this account should be investigated * @param payto the payto URI of the account */ +#ifndef TALER_EXCHANGEDB_AML_ACCOUNT_LIST_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlAccountListCallback. + */ +#define TALER_EXCHANGEDB_AML_ACCOUNT_LIST_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlAccountListCallback)( - void *cls, + TALER_EXCHANGEDB_AML_ACCOUNT_LIST_RESULT_CLOSURE *cls, uint64_t row_id, const struct TALER_NormalizedPaytoHashP *h_payto, struct GNUNET_TIME_Timestamp open_time, @@ -72,7 +78,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AmlAccountListCallback)( - void *cls, + TALER_EXCHANGEDB_AML_ACCOUNT_LIST_RESULT_CLOSURE *cls, uint64_t row_id, const struct TALER_NormalizedPaytoHashP *h_payto, struct GNUNET_TIME_Timestamp open_time, @@ -108,7 +114,8 @@ TALER_EXCHANGEDB_select_kyc_accounts (struct TALER_EXCHANGEDB_PostgresContext * int64_t limit, TALER_EXCHANGEDB_AmlAccountListCallback cb , - void *cb_cls); + TALER_EXCHANGEDB_AML_ACCOUNT_LIST_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_kyc_attributes.h b/src/include/exchange-database/select_kyc_attributes.h @@ -37,9 +37,15 @@ * @param enc_attributes_size number of bytes in @a enc_attributes * @param enc_attributes encrypted attribute data */ +#ifndef TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AttributeCallback. + */ +#define TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AttributeCallback)( - void *cls, + TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE *cls, const struct TALER_NormalizedPaytoHashP *h_payto, const char *provider_name, struct GNUNET_TIME_Timestamp collection_time, @@ -62,7 +68,7 @@ typedef void */ typedef void (*TALER_EXCHANGEDB_AttributeCallback)( - void *cls, + TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE *cls, const struct TALER_NormalizedPaytoHashP *h_payto, const char *provider_name, struct GNUNET_TIME_Timestamp collection_time, @@ -86,6 +92,7 @@ TALER_EXCHANGEDB_select_kyc_attributes (struct TALER_NormalizedPaytoHashP * h_payto, TALER_EXCHANGEDB_AttributeCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ATTRIBUTE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_purse_decisions_above_serial_id.h b/src/include/exchange-database/select_purse_decisions_above_serial_id.h @@ -37,9 +37,15 @@ * @param purse_value what is the (target) value of the purse * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_PurseDecisionCallback. + */ +#define TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseDecisionCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -60,7 +66,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseDecisionCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -87,6 +93,7 @@ TALER_TALER_EXCHANGEDB_select_purse_decisions_above_serial_id (struct bool refunded, TALER_EXCHANGEDB_PurseDecisionCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_PURSE_DECISION_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_purse_deposits_above_serial_id.h b/src/include/exchange-database/select_purse_deposits_above_serial_id.h @@ -41,9 +41,15 @@ * @param denom_pub denomination public key of @a coin_pub * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_PurseDepositCallback. + */ +#define TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseDepositCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_EXCHANGEDB_PurseDeposit *deposit, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -71,7 +77,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseDepositCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_EXCHANGEDB_PurseDeposit *deposit, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -99,7 +105,8 @@ TALER_TALER_EXCHANGEDB_select_purse_deposits_above_serial_id (struct , TALER_EXCHANGEDB_PurseDepositCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_PURSE_DEPOSIT_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_purse_deposits_by_purse.h b/src/include/exchange-database/select_purse_deposits_by_purse.h @@ -37,9 +37,15 @@ * @param denom_pub denomination of @a coin_pub * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_PURSE_REFUND_COIN_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_PurseRefundCoinCallback. + */ +#define TALER_EXCHANGEDB_PURSE_REFUND_COIN_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseRefundCoinCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_REFUND_COIN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_Amount *amount_with_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -60,7 +66,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseRefundCoinCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_REFUND_COIN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_Amount *amount_with_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -86,6 +92,7 @@ TALER_TALER_EXCHANGEDB_select_purse_deposits_by_purse (struct purse_pub, TALER_EXCHANGEDB_PurseRefundCoinCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_PURSE_REFUND_COIN_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_purse_merges_above_serial_id.h b/src/include/exchange-database/select_purse_merges_above_serial_id.h @@ -44,9 +44,15 @@ * @param merge_timestamp when did the merge happen * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_PURSE_MERGE_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_PurseMergeCallback. + */ +#define TALER_EXCHANGEDB_PURSE_MERGE_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseMergeCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_MERGE_RESULT_CLOSURE *cls, uint64_t rowid, const char *partner_base_url, const struct TALER_Amount *amount, @@ -80,7 +86,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseMergeCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_MERGE_RESULT_CLOSURE *cls, uint64_t rowid, const char *partner_base_url, const struct TALER_Amount *amount, @@ -110,6 +116,7 @@ TALER_TALER_TALER_EXCHANGEDB_select_purse_merges_above_serial_id (struct serial_id, TALER_EXCHANGEDB_PurseMergeCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_PURSE_MERGE_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_purse_requests_above_serial_id.h b/src/include/exchange-database/select_purse_requests_above_serial_id.h @@ -41,9 +41,15 @@ * @param purse_sig signature of the purse over the initialization data * @return #GNUNET_OK to continue to iterate */ +#ifndef TALER_EXCHANGEDB_PURSE_REQUEST_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_PurseRequestCallback. + */ +#define TALER_EXCHANGEDB_PURSE_REQUEST_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseRequestCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_REQUEST_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseMergePublicKeyP *merge_pub, @@ -73,7 +79,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_PurseRequestCallback)( - void *cls, + TALER_EXCHANGEDB_PURSE_REQUEST_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_PurseContractPublicKeyP *purse_pub, const struct TALER_PurseMergePublicKeyP *merge_pub, @@ -103,7 +109,8 @@ TALER_TALER_EXCHANGEDB_select_purse_requests_above_serial_id (struct , TALER_EXCHANGEDB_PurseRequestCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_PURSE_REQUEST_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_recoup_above_serial_id.h b/src/include/exchange-database/select_recoup_above_serial_id.h @@ -40,9 +40,15 @@ * @param coin_blind blinding factor used to blind the coin * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_RecoupCallback. + */ +#define TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RecoupCallback)( - void *cls, + TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -70,7 +76,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RecoupCallback)( - void *cls, + TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -98,6 +104,7 @@ TALER_EXCHANGEDB_select_recoup_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_RecoupCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_RECOUP_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_recoup_refresh_above_serial_id.h b/src/include/exchange-database/select_recoup_refresh_above_serial_id.h @@ -42,9 +42,15 @@ * @param coin_blind blinding factor used to blind the coin * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RECOUP_REFRESH_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_RecoupRefreshCallback. + */ +#define TALER_EXCHANGEDB_RECOUP_REFRESH_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RecoupRefreshCallback)( - void *cls, + TALER_EXCHANGEDB_RECOUP_REFRESH_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -75,7 +81,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RecoupRefreshCallback)( - void *cls, + TALER_EXCHANGEDB_RECOUP_REFRESH_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, @@ -104,6 +110,7 @@ TALER_EXCHANGEDB_select_recoup_refresh_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_RecoupRefreshCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_RECOUP_REFRESH_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_refreshes_above_serial_id.h b/src/include/exchange-database/select_refreshes_above_serial_id.h @@ -42,9 +42,15 @@ * @param rc what the refresh commitment * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_REFRESHES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_RefreshesCallback. + */ +#define TALER_EXCHANGEDB_REFRESHES_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RefreshesCallback)( - void *cls, + TALER_EXCHANGEDB_REFRESHES_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_DenominationPublicKey *old_denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -75,7 +81,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RefreshesCallback)( - void *cls, + TALER_EXCHANGEDB_REFRESHES_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_DenominationPublicKey *old_denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -104,6 +110,7 @@ TALER_EXCHANGEDB_select_refreshes_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_RefreshesCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_REFRESHES_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_refunds_above_serial_id.h b/src/include/exchange-database/select_refunds_above_serial_id.h @@ -42,9 +42,15 @@ * @param amount_with_fee amount that was deposited including fee * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_REFUND_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_RefundCallback. + */ +#define TALER_EXCHANGEDB_REFUND_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RefundCallback)( - void *cls, + TALER_EXCHANGEDB_REFUND_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -75,7 +81,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RefundCallback)( - void *cls, + TALER_EXCHANGEDB_REFUND_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -104,6 +110,7 @@ TALER_EXCHANGEDB_select_refunds_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_RefundCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_REFUND_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_refunds_by_coin.h b/src/include/exchange-database/select_refunds_by_coin.h @@ -34,9 +34,15 @@ * @param amount_with_fee amount being refunded * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_REFUND_COIN_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_RefundCoinCallback. + */ +#define TALER_EXCHANGEDB_REFUND_COIN_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RefundCoinCallback)( - void *cls, + TALER_EXCHANGEDB_REFUND_COIN_RESULT_CLOSURE *cls, const struct TALER_Amount *amount_with_fee); @@ -51,7 +57,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RefundCoinCallback)( - void *cls, + TALER_EXCHANGEDB_REFUND_COIN_RESULT_CLOSURE *cls, const struct TALER_Amount *amount_with_fee); /** @@ -77,6 +83,7 @@ TALER_EXCHANGEDB_select_refunds_by_coin (struct TALER_PrivateContractHashP * h_contract, TALER_EXCHANGEDB_RefundCoinCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_REFUND_COIN_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_reserve_closed_above_serial_id.h b/src/include/exchange-database/select_reserve_closed_above_serial_id.h @@ -42,9 +42,15 @@ * request, 0 if regular expiration triggered close * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RESERVE_CLOSED_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReserveClosedCallback. + */ +#define TALER_EXCHANGEDB_RESERVE_CLOSED_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveClosedCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_CLOSED_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee, @@ -74,7 +80,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveClosedCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_CLOSED_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee, @@ -102,7 +108,8 @@ TALER_EXCHANGEDB_select_reserve_closed_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_ReserveClosedCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_RESERVE_CLOSED_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_reserve_open_above_serial_id.h b/src/include/exchange-database/select_reserve_open_above_serial_id.h @@ -41,9 +41,15 @@ * @param reserve_sig signature affirming the operation * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RESERVE_OPEN_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReserveOpenCallback. + */ +#define TALER_EXCHANGEDB_RESERVE_OPEN_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveOpenCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_OPEN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_Amount *reserve_payment, struct GNUNET_TIME_Timestamp request_timestamp, @@ -71,7 +77,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveOpenCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_OPEN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_Amount *reserve_payment, struct GNUNET_TIME_Timestamp request_timestamp, @@ -97,7 +103,8 @@ TALER_EXCHANGEDB_select_reserve_open_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_ReserveOpenCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_RESERVE_OPEN_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_reserves_in_above_serial_id.h b/src/include/exchange-database/select_reserves_in_above_serial_id.h @@ -39,9 +39,15 @@ * @param execution_date when did we receive the funds * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReserveInCallback. + */ +#define TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveInCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *credit, @@ -66,6 +72,7 @@ TALER_EXCHANGEDB_select_reserves_in_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_ReserveInCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_reserves_in_above_serial_id_by_account.h b/src/include/exchange-database/select_reserves_in_above_serial_id_by_account.h @@ -39,9 +39,15 @@ * @param execution_date when did we receive the funds * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_ReserveInCallback. + */ +#define TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveInCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *credit, @@ -71,7 +77,8 @@ TALER_TALER_EXCHANGEDB_select_reserves_in_above_serial_id_by_account (struct serial_id, TALER_EXCHANGEDB_ReserveInCallback cb, - void * + TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE + * cb_cls); #endif diff --git a/src/include/exchange-database/select_wallet_merges.h b/src/include/exchange-database/select_wallet_merges.h @@ -35,9 +35,15 @@ * @param execution_time when was the transfer made * @param amount wire amount of the transfer */ +#ifndef TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_AmlTransferCallback. + */ +#define TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlTransferCallback)( - void *cls, + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE *cls, uint64_t row_id, const char *payto_uri, struct GNUNET_TIME_Absolute execution_time, @@ -64,7 +70,7 @@ TALER_EXCHANGEDB_select_wallet_merges ( int64_t limit, const struct TALER_NormalizedPaytoHashP *h_payto, TALER_EXCHANGEDB_AmlTransferCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE *cb_cls); #endif diff --git a/src/include/exchange-database/select_wire_out_above_serial_id.h b/src/include/exchange-database/select_wire_out_above_serial_id.h @@ -39,9 +39,15 @@ * @param amount amount that was wired * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration */ +#ifndef TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_WireTransferOutCallback. + */ +#define TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_WireTransferOutCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, @@ -66,6 +72,7 @@ TALER_EXCHANGEDB_select_wire_out_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_WireTransferOutCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/select_wire_out_above_serial_id_by_account.h b/src/include/exchange-database/select_wire_out_above_serial_id_by_account.h @@ -39,9 +39,15 @@ * @param amount amount that was wired * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration */ +#ifndef TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_WireTransferOutCallback. + */ +#define TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_WireTransferOutCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, @@ -69,7 +75,8 @@ TALER_TALER_EXCHANGEDB_select_wire_out_above_serial_id_by_account (struct serial_id, TALER_EXCHANGEDB_WireTransferOutCallback cb, - void *cb_cls) + TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE + *cb_cls) ; #endif diff --git a/src/include/exchange-database/select_withdrawals_above_serial_id.h b/src/include/exchange-database/select_withdrawals_above_serial_id.h @@ -45,9 +45,15 @@ * @param amount_with_fee amount that was withdrawn * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_WithdrawCallback. + */ +#define TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_WithdrawCallback)( - void *cls, + TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE *cls, uint64_t rowid, size_t num_denom_serials, const uint64_t *denom_serials, @@ -85,7 +91,7 @@ typedef enum GNUNET_GenericReturnValue */ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_WithdrawCallback)( - void *cls, + TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE *cls, uint64_t rowid, size_t num_denom_serials, const uint64_t *denom_serials, @@ -117,6 +123,7 @@ TALER_EXCHANGEDB_select_withdrawals_above_serial_id (struct uint64_t serial_id, TALER_EXCHANGEDB_WithdrawCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_WITHDRAW_RESULT_CLOSURE + *cb_cls); #endif diff --git a/src/include/exchange-database/update_rules.h b/src/include/exchange-database/update_rules.h @@ -69,9 +69,15 @@ struct TALER_EXCHANGEDB_RuleUpdaterResult * @param rur includes legitimziation rule set that applies to the account * (owned by callee, callee must free the lrs!) */ +#ifndef TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE +/** + * Type of the closure for #TALER_EXCHANGEDB_CurrentRulesCallback. + */ +#define TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_CurrentRulesCallback)( - void *cls, + TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE *cls, struct TALER_EXCHANGEDB_RuleUpdaterResult *rur); @@ -105,7 +111,7 @@ TALER_EXCHANGEDB_update_rules ( const struct TALER_NormalizedPaytoHashP *account, bool is_wallet, TALER_EXCHANGEDB_CurrentRulesCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_CURRENT_RULES_RESULT_CLOSURE *cb_cls); /** diff --git a/src/include/exchangedb_lib.h b/src/include/exchangedb_lib.h @@ -809,9 +809,12 @@ struct TALER_EXCHANGEDB_KycStatus * @param execution_date when did we receive the funds * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ +#ifndef TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE +#define TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveInCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_IN_RESULT_CLOSURE *cls, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *credit, @@ -832,9 +835,12 @@ typedef enum GNUNET_GenericReturnValue * @param amount amount that was wired * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration */ +#ifndef TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE +#define TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_WireTransferOutCallback)( - void *cls, + TALER_EXCHANGEDB_WIRE_TRANSFER_OUT_RESULT_CLOSURE *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, @@ -856,9 +862,12 @@ typedef enum GNUNET_GenericReturnValue * #GNUNET_NO to retry * #GNUNET_SYSERR on hard failures (exit) */ +#ifndef TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE +#define TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE void +#endif typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveExpiredCallback)( - void *cls, + TALER_EXCHANGEDB_RESERVE_EXPIRED_RESULT_CLOSURE *cls, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *left, const struct TALER_FullPayto account_details, @@ -875,9 +884,12 @@ typedef enum GNUNET_GenericReturnValue * @param execution_time when was the transfer made * @param amount wire amount of the transfer */ +#ifndef TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE +#define TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AmlTransferCallback)( - void *cls, + TALER_EXCHANGEDB_AML_TRANSFER_RESULT_CLOSURE *cls, uint64_t row_id, const char *payto_uri, struct GNUNET_TIME_Absolute execution_time, @@ -1049,9 +1061,12 @@ struct TALER_EXCHANGEDB_AccountInfo * @param cls closure * @param ai account information */ +#ifndef TALER_EXCHANGEDB_ACCOUNT_RESULT_CLOSURE +#define TALER_EXCHANGEDB_ACCOUNT_RESULT_CLOSURE void +#endif typedef void (*TALER_EXCHANGEDB_AccountCallback)( - void *cls, + TALER_EXCHANGEDB_ACCOUNT_RESULT_CLOSURE *cls, const struct TALER_EXCHANGEDB_AccountInfo *ai); @@ -1064,7 +1079,8 @@ typedef void */ void TALER_EXCHANGEDB_find_accounts (TALER_EXCHANGEDB_AccountCallback cb, - void *cb_cls); + TALER_EXCHANGEDB_ACCOUNT_RESULT_CLOSURE *cb_cls) +; /** diff --git a/src/include/taler/exchange/common.h b/src/include/taler/exchange/common.h @@ -39,6 +39,23 @@ /** + * Forward declaration for the exchange's set of online signing keys and + * denomination keys. Several endpoint headers reference this type in their + * function signatures; declaring it here keeps those headers self-contained + * when they are included early (e.g. to override a *_RESULT_CLOSURE macro). + * Both types are fully defined in get-keys.h. + */ +struct TALER_EXCHANGE_Keys; +struct TALER_EXCHANGE_DenomPublicKey; + +/** + * Forward declaration for the input to a melt operation, defined in + * post-reveal-melt.h but also referenced (by pointer) from post-melt.h. + */ +struct TALER_EXCHANGE_MeltInput; + + +/** * General information about the HTTP response we obtained * from the exchange for a request. */ diff --git a/src/include/taler/exchange/post-reveal-melt.h b/src/include/taler/exchange/post-reveal-melt.h @@ -22,6 +22,7 @@ #define _TALER_EXCHANGE__POST_REVEAL_MELT_H #include <taler/exchange/common.h> +#include <taler/exchange/get-keys.h> /** diff --git a/src/include/taler/exchange/post-withdraw.h b/src/include/taler/exchange/post-withdraw.h @@ -22,6 +22,7 @@ #define _TALER_EXCHANGE__POST_WITHDRAW_H #include <taler/exchange/common.h> +#include <taler/exchange/get-keys.h> /** diff --git a/src/testing/testing_api_cmd_age_withdraw.c b/src/testing/testing_api_cmd_age_withdraw.c @@ -27,6 +27,13 @@ #include <microhttpd.h> #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" +struct AgeWithdrawState; +#define TALER_EXCHANGE_POST_WITHDRAW_RESULT_CLOSURE struct AgeWithdrawState +#include "taler/exchange/post-withdraw.h" +struct AgeRevealWithdrawState; +#define TALER_EXCHANGE_POST_REVEAL_WITHDRAW_RESULT_CLOSURE \ + struct AgeRevealWithdrawState +#include "taler/exchange/post-reveal-withdraw.h" #include "taler/taler_testing_lib.h" /* @@ -175,15 +182,14 @@ struct AgeWithdrawState * Callback for the "age-withdraw" operation; It checks that the response * code is expected and store the exchange signature in the state. * - * @param cls Closure of type `struct AgeWithdrawState *` + * @param aws Closure of type `struct AgeWithdrawState *` * @param response Response details */ static void age_withdraw_cb ( - void *cls, + struct AgeWithdrawState *aws, const struct TALER_EXCHANGE_PostWithdrawResponse *response) { - struct AgeWithdrawState *aws = cls; struct TALER_TESTING_Interpreter *is = aws->is; aws->handle = NULL; @@ -606,15 +612,14 @@ struct AgeRevealWithdrawState /** * Callback for the reveal response * - * @param cls Closure of type `struct AgeRevealWithdrawState` + * @param awrs Closure of type `struct AgeRevealWithdrawState` * @param response The response */ static void age_reveal_withdraw_cb ( - void *cls, + struct AgeRevealWithdrawState *awrs, const struct TALER_EXCHANGE_PostRevealWithdrawResponse *response) { - struct AgeRevealWithdrawState *awrs = cls; struct TALER_TESTING_Interpreter *is = awrs->is; awrs->handle = NULL; diff --git a/src/testing/testing_api_cmd_auditor_add.c b/src/testing/testing_api_cmd_auditor_add.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct AuditorAddState; +#define TALER_EXCHANGE_POST_MANAGEMENT_AUDITORS_RESULT_CLOSURE \ + struct AuditorAddState +#include "taler/exchange/post-management-auditors.h" #include "taler/taler_testing_lib.h" @@ -58,15 +62,14 @@ struct AuditorAddState * Callback to analyze the /management/auditors response, just used to check * if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param r response details */ static void auditor_add_cb ( - void *cls, + struct AuditorAddState *ds, const struct TALER_EXCHANGE_PostManagementAuditorsResponse *r) { - struct AuditorAddState *ds = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &r->hr; ds->dh = NULL; diff --git a/src/testing/testing_api_cmd_auditor_add_denom_sig.c b/src/testing/testing_api_cmd_auditor_add_denom_sig.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct AuditorAddDenomSigState; +#define TALER_EXCHANGE_POST_AUDITORS_RESULT_CLOSURE \ + struct AuditorAddDenomSigState +#include "taler/exchange/post-auditors-AUDITOR_PUB-H_DENOM_PUB.h" #include "taler/taler_testing_lib.h" @@ -63,15 +67,14 @@ struct AuditorAddDenomSigState * Callback to analyze the /management/auditor response, just used to check * if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param adr response details */ static void denom_sig_add_cb ( - void *cls, + struct AuditorAddDenomSigState *ds, const struct TALER_EXCHANGE_PostAuditorsResponse *adr) { - struct AuditorAddDenomSigState *ds = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &adr->hr; ds->dh = NULL; diff --git a/src/testing/testing_api_cmd_auditor_del.c b/src/testing/testing_api_cmd_auditor_del.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct AuditorDelState; +#define TALER_EXCHANGE_POST_MANAGEMENT_AUDITORS_DISABLE_RESULT_CLOSURE \ + struct AuditorDelState +#include "taler/exchange/post-management-auditors-AUDITOR_PUB-disable.h" #include "taler/taler_testing_lib.h" @@ -58,16 +62,15 @@ struct AuditorDelState * Callback to analyze the /management/auditors response, just used to check * if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param adr response details */ static void auditor_del_cb ( - void *cls, + struct AuditorDelState *ds, const struct TALER_EXCHANGE_PostManagementAuditorsDisableResponse *adr) { - struct AuditorDelState *ds = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &adr->hr; ds->dh = NULL; diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c @@ -24,6 +24,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct BatchDepositState; +#define TALER_EXCHANGE_POST_BATCH_DEPOSIT_RESULT_CLOSURE \ + struct BatchDepositState +#include "taler/exchange/post-batch-deposit.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" #include "backoff.h" @@ -218,15 +222,13 @@ struct BatchDepositState * Callback to analyze the /batch-deposit response, just used to check if the * response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr deposit response details */ static void -batch_deposit_cb (void *cls, +batch_deposit_cb (struct BatchDepositState *ds, const struct TALER_EXCHANGE_PostBatchDepositResponse *dr) { - struct BatchDepositState *ds = cls; - ds->dh = NULL; if (ds->expected_response_code != dr->hr.http_status) { diff --git a/src/testing/testing_api_cmd_coin_history.c b/src/testing/testing_api_cmd_coin_history.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct HistoryState; +#define TALER_EXCHANGE_GET_COINS_HISTORY_RESULT_CLOSURE \ + struct HistoryState +#include "taler/exchange/get-coins-COIN_PUB-history.h" #include "taler/taler_testing_lib.h" @@ -338,14 +342,13 @@ analyze_command (void *cls, * Check that the coin balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void -coin_history_cb (void *cls, +coin_history_cb (struct HistoryState *ss, const struct TALER_EXCHANGE_GetCoinsHistoryResponse *rs) { - struct HistoryState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; struct TALER_Amount eb; unsigned int hlen; diff --git a/src/testing/testing_api_cmd_contract_get.c b/src/testing/testing_api_cmd_contract_get.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct ContractGetState; +#define TALER_EXCHANGE_GET_CONTRACTS_RESULT_CLOSURE \ + struct ContractGetState +#include "taler/exchange/get-contracts-CONTRACT_PUB.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" @@ -86,14 +90,13 @@ struct ContractGetState * Callback to analyze the /contracts/$CPUB response, just used to check if * the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr get response details */ static void -get_cb (void *cls, +get_cb (struct ContractGetState *ds, const struct TALER_EXCHANGE_GetContractsResponse *dr) { - struct ContractGetState *ds = cls; const struct TALER_TESTING_Command *ref; ds->dh = NULL; diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct DepositState; +#define TALER_EXCHANGE_POST_BATCH_DEPOSIT_RESULT_CLOSURE \ + struct DepositState +#include "taler/exchange/post-batch-deposit.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" #include "backoff.h" @@ -236,15 +240,13 @@ do_retry (void *cls) * Callback to analyze the /deposit response, just used to * check if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr deposit response details */ static void -deposit_cb (void *cls, +deposit_cb (struct DepositState *ds, const struct TALER_EXCHANGE_PostBatchDepositResponse *dr) { - struct DepositState *ds = cls; - ds->dh = NULL; if (ds->expected_response_code != dr->hr.http_status) { diff --git a/src/testing/testing_api_cmd_deposits_get.c b/src/testing/testing_api_cmd_deposits_get.c @@ -24,6 +24,11 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct TrackTransactionState; +#define TALER_EXCHANGE_GET_DEPOSITS_RESULT_CLOSURE \ + struct TrackTransactionState +#include \ + "taler/exchange/get-deposits-H_WIRE-MERCHANT_PUB-H_CONTRACT_TERMS-COIN_PUB.h" #include "taler/taler_testing_lib.h" /** @@ -102,15 +107,14 @@ struct TrackTransactionState * right reference is non NULL - that the wire transfer subject * line matches our expectations. * - * @param cls closure. + * @param tts closure. * @param dr GET deposit response details */ static void deposit_wtid_cb ( - void *cls, + struct TrackTransactionState *tts, const struct TALER_EXCHANGE_GetDepositsResponse *dr) { - struct TrackTransactionState *tts = cls; struct TALER_TESTING_Interpreter *is = tts->is; tts->tth = NULL; diff --git a/src/testing/testing_api_cmd_purse_create_deposit.c b/src/testing/testing_api_cmd_purse_create_deposit.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct PurseCreateDepositState; +#define TALER_EXCHANGE_POST_PURSES_CREATE_RESULT_CLOSURE \ + struct PurseCreateDepositState +#include "taler/exchange/post-purses-PURSE_PUB-create.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" @@ -158,15 +162,13 @@ struct PurseCreateDepositState * Callback to analyze the /purses/$PID/create response, just used to check if * the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr deposit response details */ static void -deposit_cb (void *cls, +deposit_cb (struct PurseCreateDepositState *ds, const struct TALER_EXCHANGE_PostPursesCreateResponse *dr) { - struct PurseCreateDepositState *ds = cls; - ds->dh = NULL; if (ds->expected_response_code != dr->hr.http_status) { diff --git a/src/testing/testing_api_cmd_purse_delete.c b/src/testing/testing_api_cmd_purse_delete.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct PurseDeleteState; +#define TALER_EXCHANGE_DELETE_PURSES_RESULT_CLOSURE \ + struct PurseDeleteState +#include "taler/exchange/delete-purses-PURSE_PUB.h" #include "taler/taler_testing_lib.h" @@ -59,15 +63,13 @@ struct PurseDeleteState * Callback to analyze the DELETE /purses/$PID response, just used to check if * the response code is acceptable. * - * @param cls closure. + * @param pds closure. * @param pdr HTTP response details */ static void -purse_delete_cb (void *cls, +purse_delete_cb (struct PurseDeleteState *pds, const struct TALER_EXCHANGE_DeletePursesResponse *pdr) { - struct PurseDeleteState *pds = cls; - pds->dph = NULL; if (pds->expected_response_code != pdr->hr.http_status) { diff --git a/src/testing/testing_api_cmd_purse_deposit.c b/src/testing/testing_api_cmd_purse_deposit.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct PurseDepositState; +#define TALER_EXCHANGE_POST_PURSES_DEPOSIT_RESULT_CLOSURE struct \ + PurseDepositState +#include "taler/exchange/post-purses-PURSE_PUB-deposit.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" @@ -133,15 +137,13 @@ struct PurseDepositState * Callback to analyze the /purses/$PID/deposit response, just used to check if * the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr deposit response details */ static void -deposit_cb (void *cls, +deposit_cb (struct PurseDepositState *ds, const struct TALER_EXCHANGE_PostPursesDepositResponse *dr) { - struct PurseDepositState *ds = cls; - ds->dh = NULL; if (ds->expected_response_code != dr->hr.http_status) { diff --git a/src/testing/testing_api_cmd_purse_get.c b/src/testing/testing_api_cmd_purse_get.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct StatusState; +#define TALER_EXCHANGE_GET_PURSES_RESULT_CLOSURE struct StatusState +#include "taler/exchange/get-purses-PURSE_PUB-merge.h" #include "taler/taler_testing_lib.h" @@ -114,14 +117,13 @@ struct StatusState * Check that the purse balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void -purse_status_cb (void *cls, +purse_status_cb (struct StatusState *ss, const struct TALER_EXCHANGE_GetPursesResponse *rs) { - struct StatusState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; ss->pgh = NULL; diff --git a/src/testing/testing_api_cmd_purse_merge.c b/src/testing/testing_api_cmd_purse_merge.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct PurseMergeState; +#define TALER_EXCHANGE_POST_PURSES_MERGE_RESULT_CLOSURE struct PurseMergeState +#include "taler/exchange/post-purses-PURSE_PUB-merge.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" @@ -129,15 +132,13 @@ struct PurseMergeState * Callback to analyze the /purses/$PID/merge response, just used to check if * the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr merge response details */ static void -merge_cb (void *cls, +merge_cb (struct PurseMergeState *ds, const struct TALER_EXCHANGE_PostPursesMergeResponse *dr) { - struct PurseMergeState *ds = cls; - ds->dh = NULL; switch (dr->hr.http_status) { diff --git a/src/testing/testing_api_cmd_recoup.c b/src/testing/testing_api_cmd_recoup.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct RecoupState; +#define TALER_EXCHANGE_POST_RECOUP_WITHDRAW_RESULT_CLOSURE struct RecoupState +#include "taler/exchange/post-recoup-withdraw.h" #include "taler/taler_testing_lib.h" @@ -81,14 +84,13 @@ struct RecoupState * the HTTP response code is good, and that the coin that * was paid back belonged to the right reserve. * - * @param cls closure + * @param ps closure * @param rr response details */ static void -recoup_cb (void *cls, +recoup_cb (struct RecoupState *ps, const struct TALER_EXCHANGE_PostRecoupWithdrawResponse *rr) { - struct RecoupState *ps = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rr->hr; struct TALER_TESTING_Interpreter *is = ps->is; const struct TALER_TESTING_Command *reserve_cmd; diff --git a/src/testing/testing_api_cmd_recoup_refresh.c b/src/testing/testing_api_cmd_recoup_refresh.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct RecoupRefreshState; +#define TALER_EXCHANGE_POST_RECOUP_REFRESH_RESULT_CLOSURE struct \ + RecoupRefreshState +#include "taler/exchange/post-recoup-refresh.h" #include "taler/taler_testing_lib.h" @@ -91,14 +95,13 @@ struct RecoupRefreshState * the HTTP response code is good, and that the coin that * was paid back belonged to the right old coin. * - * @param cls closure + * @param rrs closure * @param rrr response details */ static void -recoup_refresh_cb (void *cls, +recoup_refresh_cb (struct RecoupRefreshState *rrs, const struct TALER_EXCHANGE_PostRecoupRefreshResponse *rrr) { - struct RecoupRefreshState *rrs = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rrr->hr; struct TALER_TESTING_Interpreter *is = rrs->is; char *cref; diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c @@ -24,6 +24,12 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct MeltState; +struct RevealMeltState; +#define TALER_EXCHANGE_POST_MELT_RESULT_CLOSURE struct MeltState +#include "taler/exchange/post-melt.h" +#define TALER_EXCHANGE_POST_REVEAL_MELT_RESULT_CLOSURE struct RevealMeltState +#include "taler/exchange/post-reveal-melt.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" #include "backoff.h" @@ -415,14 +421,13 @@ do_reveal_retry (void *cls) * code is expected and copies into its command's state the data * coming from the exchange, namely the fresh coins. * - * @param cls closure, a `struct RevealMeltState` + * @param rrs closure, a `struct RevealMeltState` * @param rmr HTTP response details */ static void -reveal_cb (void *cls, +reveal_cb (struct RevealMeltState *rrs, const struct TALER_EXCHANGE_PostRevealMeltResponse *rmr) { - struct RevealMeltState *rrs = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rmr->hr; const struct TALER_TESTING_Command *melt_cmd; @@ -656,14 +661,13 @@ do_melt_retry (void *cls) * response code is okay and re-run the melt operation if the * CMD was set to do so. * - * @param cls closure. + * @param ms closure. * @param mr melt response details */ static void -melt_cb (void *cls, +melt_cb (struct MeltState *ms, const struct TALER_EXCHANGE_PostMeltResponse *mr) { - struct MeltState *ms = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &mr->hr; ms->mh = NULL; diff --git a/src/testing/testing_api_cmd_refund.c b/src/testing/testing_api_cmd_refund.c @@ -24,6 +24,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct RefundState; +#define TALER_EXCHANGE_POST_COINS_REFUND_RESULT_CLOSURE struct RefundState +#include "taler/exchange/post-coins-COIN_PUB-refund.h" #include "taler/taler_testing_lib.h" @@ -78,14 +81,13 @@ struct RefundState * Check the result for the refund request, just check if the * response code is acceptable. * - * @param cls closure + * @param rs closure * @param rr response details */ static void -refund_cb (void *cls, +refund_cb (struct RefundState *rs, const struct TALER_EXCHANGE_PostCoinsRefundResponse *rr) { - struct RefundState *rs = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rr->hr; rs->rh = NULL; diff --git a/src/testing/testing_api_cmd_reserve_attest.c b/src/testing/testing_api_cmd_reserve_attest.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct AttestState; +#define TALER_EXCHANGE_POST_RESERVES_ATTEST_RESULT_CLOSURE struct AttestState +#include "taler/exchange/post-reserves-attest-RESERVE_PUB.h" #include "taler/taler_testing_lib.h" /** @@ -99,15 +102,14 @@ struct AttestState * Check that the reserve balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void reserve_attest_cb ( - void *cls, + struct AttestState *ss, const struct TALER_EXCHANGE_PostReservesAttestResponse *rs) { - struct AttestState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; ss->rsh = NULL; diff --git a/src/testing/testing_api_cmd_reserve_close.c b/src/testing/testing_api_cmd_reserve_close.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct CloseState; +#define TALER_EXCHANGE_POST_RESERVES_CLOSE_RESULT_CLOSURE struct CloseState +#include "taler/exchange/post-reserves-RESERVE_PUB-close.h" #include "taler/taler_testing_lib.h" @@ -85,14 +88,13 @@ struct CloseState * Check that the reserve balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void -reserve_close_cb (void *cls, +reserve_close_cb (struct CloseState *ss, const struct TALER_EXCHANGE_PostReservesCloseResponse *rs) { - struct CloseState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; ss->rsh = NULL; diff --git a/src/testing/testing_api_cmd_reserve_get.c b/src/testing/testing_api_cmd_reserve_get.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct StatusState; +#define TALER_EXCHANGE_GET_RESERVES_RESULT_CLOSURE struct StatusState +#include "taler/exchange/get-reserves-RESERVE_PUB.h" #include "taler/taler_testing_lib.h" @@ -109,14 +112,13 @@ struct StatusState * Check that the reserve balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void -reserve_status_cb (void *cls, +reserve_status_cb (struct StatusState *ss, const struct TALER_EXCHANGE_GetReservesResponse *rs) { - struct StatusState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; struct TALER_Amount eb; diff --git a/src/testing/testing_api_cmd_reserve_get_attestable.c b/src/testing/testing_api_cmd_reserve_get_attestable.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct GetAttestableState; +#define TALER_EXCHANGE_GET_RESERVES_ATTEST_RESULT_CLOSURE struct \ + GetAttestableState +#include "taler/exchange/get-reserves-attest-RESERVE_PUB.h" #include "taler/taler_testing_lib.h" @@ -73,15 +77,14 @@ struct GetAttestableState * Check that the reserve balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void reserve_get_attestable_cb ( - void *cls, + struct GetAttestableState *ss, const struct TALER_EXCHANGE_GetReservesAttestResponse *rs) { - struct GetAttestableState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; ss->rgah = NULL; diff --git a/src/testing/testing_api_cmd_reserve_history.c b/src/testing/testing_api_cmd_reserve_history.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct HistoryState; +#define TALER_EXCHANGE_GET_RESERVES_HISTORY_RESULT_CLOSURE struct HistoryState +#include "taler/exchange/get-reserves-RESERVE_PUB-history.h" #include "taler/taler_testing_lib.h" @@ -360,14 +363,13 @@ analyze_command (void *cls, * Check that the reserve balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void -reserve_history_cb (void *cls, +reserve_history_cb (struct HistoryState *ss, const struct TALER_EXCHANGE_GetReservesHistoryResponse *rs) { - struct HistoryState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; struct TALER_Amount eb; diff --git a/src/testing/testing_api_cmd_reserve_open.c b/src/testing/testing_api_cmd_reserve_open.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct OpenState; +#define TALER_EXCHANGE_POST_RESERVES_OPEN_RESULT_CLOSURE struct OpenState +#include "taler/exchange/post-reserves-RESERVE_PUB-open.h" #include "taler/taler_testing_lib.h" @@ -116,14 +119,13 @@ struct OpenState * Check that the reserve balance and HTTP response code are * both acceptable. * - * @param cls closure. + * @param ss closure. * @param rs HTTP response details */ static void -reserve_open_cb (void *cls, +reserve_open_cb (struct OpenState *ss, const struct TALER_EXCHANGE_PostReservesOpenResponse *rs) { - struct OpenState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; ss->rsh = NULL; diff --git a/src/testing/testing_api_cmd_reserve_purse.c b/src/testing/testing_api_cmd_reserve_purse.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct ReservePurseState; +#define TALER_EXCHANGE_POST_RESERVES_PURSE_RESULT_CLOSURE struct \ + ReservePurseState +#include "taler/exchange/post-reserves-RESERVE_PUB-purse.h" #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" @@ -138,15 +142,13 @@ struct ReservePurseState * Callback to analyze the /reserves/$PID/purse response, just used to check if * the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param dr purse response details */ static void -purse_cb (void *cls, +purse_cb (struct ReservePurseState *ds, const struct TALER_EXCHANGE_PostReservesPurseResponse *dr) { - struct ReservePurseState *ds = cls; - ds->dh = NULL; ds->reserve_sig = *dr->reserve_sig; if (ds->expected_response_code != dr->hr.http_status) diff --git a/src/testing/testing_api_cmd_revoke_denom_key.c b/src/testing/testing_api_cmd_revoke_denom_key.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct RevokeState; +#define TALER_EXCHANGE_POST_MANAGEMENT_DENOMINATIONS_REVOKE_RESULT_CLOSURE \ + struct RevokeState +#include "taler/exchange/post-management-denominations-H_DENOM_PUB-revoke.h" #include "taler/taler_testing_lib.h" @@ -62,15 +66,14 @@ struct RevokeState /** * Function called with information about the post revocation operation result. * - * @param cls closure with a `struct RevokeState *` + * @param rs closure with a `struct RevokeState *` * @param rdr response data */ static void success_cb ( - void *cls, + struct RevokeState *rs, const struct TALER_EXCHANGE_PostManagementDenominationsRevokeResponse *rdr) { - struct RevokeState *rs = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rdr->hr; rs->kh = NULL; diff --git a/src/testing/testing_api_cmd_revoke_sign_key.c b/src/testing/testing_api_cmd_revoke_sign_key.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct RevokeState; +#define TALER_EXCHANGE_POST_MANAGEMENT_SIGNKEYS_REVOKE_RESULT_CLOSURE \ + struct RevokeState +#include "taler/exchange/post-management-signkeys-EXCHANGE_PUB-revoke.h" #include "taler/taler_testing_lib.h" @@ -62,15 +66,14 @@ struct RevokeState /** * Function called with information about the post revocation operation result. * - * @param cls closure with a `struct RevokeState *` + * @param rs closure with a `struct RevokeState *` * @param rsr response data */ static void success_cb ( - void *cls, + struct RevokeState *rs, const struct TALER_EXCHANGE_PostManagementSignkeysRevokeResponse *rsr) { - struct RevokeState *rs = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rsr->hr; rs->kh = NULL; diff --git a/src/testing/testing_api_cmd_set_wire_fee.c b/src/testing/testing_api_cmd_set_wire_fee.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct WireFeeState; +#define TALER_EXCHANGE_POST_MANAGEMENT_WIRE_FEES_RESULT_CLOSURE \ + struct WireFeeState +#include "taler/exchange/post-management-wire-fee.h" #include "taler/taler_testing_lib.h" @@ -73,14 +77,13 @@ struct WireFeeState * Callback to analyze the /management/wire response, just used to check * if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param sfr response details */ static void -wire_add_cb (void *cls, +wire_add_cb (struct WireFeeState *ds, const struct TALER_EXCHANGE_PostManagementWireFeesResponse *sfr) { - struct WireFeeState *ds = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &sfr->hr; ds->dh = NULL; diff --git a/src/testing/testing_api_cmd_transfer_get.c b/src/testing/testing_api_cmd_transfer_get.c @@ -24,6 +24,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct TrackTransferState; +#define TALER_EXCHANGE_GET_TRANSFERS_RESULT_CLOSURE struct TrackTransferState +#include "taler/exchange/get-transfers-WTID.h" #include "taler/taler_testing_lib.h" /** @@ -116,15 +119,14 @@ track_transfer_cleanup ( * operation is acceptable, and all other values like total amount, * wire fees and hashed wire details as well. * - * @param cls closure. + * @param tts closure. * @param tgr response details */ static void track_transfer_cb ( - void *cls, + struct TrackTransferState *tts, const struct TALER_EXCHANGE_GetTransfersResponse *tgr) { - struct TrackTransferState *tts = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &tgr->hr; struct TALER_TESTING_Interpreter *is = tts->is; struct TALER_Amount expected_amount; diff --git a/src/testing/testing_api_cmd_wire_add.c b/src/testing/testing_api_cmd_wire_add.c @@ -23,6 +23,9 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct WireAddState; +#define TALER_EXCHANGE_POST_MANAGEMENT_WIRE_RESULT_CLOSURE struct WireAddState +#include "taler/exchange/post-management-wire.h" #include "taler/taler_testing_lib.h" @@ -63,14 +66,13 @@ struct WireAddState * Callback to analyze the /management/wire response, just used to check * if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param wer response details */ static void -wire_add_cb (void *cls, +wire_add_cb (struct WireAddState *ds, const struct TALER_EXCHANGE_PostManagementWireResponse *wer) { - struct WireAddState *ds = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &wer->hr; ds->dh = NULL; diff --git a/src/testing/testing_api_cmd_wire_del.c b/src/testing/testing_api_cmd_wire_del.c @@ -23,6 +23,10 @@ */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> +struct WireDelState; +#define TALER_EXCHANGE_POST_MANAGEMENT_WIRE_DISABLE_RESULT_CLOSURE \ + struct WireDelState +#include "taler/exchange/post-management-wire-disable.h" #include "taler/taler_testing_lib.h" @@ -63,14 +67,13 @@ struct WireDelState * Callback to analyze the /management/wire response, just used to check * if the response code is acceptable. * - * @param cls closure. + * @param ds closure. * @param wdr response details */ static void -wire_del_cb (void *cls, +wire_del_cb (struct WireDelState *ds, const struct TALER_EXCHANGE_PostManagementWireDisableResponse *wdr) { - struct WireDelState *ds = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &wdr->hr; ds->dh = NULL;