From c1853b3942273d05dbdf6d7501a89ce5f7f8beba Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 4 Jun 2023 11:47:48 +0200 Subject: another FIXME done --- src/include/taler_merchant_service.h | 43 ++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-) (limited to 'src/include') 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); /** -- cgit v1.2.3