From 96e04d33e10924bfa74faca69c9c1d1038b22b15 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 30 Sep 2017 20:29:19 +0200 Subject: update auditordb API to support logic for taler-wire-auditor --- src/include/taler_auditordb_plugin.h | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'src/include/taler_auditordb_plugin.h') diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h index 3141ad62d..e94144fc3 100644 --- a/src/include/taler_auditordb_plugin.h +++ b/src/include/taler_auditordb_plugin.h @@ -106,6 +106,24 @@ typedef int const struct TALER_Amount *reserve_profits); +/** + * Structure for remembering the wire auditor's progress over the + * various tables and (auditor) transactions. + */ +struct TALER_AUDITORDB_WireProgressPoint +{ + /** + * last_reserve_in_serial_id serial ID of the last reserve_in transfer the wire auditor processed + */ + uint64_t last_reserve_in_serial_id; + + /** + * last_reserve_out_serial_id serial ID of the last reserve_out the wire auditor processed + */ + uint64_t last_reserve_out_serial_id; +}; + + /** * Structure for remembering the auditor's progress over the * various tables and (auditor) transactions. @@ -351,6 +369,56 @@ struct TALER_AUDITORDB_Plugin struct TALER_AUDITORDB_ProgressPoint *pp); + /** + * Insert information about the wire auditor's progress with an exchange's + * data. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param session connection to use + * @param master_pub master key of the exchange + * @param pp where is the auditor in processing + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*insert_wire_auditor_progress)(void *cls, + struct TALER_AUDITORDB_Session *session, + const struct TALER_MasterPublicKeyP *master_pub, + const struct TALER_AUDITORDB_WireProgressPoint *pp); + + + /** + * Update information about the progress of the wire auditor. There + * must be an existing record for the exchange. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param session connection to use + * @param master_pub master key of the exchange + * @param pp where is the auditor in processing + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*update_wire_auditor_progress)(void *cls, + struct TALER_AUDITORDB_Session *session, + const struct TALER_MasterPublicKeyP *master_pub, + const struct TALER_AUDITORDB_WireProgressPoint *pp); + + + /** + * Get information about the progress of the wire auditor. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param session connection to use + * @param master_pub master key of the exchange + * @param[out] pp set to where the auditor is in processing + * @return transaction status code + */ + enum GNUNET_DB_QueryStatus + (*get_wire_auditor_progress)(void *cls, + struct TALER_AUDITORDB_Session *session, + const struct TALER_MasterPublicKeyP *master_pub, + struct TALER_AUDITORDB_WireProgressPoint *pp); + + /** * Insert information about a reserve. There must not be an * existing record for the reserve. -- cgit v1.2.3