summaryrefslogtreecommitdiff
path: root/src/include/taler_exchangedb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-22 00:12:18 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-22 00:12:18 +0200
commit10f9272e45ea97d1b8f8059c9d285049ff4b606d (patch)
treedbb087c7ce3c4681d75252d79b6170460a2e2ec4 /src/include/taler_exchangedb_plugin.h
parent9ad3469f07cfd944c2012a44851cdabf46703e22 (diff)
downloadexchange-10f9272e45ea97d1b8f8059c9d285049ff4b606d.tar.gz
exchange-10f9272e45ea97d1b8f8059c9d285049ff4b606d.tar.bz2
exchange-10f9272e45ea97d1b8f8059c9d285049ff4b606d.zip
-implement long polling support on reserve status (but not yet in C client library)
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r--src/include/taler_exchangedb_plugin.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 61c764a53..4cf6514f3 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -73,9 +73,32 @@ struct TALER_EXCHANGEDB_DenominationKeyInformationP
};
+/**
+ * Signature of events signalling a reseve got funding.
+ */
+struct TALER_ReserveEventP
+{
+ /**
+ * Of type #TALER_DBEVENT_EXCHANGE_RESERVE_INCOMING.
+ */
+ struct GNUNET_DB_EventHeaderP header;
+
+ /**
+ * Public key of the reserve the event is about.
+ */
+ struct TALER_ReservePublicKeyP reserve_pub;
+};
+
+
GNUNET_NETWORK_STRUCT_END
/**
+ * Event registration record.
+ */
+struct TALER_EXCHANGEDB_EventHandler;
+
+
+/**
* Meta data about an exchange online signing key.
*/
struct TALER_EXCHANGEDB_SignkeyMetaData
@@ -2149,16 +2172,16 @@ struct TALER_EXCHANGEDB_Plugin
* Register callback to be invoked on events of type @a es.
*
* @param cls database context to use
- * @param session connection to use
+ * @param timeout how long to wait at most
* @param es specification of the event to listen for
* @param cb function to call when the event happens, possibly
* multiple times (until cancel is invoked)
* @param cb_cls closure for @a cb
* @return handle useful to cancel the listener
*/
- struct GNUNET_DB_EventHandler *
+ struct TALER_EXCHANGEDB_EventHandler *
(*event_listen)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
+ struct GNUNET_TIME_Relative timeout,
const struct GNUNET_DB_EventHeaderP *es,
GNUNET_DB_EventCallback cb,
void *cb_cls);
@@ -2171,7 +2194,7 @@ struct TALER_EXCHANGEDB_Plugin
*/
void
(*event_listen_cancel)(void *cls,
- struct GNUNET_DB_EventHandler *eh);
+ struct TALER_EXCHANGEDB_EventHandler *eh);
/**