summaryrefslogtreecommitdiff
path: root/src/include/taler_exchange_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-03 20:07:49 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:35:00 +0200
commitcde71b7fe74c2a5abb32bf07d40a112e9d7b1135 (patch)
tree91f3adeac00c1d8071ce43ed2b90dd5b14e655ac /src/include/taler_exchange_service.h
parent77ab94eb6869ec3494d435b6ee285fd58be3d30d (diff)
downloadexchange-cde71b7fe74c2a5abb32bf07d40a112e9d7b1135.tar.gz
exchange-cde71b7fe74c2a5abb32bf07d40a112e9d7b1135.tar.bz2
exchange-cde71b7fe74c2a5abb32bf07d40a112e9d7b1135.zip
modify TALER_EXCHANGE_deposits_get() API to combine returned arguments into a struct (simplifies merchant later)
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r--src/include/taler_exchange_service.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 307a76de..32012304 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -1683,26 +1683,56 @@ struct TALER_EXCHANGE_DepositGetHandle;
/**
+ * Data returned for a successful GET /deposits/ request. Note that
+ * most fields are only set if the status is #MHD_HTTP_OK. Only
+ * the @e execution_time is available if the status is #MHD_HTTP_ACCEPTED.
+ */
+struct TALER_EXCHANGE_DepositData
+{
+
+ /**
+ * exchange key used to sign, NULL if exchange did not
+ * yet execute the transaction
+ */
+ const struct TALER_ExchangePublicKeyP *exchange_pub;
+
+ /**
+ * signature from the exchange over the deposit data, NULL if exchange did not
+ * yet execute the transaction
+ */
+ const struct TALER_ExchangeSignatureP *exchange_sig;
+
+ /**
+ * wire transfer identifier used by the exchange, NULL if exchange did not
+ * yet execute the transaction
+ */
+ const struct TALER_WireTransferIdentifierRawP *wtid;
+
+ /**
+ * actual or planned execution time for the wire transfer
+ */
+ struct GNUNET_TIME_Absolute execution_time;
+
+ /**
+ * contribution to the total amount by this coin, NULL if exchange did not
+ * yet execute the transaction
+ */
+ const struct TALER_Amount *coin_contribution;
+};
+
+
+/**
* Function called with detailed wire transfer data.
*
* @param cls closure
* @param hr HTTP response data
- * @param exchange_pub exchange key used to sign @a json, or NULL
- * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not
- * yet execute the transaction
- * @param execution_time actual or planned execution time for the wire transfer
- * @param coin_contribution contribution to the total amount by this coin (can be NULL)
- * // FIXME: also return the exchange signature
- * // FIXME: combine all of the above (except cls,hr) into a 'struct'! => DepositData
+ * @param dd details about the deposit (NULL on errors)
*/
typedef void
(*TALER_EXCHANGE_DepositGetCallback)(
void *cls,
const struct TALER_EXCHANGE_HttpResponse *hr,
- const struct TALER_ExchangePublicKeyP *exchange_pub,
- const struct TALER_WireTransferIdentifierRawP *wtid,
- struct GNUNET_TIME_Absolute execution_time,
- const struct TALER_Amount *coin_contribution);
+ const struct TALER_EXCHANGE_DepositData *dd);
/**