summaryrefslogtreecommitdiff
path: root/src/include/taler_auditordb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-09-30 20:29:19 +0200
committerChristian Grothoff <christian@grothoff.org>2017-09-30 20:29:19 +0200
commit96e04d33e10924bfa74faca69c9c1d1038b22b15 (patch)
tree82bc132e9eecf56334b6b267495ee82322fcbad9 /src/include/taler_auditordb_plugin.h
parent34db060b4ce399f0923490804278ea7c6df0895b (diff)
downloadexchange-96e04d33e10924bfa74faca69c9c1d1038b22b15.tar.gz
exchange-96e04d33e10924bfa74faca69c9c1d1038b22b15.tar.bz2
exchange-96e04d33e10924bfa74faca69c9c1d1038b22b15.zip
update auditordb API to support logic for taler-wire-auditor
Diffstat (limited to 'src/include/taler_auditordb_plugin.h')
-rw-r--r--src/include/taler_auditordb_plugin.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
index 3141ad62..e94144fc 100644
--- a/src/include/taler_auditordb_plugin.h
+++ b/src/include/taler_auditordb_plugin.h
@@ -107,6 +107,24 @@ typedef int
/**
+ * 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.
*/
@@ -352,6 +370,56 @@ struct TALER_AUDITORDB_Plugin
/**
+ * 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.
*