diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-01-15 13:27:19 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-01-15 13:27:19 +0100 |
commit | 9fffeee4ef8bc4d1c42cb0bd7ece49555ab97ea2 (patch) | |
tree | c4f4d1f9b0c8714776530d7a8b627ca04b91bd46 /src/include/taler_exchangedb_plugin.h | |
parent | 08e0d56614c5c930239e0947ce8fe64f6a56ad8b (diff) | |
parent | acc3a41df812b59a1775d3fc0697a0b73d847963 (diff) | |
download | exchange-9fffeee4ef8bc4d1c42cb0bd7ece49555ab97ea2.tar.gz exchange-9fffeee4ef8bc4d1c42cb0bd7ece49555ab97ea2.tar.bz2 exchange-9fffeee4ef8bc4d1c42cb0bd7ece49555ab97ea2.zip |
merge changelog
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index e64b0ad4c..ae38856a3 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -733,6 +733,29 @@ typedef int /** + * Callback invoked with information about refunds applicable + * to a particular coin. + * + * @param cls closure + * @param merchant_pub public key of merchant who authorized refund + * @param merchant_sig signature of merchant authorizing refund + * @param h_contract hash of contract being refunded + * @param rtransaction_id refund transaction ID + * @param amount_with_fee amount being refunded + * @param refund_fee fee the exchange keeps for the refund processing + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop + */ +typedef int +(*TALER_EXCHANGEDB_RefundCoinCallback)(void *cls, + const struct TALER_MerchantPublicKeyP *merchant_pub, + const struct TALER_MerchantSignatureP *merchant_sig, + const struct GNUNET_HashCode *h_contract, + uint64_t rtransaction_id, + const struct TALER_Amount *amount_with_fee, + const struct TALER_Amount *refund_fee); + + +/** * Information about a coin that was revealed to the exchange * during /refresh/reveal. */ @@ -1358,6 +1381,23 @@ struct TALER_EXCHANGEDB_Plugin struct TALER_EXCHANGEDB_Session *session, const struct TALER_EXCHANGEDB_Refund *refund); + /** + * Select refunds by @a coin_pub. + * + * @param cls closure of plugin + * @param session database handle to use + * @param coin_pub coin to get refunds for + * @param cb function to call for each refund found + * @param cb_cls closure for @a cb + * @return query result status + */ + enum GNUNET_DB_QueryStatus + (*select_refunds_by_coin)(void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + TALER_EXCHANGEDB_RefundCoinCallback cb, + void *cb_cls); + /** * Mark a deposit as tiny, thereby declaring that it cannot be @@ -1658,6 +1698,7 @@ struct TALER_EXCHANGEDB_Plugin * @param start_date when does the fee go into effect * @param end_date when does the fee end being valid * @param wire_fee how high is the wire transfer fee + * @param closing_fee how high is the closing fee * @param master_sig signature over the above by the exchange master key * @return transaction status code */ @@ -1668,6 +1709,7 @@ struct TALER_EXCHANGEDB_Plugin struct GNUNET_TIME_Absolute start_date, struct GNUNET_TIME_Absolute end_date, const struct TALER_Amount *wire_fee, + const struct TALER_Amount *closing_fee, const struct TALER_MasterSignatureP *master_sig); @@ -1681,6 +1723,7 @@ struct TALER_EXCHANGEDB_Plugin * @param[out] start_date when does the fee go into effect * @param[out] end_date when does the fee end being valid * @param[out] wire_fee how high is the wire transfer fee + * @param[out] closing_fee how high is the closing fee * @param[out] master_sig signature over the above by the exchange master key * @return query status of the transaction */ @@ -1692,6 +1735,7 @@ struct TALER_EXCHANGEDB_Plugin struct GNUNET_TIME_Absolute *start_date, struct GNUNET_TIME_Absolute *end_date, struct TALER_Amount *wire_fee, + struct TALER_Amount *closing_fee, struct TALER_MasterSignatureP *master_sig); |