summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-12-12 17:35:29 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-12-12 17:35:29 +0100
commit835a95d7f5e5d3b685bfe0bf5c26ac717218edd6 (patch)
tree7921012ac42f7c8f90272cd54b4e6b632c97c375 /src/include/taler_merchant_service.h
parentce95e4c95824848e4aa3fce883cbe0f83e1b7667 (diff)
parente74140ba481df945758153c76281006c62a63935 (diff)
downloadmerchant-835a95d7f5e5d3b685bfe0bf5c26ac717218edd6.tar.gz
merchant-835a95d7f5e5d3b685bfe0bf5c26ac717218edd6.tar.bz2
merchant-835a95d7f5e5d3b685bfe0bf5c26ac717218edd6.zip
Merge branch '4795'
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index eaf85caf..0ed6856e 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -28,6 +28,60 @@
#include <jansson.h>
+/* ********************* /map/{in,out} *********************** */
+
+struct TALER_MERCHANT_MapOutOperation;
+
+typedef void
+(*TALER_MERCHANT_MapOperationCallback) (void *cls,
+ unsigned int http_status,
+ const json_t *body);
+
+/**
+ * Issue a /map/out request to the backend.
+ *
+ * @param ctx execution context
+ * @param backend_uri base URL of the merchant backend
+ * @param h_contract hashcode of `contract`
+ * @param map_in_cb callback which will work the response gotten from the backend
+ * @param map_in_cb_cls closure to pass to @a history_cb
+ * @return handle for this operation, NULL upon errors
+ */
+struct TALER_MERCHANT_MapOperation *
+TALER_MERCHANT_map_out (struct GNUNET_CURL_Context *ctx,
+ const char *backend_uri,
+ const struct GNUNET_HashCode *h_contract,
+ TALER_MERCHANT_MapOperationCallback map_cb,
+ void *map_cb_cls);
+
+/**
+ * Issue a /map/in request to the backend.
+ *
+ * @param ctx execution context
+ * @param backend_uri base URL of the merchant backend
+ * @param contract contract to store
+ * @param h_contract hashcode of `contract`
+ * @param map_in_cb callback which will work the response gotten from the backend
+ * @param map_in_cb_cls closure to pass to @a history_cb
+ * @return handle for this operation, NULL upon errors
+ */
+struct TALER_MERCHANT_MapOperation *
+TALER_MERCHANT_map_in (struct GNUNET_CURL_Context *ctx,
+ const char *backend_uri,
+ const json_t *contract,
+ const struct GNUNET_HashCode *h_contract,
+ TALER_MERCHANT_MapOperationCallback map_cb,
+ void *map_cb_cls);
+
+/**
+ * Cancel a /map/in request.
+ *
+ * @param mio handle to the request to be canceled
+ */
+void
+TALER_MERCHANT_map_cancel (struct TALER_MERCHANT_MapOperation *mo);
+
+
/* ********************* /contract *********************** */