summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-04 17:36:56 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-04 17:36:56 +0100
commitac850bfcd2d41a195520835369c2c9056aed1141 (patch)
treec9d839c6536212498eba448268c107f7052b6584 /src/include
parent332341cb7b143605edd0971de17615cebc236374 (diff)
downloadexchange-ac850bfcd2d41a195520835369c2c9056aed1141.tar.gz
exchange-ac850bfcd2d41a195520835369c2c9056aed1141.tar.bz2
exchange-ac850bfcd2d41a195520835369c2c9056aed1141.zip
add auditing of deposit confirmations to auditor (#5447)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_auditordb_plugin.h35
-rw-r--r--src/include/taler_exchangedb_plugin.h4
2 files changed, 38 insertions, 1 deletions
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
index 76dcc3507..92494ab32 100644
--- a/src/include/taler_auditordb_plugin.h
+++ b/src/include/taler_auditordb_plugin.h
@@ -346,6 +346,20 @@ struct TALER_AUDITORDB_DepositConfirmation
/**
+ * Function called with deposit confirmations stored in
+ * the auditor's database.
+ *
+ * @param cls closure
+ * @param serial_id location of the @a dc in the database
+ * @param dc the deposit confirmation itself
+ */
+typedef void
+(*TALER_AUDITORDB_DepositConfirmationCallback)(void *cls,
+ uint64_t serial_id,
+ const struct TALER_AUDITORDB_DepositConfirmation *dc);
+
+
+/**
* Handle for one session with the database.
*/
struct TALER_AUDITORDB_Session;
@@ -526,6 +540,27 @@ struct TALER_AUDITORDB_Plugin
/**
+ * Get information about a deposit confirmations from the database.
+ *
+ * @param cls the @e cls of this struct with the plugin-specific state
+ * @param session connection to the database
+ * @param master_pub for which exchange do we want to get deposit confirmations
+ * @param start_id row/serial ID where to start the iteration (0 from
+ * the start, exclusive, i.e. serial_ids must start from 1)
+ * @param cb function to call with results
+ * @param cb_cls closure for @a cb
+ * @return query result status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*get_deposit_confirmations) (void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_public_key,
+ uint64_t start_id,
+ TALER_AUDITORDB_DepositConfirmationCallback cb,
+ void *cb_cls);
+
+
+ /**
* Insert information about a denomination key and in particular
* the properties (value, fees, expiration times) the coins signed
* with this key have.
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index c8417a3a7..89df42190 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -1431,6 +1431,7 @@ struct TALER_EXCHANGEDB_Plugin
* @param cls the @e cls of this struct with the plugin-specific state
* @param session database connection
* @param deposit deposit to search for
+ * @param check_extras wether to check extra fields or not
* @return 1 if we know this operation,
* 0 if this exact deposit is unknown to us,
* otherwise transaction error status
@@ -1438,7 +1439,8 @@ struct TALER_EXCHANGEDB_Plugin
enum GNUNET_DB_QueryStatus
(*have_deposit) (void *cls,
struct TALER_EXCHANGEDB_Session *session,
- const struct TALER_EXCHANGEDB_Deposit *deposit);
+ const struct TALER_EXCHANGEDB_Deposit *deposit,
+ int check_extras);
/**