diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-16 17:25:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-16 17:57:29 +0200 |
commit | 272f1135fca8bfd667dccc84f2bd6f31b7d2cc90 (patch) | |
tree | 4ab604ec478dacae6c10903af5d92da4d27f0f9d /src/include/taler_exchangedb_plugin.h | |
parent | 4a845205144875ae6be960fa02d5c0f4a82130dc (diff) |
add exchangedb function for #4961
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 2cc2c750d..006ea3981 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1042,6 +1042,30 @@ typedef void /** + * Function called on deposits that are past their due date + * and have not yet seen a wire transfer. + * + * @param cls closure + * @param rowid deposit table row of the coin's deposit + * @param coin_pub public key of the coin + * @param amount value of the deposit, including fee + * @param wire where should the funds be wired + * @param deadline what was the requested wire transfer deadline + * @param tiny did the exchange defer this transfer because it is too small? + * @param done did the exchange claim that it made a transfer? + */ +typedef void +(*TALER_EXCHANGEDB_WireMissingCallback)(void *cls, + uint64_t rowid, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + const struct TALER_Amount *amount, + const json_t *wire, + struct GNUNET_TIME_Absolute deadline, + /* bool? */ int tiny, + /* bool? */ int done); + + +/** * @brief The plugin API, returned from the plugin's "init" function. * The argument given to "init" is simply a configuration handle. */ @@ -2189,6 +2213,28 @@ struct TALER_EXCHANGEDB_Plugin uint64_t *rowid); + /** + * Select all of those deposits in the database for which we do + * not have a wire transfer (or a refund) and which should have + * been deposited between @a start_date and @a end_date. + * + * @param cls closure + * @param session a session + * @param start_date lower bound on the requested wire execution date + * @param end_date upper bound on the requested wire execution date + * @param cb function to call on all such deposits + * @param cb_cls closure for @a cb + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*select_deposits_missing_wire)(void *cls, + struct TALER_EXCHANGEDB_Session *session, + struct GNUNET_TIME_Absolute start_date, + struct GNUNET_TIME_Absolute end_date, + TALER_EXCHANGEDB_WireMissingCallback cb, + void *cb_cls); + + }; |