aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNic Eigel <nic@eigel.ch>2024-01-16 22:37:07 +0100
committerNic Eigel <nic@eigel.ch>2024-01-16 22:37:07 +0100
commit45b110edb2b4fd39c56f433c5c0a7f93cd29d4da (patch)
tree3ce6145e8ea7f67daaa1af55b3651002021167fd /src/include
parent510d4fc5234e8e17d73e8d95a0dc66ad37c03fef (diff)
downloadexchange-45b110edb2b4fd39c56f433c5c0a7f93cd29d4da.tar.xz
progress on auditor helpers
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_auditordb_plugin.h43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
index b83d6316c..6e0e97ca0 100644
--- a/src/include/taler_auditordb_plugin.h
+++ b/src/include/taler_auditordb_plugin.h
@@ -689,6 +689,47 @@ struct TALER_AUDITORDB_Plugin
enum GNUNET_GenericReturnValue
(*preflight)(void *cls);
+ /**
+ * Register callback to be invoked on events of type @a es.
+ *
+ * @param cls database context to use
+ * @param es specification of the event to listen for
+ * @param timeout how long to wait for the event
+ * @param cb function to call when the event happens, possibly
+ * mulrewardle times (until cancel is invoked)
+ * @param cb_cls closure for @a cb
+ * @return handle useful to cancel the listener
+ */
+ struct GNUNET_DB_EventHandler *
+ (*event_listen)(void *cls,
+ const struct GNUNET_DB_EventHeaderP *es,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DB_EventCallback cb,
+ void *cb_cls);
+
+ /**
+ * Stop notifications.
+ *
+ * @param eh handle to unregister.
+ */
+ void
+ (*event_listen_cancel)(struct GNUNET_DB_EventHandler *eh);
+
+
+ /**
+ * Notify all that listen on @a es of an event.
+ *
+ * @param cls database context to use
+ * @param es specification of the event to generate
+ * @param extra additional event data provided
+ * @param extra_size number of bytes in @a extra
+ */
+ void
+ (*event_notify)(void *cls,
+ const struct GNUNET_DB_EventHeaderP *es,
+ const void *extra,
+ size_t extra_size);
+
/**
* Drop all auditor tables OR deletes recoverable auditor state.
@@ -828,7 +869,6 @@ struct TALER_AUDITORDB_Plugin
* Get information about deposit confirmations from the database.
*
* @param cls the @e cls of this struct with the plugin-specific state
- * @param master_public_key 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
@@ -838,7 +878,6 @@ struct TALER_AUDITORDB_Plugin
enum GNUNET_DB_QueryStatus
(*get_deposit_confirmations)(
void *cls,
- const struct TALER_MasterPublicKeyP *master_public_key,
uint64_t start_id,
TALER_AUDITORDB_DepositConfirmationCallback cb,
void *cb_cls);