aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-03 23:42:39 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-03 23:42:39 +0200
commitc75ed08b4dbeb70959e10861a7eeb78c545a2fc8 (patch)
tree482ade5ae8da19c81710925c7025fd2b386b00dc /src/include
parent7f8c111f1383805d64ab7f754cb6456d3dfb7250 (diff)
address more FIXMEs
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_merchant_service.h105
1 files changed, 87 insertions, 18 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index cb9edb29..e8d76263 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -3767,21 +3767,53 @@ struct TALER_MERCHANT_ReserveSummary
};
-// FIXME: change signature!
+/**
+ * Response to a GET /reserves request.
+ */
+struct TALER_MERCHANT_ReservesGetResponse
+{
+ /**
+ * 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 reserves array
+ */
+ unsigned int reserves_length;
+
+ /**
+ * array with details about the reserves
+ */
+ const struct TALER_MERCHANT_ReserveSummary *reserves;
+
+ } ok;
+
+ } details;
+};
+
+
/**
* Callback to process a GET /reserves request
*
* @param cls closure
- * @param hr HTTP response details
- * @param reserves_length length of the @a reserves array
- * @param reserves array with details about the reserves, NULL on error
+ * @param rgr response details
*/
typedef void
(*TALER_MERCHANT_ReservesGetCallback) (
void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr,
- unsigned int reserves_length,
- const struct TALER_MERCHANT_ReserveSummary reserves[]);
+ const struct TALER_MERCHANT_ReservesGetResponse *rgr);
/**
@@ -3963,24 +3995,61 @@ TALER_MERCHANT_reserve_get_cancel (
struct TALER_MERCHANT_TipAuthorizeHandle;
-// FIXME: change signature!
/**
- * Callback for a /reserves/$RESERVE_PUB/tip-authorize request. Returns the result of
- * the operation.
+ * Response to a /tip-authorize request.
+ */
+struct TALER_MERCHANT_TipAuthorizeResponse
+{
+ /**
+ * HTTP response details
+ */
+ struct TALER_MERCHANT_HttpResponse hr;
+
+ /**
+ * Details depending on HTTP status.
+ */
+ union
+ {
+
+ /**
+ * Details if status is #MHD_HTTP_OK.
+ */
+ struct
+ {
+
+ /**
+ * which tip ID should be used to pickup the tip
+ */
+ struct TALER_TipIdentifierP tip_id;
+
+ /**
+ * URI for the tip
+ */
+ const char *tip_uri;
+
+ /**
+ * when does the tip expire
+ */
+ struct GNUNET_TIME_Timestamp tip_expiration;
+
+ } ok;
+
+ } details;
+
+};
+
+
+/**
+ * Callback for a /reserves/$RESERVE_PUB/tip-authorize request. Returns the
+ * result of the operation.
*
* @param cls closure
- * @param hr HTTP response details
- * @param tip_id which tip ID should be used to pickup the tip
- * @param tip_uri URI for the tip
- * @param tip_expiration when does the tip expire
+ * @param tar response
*/
typedef void
(*TALER_MERCHANT_TipAuthorizeCallback) (
void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr,
- struct TALER_TipIdentifierP *tip_id,
- const char *tip_uri,
- struct GNUNET_TIME_Timestamp tip_expiration);
+ const struct TALER_MERCHANT_TipAuthorizeResponse *tar);
/**