summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-httpd.c29
-rw-r--r--src/exchange/taler-exchange-httpd_link.c4
-rw-r--r--src/exchange/taler-exchange-httpd_link.h4
-rw-r--r--src/exchange/taler-exchange-httpd_refreshes_reveal.c2
-rw-r--r--src/exchange/taler-exchange-httpd_refreshes_reveal.h6
5 files changed, 26 insertions, 19 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c
index d353a7965..153bb19f8 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -148,6 +148,20 @@ static unsigned long long req_max;
/**
+ * Signature of functions that handle operations on coins.
+ *
+ * @param connection the MHD connection to handle
+ * @param coin_pub the public key of the coin
+ * @param root uploaded JSON data
+ * @return MHD result code
+ */
+typedef int
+(*CoinOpHandler)(struct MHD_Connection *connection,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const json_t *root);
+
+
+/**
* Handle a "/coins/$COIN_PUB/$OP" POST request. Parses the "coin_pub"
* EdDSA key of the coin and demultiplexes based on $OP.
*
@@ -174,16 +188,9 @@ handle_post_coins (const struct TEH_RequestHandler *rh,
/**
* Function to call to perform the operation.
- *
- * @param connection the MHD connection to handle
- * @param coin_pub the public key of the coin
- * @param root uploaded JSON data
- * @return MHD result code
- *///
- int
- (*handler)(struct MHD_Connection *connection,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- const json_t *root);
+ */
+ CoinOpHandler handler;
+
} h[] = {
{
.op = "deposit",
@@ -301,7 +308,7 @@ is_valid_correlation_id (const char *correlation_id)
* @param url rest of the URL to parse
* @param inner_cls closure for the handler, if needed
* @param upload_data upload data to parse (if available)
- * @param upload_data_size[in,out] number of bytes in @a upload_data
+ * @param[in,out] upload_data_size number of bytes in @a upload_data
* @return MHD result code
*/
static int
diff --git a/src/exchange/taler-exchange-httpd_link.c b/src/exchange/taler-exchange-httpd_link.c
index 83d7f6a05..eaffa5584 100644
--- a/src/exchange/taler-exchange-httpd_link.c
+++ b/src/exchange/taler-exchange-httpd_link.c
@@ -14,8 +14,8 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file taler-exchange-httpd_refresh_link.c
- * @brief Handle /refresh/link requests
+ * @file taler-exchange-httpd_link.c
+ * @brief Handle /coins/$COIN_PUB/link requests
* @author Florian Dold
* @author Benedikt Mueller
* @author Christian Grothoff
diff --git a/src/exchange/taler-exchange-httpd_link.h b/src/exchange/taler-exchange-httpd_link.h
index 9469c4713..7a39e21df 100644
--- a/src/exchange/taler-exchange-httpd_link.h
+++ b/src/exchange/taler-exchange-httpd_link.h
@@ -14,8 +14,8 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file taler-exchange-httpd_refresh_link.h
- * @brief Handle /refresh/link requests
+ * @file taler-exchange-httpd_link.h
+ * @brief Handle /coins/$COIN_PUB/link requests
* @author Florian Dold
* @author Benedikt Mueller
* @author Christian Grothoff
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
index e7e5b97da..ff5718fcc 100644
--- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
@@ -893,7 +893,7 @@ handle_refresh_reveal_json (struct MHD_Connection *connection,
* refreshed coins.
*
* @param rh context of the handler
- * @param coin_pub public key of the coin
+ * @param connection MHD request handle
* @param root uploaded JSON data
* @param args array of additional options (length: 2, session hash and the string "reveal")
* @return MHD result code
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.h b/src/exchange/taler-exchange-httpd_refreshes_reveal.h
index afc9adce5..04b46b1f8 100644
--- a/src/exchange/taler-exchange-httpd_refreshes_reveal.h
+++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.h
@@ -14,8 +14,8 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file taler-exchange-httpd_refresh_reveal.h
- * @brief Handle /refresh/reveal requests
+ * @file taler-exchange-httpd_refreshes_reveal.h
+ * @brief Handle /refreshes/$RCH/reveal requests
* @author Florian Dold
* @author Benedikt Mueller
* @author Christian Grothoff
@@ -38,7 +38,7 @@
* refreshed coins.
*
* @param rh context of the handler
- * @param coin_pub public key of the coin
+ * @param connection MHD request handle
* @param root uploaded JSON data
* @param args array of additional options (length: 2, session hash and the string "reveal")
* @return MHD result code