summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-20 17:20:40 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-20 17:20:40 +0200
commit3d6cce7434847d925b51d1600f0eef79041c6591 (patch)
treeb7deb3034d6e1c8d74839499bbd1ff5c30d8b23d /src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h
parent74913ffcfd4e4b1de17c4eeda14601bf1f3c1561 (diff)
downloadmerchant-3d6cce7434847d925b51d1600f0eef79041c6591.tar.gz
merchant-3d6cce7434847d925b51d1600f0eef79041c6591.tar.bz2
merchant-3d6cce7434847d925b51d1600f0eef79041c6591.zip
implement reserve deletion
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h45
1 files changed, 28 insertions, 17 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h
index 1f7f44ea..2df55295 100644
--- a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h
+++ b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- (C) 2017 Taler Systems SA
+ (C) 2017, 2020 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -14,33 +14,44 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
- * @file backend/taler-merchant-httpd_tip-authorize.h
- * @brief headers for /tip-authorize handler
+ * @file backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.h
+ * @brief headers for /reserves/ID/tip-authorize
* @author Christian Grothoff
*/
-#ifndef TALER_MERCHANT_HTTPD_TIP_AUTHORIZE_H
-#define TALER_MERCHANT_HTTPD_TIP_AUTHORIZE_H
+#ifndef TALER_MERCHANT_HTTPD_PRIVATE_POST_RESERVES_ID_AUTHORIZE_TIP_H
+#define TALER_MERCHANT_HTTPD_PRIVATE_POST_RESERVES_ID_AUTHORIZE_TIP_H
#include <microhttpd.h>
#include "taler-merchant-httpd.h"
+
/**
- * Manages a /tip-authorize call, creating a TIP ID and storing the
- * authorization in our DB.
+ * Handle a "/reserves/$ID/tip-authorize" request.
*
* @param rh context of the handler
* @param connection the MHD connection to handle
- * @param[in,out] connection_cls the connection's closure (can be updated)
- * @param upload_data upload data
- * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
- * @param mi merchant backend instance, never NULL
+ * @param[in,out] hc context with further information about the request
* @return MHD result code
*/
MHD_RESULT
-MH_handler_tip_authorize (struct TMH_RequestHandler *rh,
- struct MHD_Connection *connection,
- void **connection_cls,
- const char *upload_data,
- size_t *upload_data_size,
- struct MerchantInstance *mi);
+TMH_private_post_reserves_ID_authorize_tip (const struct TMH_RequestHandler *rh,
+ struct MHD_Connection *connection,
+ struct TMH_HandlerContext *hc);
+
+
+/**
+ * Handle a "/reserves/tip-authorize" request.
+ * Here the client does not specify the reserve public key, so we
+ * are free to pick "any" available reserve.
+ *
+ * @param rh context of the handler
+ * @param connection the MHD connection to handle
+ * @param[in,out] hc context with further information about the request
+ * @return MHD result code
+ */
+MHD_RESULT
+TMH_private_post_reserves_authorize_tip (const struct TMH_RequestHandler *rh,
+ struct MHD_Connection *connection,
+ struct TMH_HandlerContext *hc);
+
#endif