summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd.h')
-rw-r--r--src/backend/taler-merchant-httpd.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/backend/taler-merchant-httpd.h b/src/backend/taler-merchant-httpd.h
index 03e62d2c..64bd8ad1 100644
--- a/src/backend/taler-merchant-httpd.h
+++ b/src/backend/taler-merchant-httpd.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014-2018 Taler Systems SA
+ Copyright (C) 2014-2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -108,6 +108,11 @@ struct TMH_MerchantInstance
struct TMH_WireMethod *wm_tail;
/**
+ * Hash of the instance ID, key for the DHT.
+ */
+ struct GNUNET_HashCode h_instance;
+
+ /**
* Head of DLL of long-polling GET /orders requests of this instance.
*/
struct TMH_PendingOrder *po_head;
@@ -138,12 +143,6 @@ struct TMH_MerchantInstance
struct TALER_MERCHANTDB_InstanceAuthSettings auth;
/**
- * Timestamp when we last updated this instance's data
- * with the information from the database.
- */
- struct GNUNET_TIME_Absolute staleness;
-
- /**
* Reference counter on this structure. Only destroyed if the
* counter hits zero.
*/
@@ -512,12 +511,17 @@ TMH_long_poll_resume2 (const char *session_id,
/**
- * Decrement reference counter of @a mi, and free if it hits zero.
+ * Callback that frees an instances removing
+ * it from the global hashmap.
*
- * @param[in,out] mi merchant instance to update and possibly free
+ * @param cls closure, NULL
+ * @param key current key
+ * @param value a `struct TMH_MerchantInstance`
*/
-void
-TMH_instance_decref (struct TMH_MerchantInstance *mi);
+int
+TMH_instance_free_cb (void *cls,
+ const struct GNUNET_HashCode *key,
+ void *value);
/**
@@ -541,6 +545,17 @@ TMH_lookup_instance (const char *instance_id);
/**
+ * A transaction modified an instance setting
+ * (or created/deleted/purged one). Notify all
+ * backends about the change.
+ *
+ * @param id ID of the instance that changed
+ */
+void
+TMH_reload_instances (const char *id);
+
+
+/**
* Check that @a token hashes to @a hash under @a salt for
* merchant instance authentication.
*