From aea82d3dcde94b68a70a65be8736cf7ad437b0c7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 2 Apr 2018 21:12:18 +0200 Subject: allow auditor to operate per-account --- src/include/taler_exchangedb_plugin.h | 45 ++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'src/include/taler_exchangedb_plugin.h') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 0d6f9cd90..fb5b47d83 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -1878,6 +1878,8 @@ struct TALER_EXCHANGEDB_Plugin * @param wire_account details about the receiver account of the wire transfer, * including 'url' in payto://-format * @param amount amount that was transmitted + * @param exchange_account_section configuration section of the exchange specifying the + * exchange's bank account being used * @return transaction status code */ enum GNUNET_DB_QueryStatus @@ -1886,6 +1888,7 @@ struct TALER_EXCHANGEDB_Plugin struct GNUNET_TIME_Absolute date, const struct TALER_WireTransferIdentifierRawP *wtid, const json_t *wire_account, + const char *exchange_account_section, const struct TALER_Amount *amount); @@ -1983,12 +1986,33 @@ struct TALER_EXCHANGEDB_Plugin TALER_EXCHANGEDB_ReserveInCallback cb, void *cb_cls); + /** + * Select inbound wire transfers into reserves_in above @a serial_id + * in monotonically increasing order by @a account_name. + * + * @param cls closure + * @param session database connection + * @param account_name name of the account for which we do the selection + * @param serial_id highest serial ID to exclude (select strictly larger) + * @param cb function to call on each result + * @param cb_cls closure for @a cb + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*select_reserves_in_above_serial_id_by_account)(void *cls, + struct TALER_EXCHANGEDB_Session *session, + const char *account_name, + uint64_t serial_id, + TALER_EXCHANGEDB_ReserveInCallback cb, + void *cb_cls); + /** * Select withdraw operations from reserves_out above @a serial_id * in monotonically increasing order. * * @param cls closure * @param session database connection + * @param account_name name of the account for which we do the selection * @param serial_id highest serial ID to exclude (select strictly larger) * @param cb function to call on each result * @param cb_cls closure for @a cb @@ -2001,7 +2025,6 @@ struct TALER_EXCHANGEDB_Plugin TALER_EXCHANGEDB_WithdrawCallback cb, void *cb_cls); - /** * Function called to select outgoing wire transfers the exchange * executed, ordered by serial ID (monotonically increasing). @@ -2020,6 +2043,26 @@ struct TALER_EXCHANGEDB_Plugin TALER_EXCHANGEDB_WireTransferOutCallback cb, void *cb_cls); + /** + * Function called to select outgoing wire transfers the exchange + * executed, ordered by serial ID (monotonically increasing). + * + * @param cls closure + * @param session database connection + * @param account_name name to select by + * @param serial_id lowest serial ID to include (select larger or equal) + * @param cb function to call for ONE unfinished item + * @param cb_cls closure for @a cb + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*select_wire_out_above_serial_id_by_account)(void *cls, + struct TALER_EXCHANGEDB_Session *session, + const char *account_name, + uint64_t serial_id, + TALER_EXCHANGEDB_WireTransferOutCallback cb, + void *cb_cls); + /** * Function called to select payback requests the exchange -- cgit v1.2.3