aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-05-13 13:27:40 +0200
committerChristian Grothoff <christian@grothoff.org>2024-05-13 13:27:40 +0200
commit0e0751a19096f2ab08e519c9d8735f14c658bbfb (patch)
tree08a85eaa2e7129e39e2ca58e98ee7d6abf4a76c5 /src/include/taler_merchantdb_plugin.h
parenta97ee62dab172a39eab1bebdcd0d8512f5ce4dac (diff)
implement protocol spec v15
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 44fdc0ab..12b13e33 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -335,6 +335,22 @@ struct TALER_MERCHANTDB_ProductDetails
/**
+ * Typically called by `lookup_all_products`.
+ *
+ * @param cls a `json_t *` JSON array to build
+ * @param product_serial row ID of the product
+ * @param product_id ID of the product
+ * @param pd full product details
+ */
+typedef void
+(*TALER_MERCHANTDB_ProductCallback)(
+ void *cls,
+ uint64_t product_serial,
+ const char *product_id,
+ const struct TALER_MERCHANTDB_ProductDetails *pd);
+
+
+/**
* Typically called by `lookup_templates`.
*
* @param cls closure
@@ -1619,6 +1635,22 @@ struct TALER_MERCHANTDB_Plugin
TALER_MERCHANTDB_ProductsCallback cb,
void *cb_cls);
+
+ /**
+ * Lookup full details of all of the products the given instance has configured (expensive).
+ *
+ * @param cls closure
+ * @param instance_id instance to lookup products for
+ * @param cb function to call on all products found
+ * @param cb_cls closure for @a cb
+ * @return database result code
+ */
+ enum GNUNET_DB_QueryStatus
+ (*lookup_all_products)(void *cls,
+ const char *instance_id,
+ TALER_MERCHANTDB_ProductCallback cb,
+ void *cb_cls);
+
/**
* Lookup details about a particular product.
*