commit 55605272856e9acefaa3cebcb81acef4806752fe
parent b791a14c6118f4cdb1cf0257ab499324d3859e6d
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
Date: Thu, 6 Aug 2020 21:28:14 -0400
spec for uri parsing methods
Diffstat:
1 file changed, 44 insertions(+), 0 deletions(-)
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
@@ -136,6 +136,50 @@ TALER_MERCHANT_baseurl_add_instance (const char *base_url,
const char *instance_id);
+/**
+ * Extracts information from a taler://pay URI.
+ *
+ * @param pay_uri the URI to parse.
+ * @param[out] merchant_host the hostname of the merchant.
+ * @param[out] merchant_prefix_path prefix of the base URL
+ * (NULL if not present).
+ * @param[out] order_id the id of the order to pay.
+ * @param[out] session_id the session id to use for payment
+ * (NULL if not present).
+ * @param[out] claim_token the claim token needed to claim the order
+ * (zeroed if not present).
+ * @param[out] ssid the ssid for internet connectivity (NULL if not present).
+ * @return GNUNET_OK on success, GNUNET_SYSERR otherwise.
+ */
+int
+TALER_MERCHANT_parse_pay_uri (const char *pay_uri,
+ const char **merchant_host,
+ const char **merchant_prefix_path,
+ const char **order_id,
+ const char **session_id,
+ struct GNUNET_HashCode *claim_token,
+ const char **ssid);
+
+
+/**
+ * Extracts information from a taler://refund URI.
+ *
+ * @param refund_uri the URI to parse.
+ * @param[out] merchant_host the hostname of the merchant.
+ * @param[out] merchant_prefix_path prefix of the base URL
+ * (NULL if not present).
+ * @param[out] order_id the id of the order to pay.
+ * @param[out] ssid the ssid for internet connectivity (NULL if not present).
+ * @return GNUNET_OK on success, GNUNET_SYSERR otherwise.
+ */
+int
+TALER_MERCHANT_parse_refund_uri (const char *refund_uri,
+ const char **merchant_host,
+ const char **merchant_prefix_path,
+ const char **order_id,
+ const char **ssid);
+
+
/* ********************* /public/config ****************** */