summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h43
1 files changed, 36 insertions, 7 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 40499929..a91e991e 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -4941,21 +4941,50 @@ struct TALER_MERCHANT_TemplateEntry
};
-// FIXME: change signature!
+/**
+ * Response to a GET /templates operation.
+ */
+struct TALER_MERCHANT_TemplatesGetResponse
+{
+ /**
+ * HTTP response details
+ */
+ struct TALER_MERCHANT_HttpResponse hr;
+
+ /**
+ * Details depending on status.
+ */
+ union
+ {
+ /**
+ * Details if status is #MHD_HTTP_OK.
+ */
+ struct
+ {
+ /**
+ * length of the @e templates array
+ */
+ unsigned int templates_length;
+
+ /**
+ * array of templates the requested instance offers
+ */
+ const struct TALER_MERCHANT_TemplateEntry *templates;
+ } ok;
+ } details;
+};
+
+
/**
* Function called with the result of the GET /templates operation.
*
* @param cls closure
- * @param hr HTTP response details
- * @param templates_length length of the @a templates array
- * @param templates array of templates the requested instance offers
+ * @param tgr response details
*/
typedef void
(*TALER_MERCHANT_TemplatesGetCallback)(
void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr,
- unsigned int templates_length,
- const struct TALER_MERCHANT_TemplateEntry templates[]);
+ const struct TALER_MERCHANT_TemplatesGetResponse *tgr);
/**