From da5f393967e9a4e6b7c78b72f1c9f74a49bb52c6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 20 Jun 2020 18:22:33 +0200 Subject: start with reserve processing logic --- src/include/taler_merchantdb_plugin.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index e8c71546..abd1ef03 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -483,6 +483,24 @@ typedef void bool active); +/** + * Callback with details about a reserve pending exchange confirmation. + * + * @param cls closure + * @param instance_id for which instance is this reserve + * @param exchange_url base URL of the exchange + * @param reserve_pub public key of the reserve + * @param expected_amount how much do we expect to see in the reserve + */ +typedef void +(*TALER_MERCHANTDB_PendingReservesCallback)( + void *cls, + const char *instance_id, + const char *exchange_url, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_Amount *expected_amount); + + /** * Details about a tip. */ @@ -1702,6 +1720,20 @@ struct TALER_MERCHANTDB_Plugin void *cb_cls); + /** + * Lookup reserves pending activation across all instances. + * + * @param cls closure + * @param cb function to call with reserve data + * @param cb_cls closure for @a cb + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*lookup_pending_reserves)(void *cls, + TALER_MERCHANTDB_PendingReservesCallback cb, + void *cb_cls); + + /** * Lookup reserve details. * -- cgit v1.2.3