diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-12-09 15:36:34 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-12-09 15:36:34 +0100 |
commit | c20f955ae43a57208b40d9a7978a7f089592ad60 (patch) | |
tree | 93f142c11461c77654f76fb427d8ea5bbb57ef0d /src/include/taler_mintdb_plugin.h | |
parent | c5204d3a213fb70d10ec873fc869013390a5435f (diff) |
towards /deposit/wtid handling (more skeleton work)
Diffstat (limited to 'src/include/taler_mintdb_plugin.h')
-rw-r--r-- | src/include/taler_mintdb_plugin.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index d83cf9d44..d9a1c6c85 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -569,6 +569,23 @@ typedef void /** + * Function called with the results of the lookup of the + * wire transfer identifier information. + * + * @param cls closure + * @param wtid base32-encoded wire transfer identifier, NULL + * if the transaction was not yet done + * @param execution_time when was the transaction done, or + * when we expect it to be done (if @a wtid was NULL); + * #GNUNET_TIME_UNIT_FOREVER_ABS if the /deposit is unknown + * to the mint + */ +typedef void +(*TALER_MINTDB_DepositWtidCallback)(void *cls, + const char *wtid, + struct GNUNET_TIME_Absolute execution_time); + +/** * @brief The plugin API, returned from the plugin's "init" function. * The argument given to "init" is simply a configuration handle. */ @@ -1177,6 +1194,31 @@ struct TALER_MINTDB_Plugin struct TALER_MINTDB_TransactionList *list); + /** + * Try to find the wire transfer details for a deposit operation. + * If we did not execute the deposit yet, return when it is supposed + * to be executed. + * + * @param cls closure + * @param h_contract hash of the contract + * @param h_wire hash of merchant wire details + * @param coin_pub public key of deposited coin + * @param merchant_pub merchant public key + * @param transaction_id transaction identifier + * @param cb function to call with the result + * @param cb_cls closure to pass to @a cb + * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors + */ + int + (*wire_lookup_deposit_wtid)(void *cls, + const struct GNUNET_HashCode *h_contract, + const struct GNUNET_HashCode *h_wire, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_MerchantPublicKeyP *merchant_pub, + uint64_t transaction_id, + TALER_MINTDB_DepositWtidCallback cb, + void *cb_cls); + }; |