From 05afe21f0f4788451af7baaeda4f2f7fd6c547c5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 6 May 2020 22:16:27 +0200 Subject: fix FTBFS --- src/include/taler_merchantdb_plugin.h | 90 ++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 22 deletions(-) (limited to 'src/include/taler_merchantdb_plugin.h') diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 94fe6188..51d48dc4 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -394,6 +394,22 @@ enum TALER_MERCHANTDB_RefundStatus }; +/** + * Function called with information about a wire transfer identifier. + * + * @param cls closure + * @param order_id the order to which the deposits belong + * @param deposit_value the amount deposited under @a order_id + * @param deposit_fee the fee charged for @a deposit_value + */ +typedef void +(*TALER_MERCHANTDB_TransferDetailsCallback)( + void *cls, + const char *order_id, + const struct TALER_Amount *deposit_value, + const struct TALER_Amount *deposit_fee); + + /* **************** OLD: ******************** */ /** @@ -1284,6 +1300,58 @@ struct TALER_MERCHANTDB_Plugin struct TALER_MasterSignatureP *master_sig); + /* WIP: */ + /** + * Lookup information about coin payments by @a h_contract_terms and + * @a coin_pub. + * + * @param cls closure + * @param instance_id instance to lookup payments for + * @param h_contract_terms proposal data's hashcode + * @param coin_pub public key to use for the search + * @param cb function to call with payment data + * @param cb_cls closure for @a cb + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*lookup_deposits_by_contract_and_coin)( + void *cls, + const char *instance_id, + const struct GNUNET_HashCode *h_contract_terms, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + TALER_MERCHANTDB_CoinDepositCallback cb, + void *cb_cls); + + + /** + * Lookup transfer details. + * + * @param cls closure + * @param instance_id instance to lookup payments for + * @param exchange_url + * @param payto_uri + * @param wtid + * @param total_amount + * @param wire_fee + * @param execution_time + * @param cb function to call with detailed transfer data + * @param cb_cls closure for @a cb + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*lookup_transfer_details)( + void *cls, + const char *instance_id, + const char *exchange_url, + const char *payto_uri, + const struct TALER_WireTransferIdentifierRawP *wtid, + const struct TALER_Amount *total_amount, + const struct TALER_Amount *wire_fee, + struct GNUNET_TIME_Absolute execution_time, + TALER_MERCHANTDB_TransferDetailsCallback cb, + void *cb_cls); + + /* ****************** OLD API ******************** */ @@ -1462,28 +1530,6 @@ struct TALER_MERCHANTDB_Plugin const struct TALER_MasterSignatureP *exchange_sig); - /** - * Lookup information about coin payments by h_contract_terms and coin. - * - * @param cls closure - * @param h_contract_terms proposal data's hashcode - * @param merchant_pub merchant's public key. It's AND'd with @a h_contract_terms - * in order to find the result. - * @param coin_pub public key to use for the search - * @param cb function to call with payment data - * @param cb_cls closure for @a cb - * @return transaction status - */ - enum GNUNET_DB_QueryStatus - (*find_payments_by_hash_and_coin)( - void *cls, - const struct GNUNET_HashCode *h_contract_terms, - const struct TALER_MerchantPublicKeyP *merchant_pub, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - TALER_MERCHANTDB_CoinDepositCallback cb, - void *cb_cls); - - /** * Lookup information about a transfer by @a h_contract_terms. Note * that in theory there could be multiple wire transfers for a -- cgit v1.2.3