summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-06-19 00:00:21 +0200
committerChristian Grothoff <christian@grothoff.org>2017-06-19 00:17:16 +0200
commitdea0f7c411d6ae5c5410d30f6072478e905cabb4 (patch)
tree63fd5490d62d991f47148c5147c51d249d9d61b8 /src/exchange/taler-exchange-httpd_responses.h
parent4cb035cd298139f606562ed88f60ba89dff0febc (diff)
downloadexchange-dea0f7c411d6ae5c5410d30f6072478e905cabb4.tar.gz
exchange-dea0f7c411d6ae5c5410d30f6072478e905cabb4.tar.bz2
exchange-dea0f7c411d6ae5c5410d30f6072478e905cabb4.zip
fixing #5010 for /reserve/withdraw
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.h')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.h51
1 files changed, 13 insertions, 38 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h
index 047bb4f37..aef5bf94d 100644
--- a/src/exchange/taler-exchange-httpd_responses.h
+++ b/src/exchange/taler-exchange-httpd_responses.h
@@ -244,6 +244,19 @@ TEH_RESPONSE_reply_invalid_json (struct MHD_Connection *connectionx);
/**
+ * Compile the history of a reserve into a JSON object
+ * and calculate the total balance.
+ *
+ * @param rh reserve history to JSON-ify
+ * @param[out] balance set to current reserve balance
+ * @return json representation of the @a rh, NULL on error
+ */
+json_t *
+TEH_RESPONSE_compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHistory *rh,
+ struct TALER_Amount *balance);
+
+
+/**
* Send proof that a request is invalid to client because of
* insufficient funds. This function will create a message with all
* of the operations affecting the coin that demonstrate that the coin
@@ -412,44 +425,6 @@ TEH_RESPONSE_reply_track_transfer_details (struct MHD_Connection *connection,
/**
- * Send reserve status information to client.
- *
- * @param connection connection to the client
- * @param rh reserve history to return
- * @return MHD result code
- */
-int
-TEH_RESPONSE_reply_reserve_status_success (struct MHD_Connection *connection,
- const struct TALER_EXCHANGEDB_ReserveHistory *rh);
-
-
-/**
- * Send reserve status information to client with the
- * message that we have insufficient funds for the
- * requested /reserve/withdraw operation.
- *
- * @param connection connection to the client
- * @param rh reserve history to return
- * @return MHD result code
- */
-int
-TEH_RESPONSE_reply_reserve_withdraw_insufficient_funds (struct MHD_Connection *connection,
- const struct TALER_EXCHANGEDB_ReserveHistory *rh);
-
-
-/**
- * Send blinded coin information to client.
- *
- * @param connection connection to the client
- * @param collectable blinded coin to return
- * @return MHD result code
- */
-int
-TEH_RESPONSE_reply_reserve_withdraw_success (struct MHD_Connection *connection,
- const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable);
-
-
-/**
* Send a confirmation response to a "/refresh/melt" request.
*
* @param connection the connection to send the response to