summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-07-03 18:38:57 +0200
committerChristian Grothoff <christian@grothoff.org>2023-07-03 18:38:57 +0200
commitae0a2ee80040bb71fd4cc5d6b41d9899b423bc54 (patch)
tree7509d3dfa6ec4c4f0a78d7c5216ada1cf0f46a3d /src/include/taler_merchant_service.h
parent3f2290cfa13732991dabb175f322e32ea9f11086 (diff)
downloadmerchant-ae0a2ee80040bb71fd4cc5d6b41d9899b423bc54.tar.gz
merchant-ae0a2ee80040bb71fd4cc5d6b41d9899b423bc54.tar.bz2
merchant-ae0a2ee80040bb71fd4cc5d6b41d9899b423bc54.zip
-more API clean up
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h320
1 files changed, 169 insertions, 151 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 874a8a8c..12b8ce95 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -369,17 +369,18 @@ struct TALER_MERCHANT_ConfigGetHandle;
* @return the config check handle; NULL upon error
*/
struct TALER_MERCHANT_ConfigGetHandle *
-TALER_MERCHANT_config_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- TALER_MERCHANT_ConfigCallback config_cb,
- void *config_cb_cls);
+TALER_MERCHANT_config_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ TALER_MERCHANT_ConfigCallback config_cb,
+ void *config_cb_cls);
/**
* Cancel /config request. Must not be called by clients after
* the callback was invoked.
*
- * @param vgh request to cancel.
+ * @param[in] vgh request to cancel.
*/
void
TALER_MERCHANT_config_get_cancel (struct TALER_MERCHANT_ConfigGetHandle *vgh);
@@ -486,10 +487,11 @@ typedef void
* @return the instances handle; NULL upon error
*/
struct TALER_MERCHANT_InstancesGetHandle *
-TALER_MERCHANT_instances_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- TALER_MERCHANT_InstancesGetCallback instances_cb,
- void *instances_cb_cls);
+TALER_MERCHANT_instances_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ TALER_MERCHANT_InstancesGetCallback instances_cb,
+ void *instances_cb_cls);
/**
@@ -768,7 +770,7 @@ TALER_MERCHANT_instance_patch (
const char *backend_url,
const char *instance_id,
unsigned int accounts_length,
- const struct TALER_MERCHANT_AccountConfig accounts[],
+ const struct TALER_MERCHANT_AccountConfig accounts[static accounts_length],
const char *name,
enum TALER_KYCLOGIC_KycUserType ut,
const json_t *address,
@@ -1005,11 +1007,12 @@ typedef void
* @return the instances handle; NULL upon error
*/
struct TALER_MERCHANT_InstanceGetHandle *
-TALER_MERCHANT_instance_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const char *instance_id,
- TALER_MERCHANT_InstanceGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_instance_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const char *instance_id,
+ TALER_MERCHANT_InstanceGetCallback cb,
+ void *cb_cls);
/**
@@ -1697,12 +1700,13 @@ typedef void
* @return a handle for this request, NULL on error
*/
struct TALER_MERCHANT_PostOrdersHandle *
-TALER_MERCHANT_orders_post (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const json_t *order,
- struct GNUNET_TIME_Relative refund_delay,
- TALER_MERCHANT_PostOrdersCallback cb,
- void *cb_cls);
+TALER_MERCHANT_orders_post (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const json_t *order,
+ struct GNUNET_TIME_Relative refund_delay,
+ TALER_MERCHANT_PostOrdersCallback cb,
+ void *cb_cls);
/**
* Information needed per product for constructing orders from
@@ -1752,7 +1756,7 @@ TALER_MERCHANT_orders_post2 (
unsigned int inventory_products_length,
const struct TALER_MERCHANT_InventoryProduct inventory_products[],
unsigned int uuids_length,
- const char *uuids[],
+ const char *uuids[static uuids_length],
bool create_token,
TALER_MERCHANT_PostOrdersCallback cb,
void *cb_cls);
@@ -1762,7 +1766,7 @@ TALER_MERCHANT_orders_post2 (
* Cancel a POST /orders request. This function cannot be used
* on a request handle if a response is already served for it.
*
- * @param po the proposal operation request handle
+ * @param[in] po the proposal operation request handle
*/
void
TALER_MERCHANT_orders_post_cancel (
@@ -1920,7 +1924,7 @@ TALER_MERCHANT_orders_get2 (
/**
* Cancel GET /orders operation.
*
- * @param pgh operation to cancel
+ * @param[in] pgh operation to cancel
*/
void
TALER_MERCHANT_orders_get_cancel (
@@ -2049,7 +2053,7 @@ TALER_MERCHANT_wallet_order_get (
/**
* Cancel a GET /orders/$ID request.
*
- * @param owgh handle to the request to be canceled
+ * @param[in] owgh handle to the request to be canceled
*/
void
TALER_MERCHANT_wallet_order_get_cancel (
@@ -2395,7 +2399,7 @@ TALER_MERCHANT_merchant_order_get (struct GNUNET_CURL_Context *ctx,
/**
* Cancel a GET /private/orders/$ID request.
*
- * @param omgh handle to the request to be canceled
+ * @param[in] omgh handle to the request to be canceled
*/
void
TALER_MERCHANT_merchant_order_get_cancel (
@@ -2445,7 +2449,7 @@ TALER_MERCHANT_order_delete (
/**
* Cancel DELETE /orders/$ID operation.
*
- * @param odh operation to cancel
+ * @param[in] odh operation to cancel
*/
void
TALER_MERCHANT_order_delete_cancel (
@@ -2525,19 +2529,20 @@ typedef void
* @return handle for this handle, NULL upon errors
*/
struct TALER_MERCHANT_OrderClaimHandle *
-TALER_MERCHANT_order_claim (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const char *order_id,
- const struct GNUNET_CRYPTO_EddsaPublicKey *nonce,
- const struct TALER_ClaimTokenP *claim_token,
- TALER_MERCHANT_OrderClaimCallback cb,
- void *cb_cls);
+TALER_MERCHANT_order_claim (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const char *order_id,
+ const struct GNUNET_CRYPTO_EddsaPublicKey *nonce,
+ const struct TALER_ClaimTokenP *claim_token,
+ TALER_MERCHANT_OrderClaimCallback cb,
+ void *cb_cls);
/**
* Cancel a POST /order/$ID/claim request.
*
- * @param och handle to the request to be canceled
+ * @param[in] och handle to the request to be canceled
*/
void
TALER_MERCHANT_order_claim_cancel (struct TALER_MERCHANT_OrderClaimHandle *och);
@@ -2683,7 +2688,7 @@ TALER_MERCHANT_order_pay_frontend (
const char *order_id,
const char *session_id,
unsigned int num_coins,
- const struct TALER_MERCHANT_PaidCoin coins[],
+ const struct TALER_MERCHANT_PaidCoin coins[static num_coins],
TALER_MERCHANT_OrderPayCallback pay_cb,
void *pay_cb_cls);
@@ -2762,23 +2767,24 @@ struct TALER_MERCHANT_PayCoin
* @return a handle for this request
*/
struct TALER_MERCHANT_OrderPayHandle *
-TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
- const char *merchant_url,
- const char *session_id,
- const struct TALER_PrivateContractHashP *h_contract,
- const struct TALER_Amount *amount,
- const struct TALER_Amount *max_fee,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- const struct TALER_MerchantSignatureP *merchant_sig,
- struct GNUNET_TIME_Timestamp timestamp,
- struct GNUNET_TIME_Timestamp refund_deadline,
- struct GNUNET_TIME_Timestamp pay_deadline,
- const struct TALER_MerchantWireHashP *h_wire,
- const char *order_id,
- unsigned int num_coins,
- const struct TALER_MERCHANT_PayCoin coins[],
- TALER_MERCHANT_OrderPayCallback pay_cb,
- void *pay_cb_cls);
+TALER_MERCHANT_order_pay (
+ struct GNUNET_CURL_Context *ctx,
+ const char *merchant_url,
+ const char *session_id,
+ const struct TALER_PrivateContractHashP *h_contract,
+ const struct TALER_Amount *amount,
+ const struct TALER_Amount *max_fee,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct TALER_MerchantSignatureP *merchant_sig,
+ struct GNUNET_TIME_Timestamp timestamp,
+ struct GNUNET_TIME_Timestamp refund_deadline,
+ struct GNUNET_TIME_Timestamp pay_deadline,
+ const struct TALER_MerchantWireHashP *h_wire,
+ const char *order_id,
+ unsigned int num_coins,
+ const struct TALER_MERCHANT_PayCoin coins[static num_coins],
+ TALER_MERCHANT_OrderPayCallback pay_cb,
+ void *pay_cb_cls);
/**
@@ -3000,15 +3006,16 @@ struct TALER_MERCHANT_AbortCoin
* @return a handle for this request
*/
struct TALER_MERCHANT_OrderAbortHandle *
-TALER_MERCHANT_order_abort (struct GNUNET_CURL_Context *ctx,
- const char *merchant_url,
- const char *order_id,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- const struct TALER_PrivateContractHashP *h_contract,
- unsigned int num_coins,
- const struct TALER_MERCHANT_AbortCoin coins[],
- TALER_MERCHANT_AbortCallback cb,
- void *cb_cls);
+TALER_MERCHANT_order_abort (
+ struct GNUNET_CURL_Context *ctx,
+ const char *merchant_url,
+ const char *order_id,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct TALER_PrivateContractHashP *h_contract,
+ unsigned int num_coins,
+ const struct TALER_MERCHANT_AbortCoin coins[static num_coins],
+ TALER_MERCHANT_AbortCallback cb,
+ void *cb_cls);
/**
@@ -3055,13 +3062,14 @@ typedef void
* @return a handle for this request.
*/
struct TALER_MERCHANT_OrderForgetHandle *
-TALER_MERCHANT_order_forget (struct GNUNET_CURL_Context *ctx,
- const char *merchant_url,
- const char *order_id,
- unsigned int fields_length,
- const char *fields[],
- TALER_MERCHANT_ForgetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_order_forget (
+ struct GNUNET_CURL_Context *ctx,
+ const char *merchant_url,
+ const char *order_id,
+ unsigned int fields_length,
+ const char *fields[static fields_length],
+ TALER_MERCHANT_ForgetCallback cb,
+ void *cb_cls);
/**
@@ -3069,11 +3077,11 @@ TALER_MERCHANT_order_forget (struct GNUNET_CURL_Context *ctx,
* like this, you have no assurance that the request has not yet been
* forwarded to the merchant.
*
- * @param ofh the forget request handle
+ * @param[in] ofh the forget request handle
*/
void
-TALER_MERCHANT_order_forget_cancel (struct
- TALER_MERCHANT_OrderForgetHandle *ofh);
+TALER_MERCHANT_order_forget_cancel (
+ struct TALER_MERCHANT_OrderForgetHandle *ofh);
/**
@@ -3142,13 +3150,14 @@ typedef void
* @param cb_cls closure for cb
*/
struct TALER_MERCHANT_OrderRefundHandle *
-TALER_MERCHANT_post_order_refund (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const char *order_id,
- const struct TALER_Amount *refund,
- const char *reason,
- TALER_MERCHANT_RefundCallback cb,
- void *cb_cls);
+TALER_MERCHANT_post_order_refund (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const char *order_id,
+ const struct TALER_Amount *refund,
+ const char *reason,
+ TALER_MERCHANT_RefundCallback cb,
+ void *cb_cls);
/**
* Cancel a POST /refund request.
@@ -4093,13 +4102,14 @@ TALER_MERCHANT_tip_authorize2 (
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_TipAuthorizeHandle *
-TALER_MERCHANT_tip_authorize (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const char *next_url,
- const struct TALER_Amount *amount,
- const char *justification,
- TALER_MERCHANT_TipAuthorizeCallback authorize_cb,
- void *authorize_cb_cls);
+TALER_MERCHANT_tip_authorize (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const char *next_url,
+ const struct TALER_Amount *amount,
+ const char *justification,
+ TALER_MERCHANT_TipAuthorizeCallback authorize_cb,
+ void *authorize_cb_cls);
/**
@@ -4162,17 +4172,18 @@ TALER_MERCHANT_reserve_delete (
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_ReserveDeleteHandle *
-TALER_MERCHANT_reserve_purge (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- TALER_MERCHANT_ReserveDeleteCallback cb,
- void *cb_cls);
+TALER_MERCHANT_reserve_purge (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ TALER_MERCHANT_ReserveDeleteCallback cb,
+ void *cb_cls);
/**
* Cancel a DELETE (or purge) /reserve/$RESERVE_ID request.
*
- * @param rdh handle to the request to be canceled
+ * @param[in] rdh handle to the request to be canceled
*/
void
TALER_MERCHANT_reserve_delete_cancel (
@@ -4258,17 +4269,18 @@ typedef void
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_TipWalletGetHandle *
-TALER_MERCHANT_wallet_tip_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const struct TALER_TipIdentifierP *tip_id,
- TALER_MERCHANT_TipWalletGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_wallet_tip_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const struct TALER_TipIdentifierP *tip_id,
+ TALER_MERCHANT_TipWalletGetCallback cb,
+ void *cb_cls);
/**
* Cancel a GET /tips/$TIP_ID request.
*
- * @param tgh handle to the request to be canceled
+ * @param[in] tgh handle to the request to be canceled
*/
void
TALER_MERCHANT_wallet_tip_get_cancel (
@@ -4393,20 +4405,21 @@ typedef void
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_TipMerchantGetHandle *
-TALER_MERCHANT_merchant_tip_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const struct TALER_TipIdentifierP *tip_id,
- const struct TALER_Amount *min_pick_up,
- struct GNUNET_TIME_Relative lp_timeout,
- bool pickups,
- TALER_MERCHANT_TipMerchantGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_merchant_tip_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const struct TALER_TipIdentifierP *tip_id,
+ const struct TALER_Amount *min_pick_up,
+ struct GNUNET_TIME_Relative lp_timeout,
+ bool pickups,
+ TALER_MERCHANT_TipMerchantGetCallback cb,
+ void *cb_cls);
/**
* Cancel a GET /private/tips/$TIP_ID request.
*
- * @param tgh handle to the request to be canceled
+ * @param[in] tgh handle to the request to be canceled
*/
void
TALER_MERCHANT_merchant_tip_get_cancel (
@@ -4501,10 +4514,11 @@ typedef void
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_TipsGetHandle *
-TALER_MERCHANT_tips_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- TALER_MERCHANT_TipsGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_tips_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ TALER_MERCHANT_TipsGetCallback cb,
+ void *cb_cls);
/**
@@ -4520,13 +4534,14 @@ TALER_MERCHANT_tips_get (struct GNUNET_CURL_Context *ctx,
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_TipsGetHandle *
-TALER_MERCHANT_tips_get2 (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- enum TALER_EXCHANGE_YesNoAll expired,
- int64_t limit,
- uint64_t offset,
- TALER_MERCHANT_TipsGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_tips_get2 (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ enum TALER_EXCHANGE_YesNoAll expired,
+ int64_t limit,
+ uint64_t offset,
+ TALER_MERCHANT_TipsGetCallback cb,
+ void *cb_cls);
/**
@@ -4633,7 +4648,7 @@ TALER_MERCHANT_tip_pickup (
const char *backend_url,
const struct TALER_TipIdentifierP *tip_id,
unsigned int num_planchets,
- const struct TALER_MERCHANT_PlanchetData planchets[],
+ const struct TALER_MERCHANT_PlanchetData planchets[static num_planchets],
TALER_MERCHANT_TipPickupCallback pickup_cb,
void *pickup_cb_cls);
@@ -4718,19 +4733,20 @@ typedef void
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_TipPickup2Handle *
-TALER_MERCHANT_tip_pickup2 (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const struct TALER_TipIdentifierP *tip_id,
- unsigned int num_planchets,
- const struct TALER_PlanchetDetail planchets[],
- TALER_MERCHANT_TipPickup2Callback pickup_cb,
- void *pickup_cb_cls);
+TALER_MERCHANT_tip_pickup2 (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const struct TALER_TipIdentifierP *tip_id,
+ unsigned int num_planchets,
+ const struct TALER_PlanchetDetail planchets[static num_planchets],
+ TALER_MERCHANT_TipPickup2Callback pickup_cb,
+ void *pickup_cb_cls);
/**
* Cancel a pending /tip-pickup request.
*
- * @param tp handle from the operation to cancel
+ * @param[in] tp handle from the operation to cancel
*/
void
TALER_MERCHANT_tip_pickup2_cancel (
@@ -4876,13 +4892,14 @@ typedef void
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_KycGetHandle *
-TALER_MERCHANT_kyc_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const struct TALER_MerchantWireHashP *h_wire,
- const char *exchange_url,
- struct GNUNET_TIME_Relative timeout,
- TALER_MERCHANT_KycGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_kyc_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const struct TALER_MerchantWireHashP *h_wire,
+ const char *exchange_url,
+ struct GNUNET_TIME_Relative timeout,
+ TALER_MERCHANT_KycGetCallback cb,
+ void *cb_cls);
/**
@@ -4900,14 +4917,15 @@ TALER_MERCHANT_kyc_get (struct GNUNET_CURL_Context *ctx,
* @return handle for this operation, NULL upon errors
*/
struct TALER_MERCHANT_KycGetHandle *
-TALER_MERCHANT_management_kyc_get (struct GNUNET_CURL_Context *ctx,
- const char *backend_url,
- const char *instance_id,
- const struct TALER_MerchantWireHashP *h_wire,
- const char *exchange_url,
- struct GNUNET_TIME_Relative timeout,
- TALER_MERCHANT_KycGetCallback cb,
- void *cb_cls);
+TALER_MERCHANT_management_kyc_get (
+ struct GNUNET_CURL_Context *ctx,
+ const char *backend_url,
+ const char *instance_id,
+ const struct TALER_MerchantWireHashP *h_wire,
+ const char *exchange_url,
+ struct GNUNET_TIME_Relative timeout,
+ TALER_MERCHANT_KycGetCallback cb,
+ void *cb_cls);
/**
@@ -5167,7 +5185,7 @@ TALER_MERCHANT_templates_post (
/**
* Cancel POST /templates operation.
*
- * @param tph operation to cancel
+ * @param[in] tph operation to cancel
*/
void
TALER_MERCHANT_templates_post_cancel (
@@ -5224,7 +5242,7 @@ TALER_MERCHANT_template_patch (
/**
* Cancel PATCH /template operation.
*
- * @param tph operation to cancel
+ * @param[in] tph operation to cancel
*/
void
TALER_MERCHANT_template_patch_cancel (
@@ -5271,7 +5289,7 @@ TALER_MERCHANT_template_delete (
/**
* Cancel DELETE /template/$ID operation.
*
- * @param tdh operation to cancel
+ * @param[in] tdh operation to cancel
*/
void
TALER_MERCHANT_template_delete_cancel (
@@ -5304,7 +5322,7 @@ TALER_MERCHANT_using_templates_post (
/**
* Cancel POST /using-templates operation.
*
- * @param utph operation to cancel
+ * @param[in] utph operation to cancel
*/
void
TALER_MERCHANT_using_templates_post_cancel (
@@ -5401,7 +5419,7 @@ TALER_MERCHANT_webhooks_get (
/**
* Cancel GET /webhooks operation.
*
- * @param tgh operation to cancel
+ * @param[in] tgh operation to cancel
*/
void
TALER_MERCHANT_webhooks_get_cancel (
@@ -5462,7 +5480,7 @@ TALER_MERCHANT_webhook_get (
/**
* Cancel GET /webhooks/$ID operation.
*
- * @param tgh operation to cancel
+ * @param[in] tgh operation to cancel
*/
void
TALER_MERCHANT_webhook_get_cancel (
@@ -5519,7 +5537,7 @@ TALER_MERCHANT_webhooks_post (
/**
* Cancel POST /webhooks operation.
*
- * @param wph operation to cancel
+ * @param[in] wph operation to cancel
*/
void
TALER_MERCHANT_webhooks_post_cancel (
@@ -5578,7 +5596,7 @@ TALER_MERCHANT_webhook_patch (
/**
* Cancel PATCH /webhook operation.
*
- * @param wph operation to cancel
+ * @param[in] wph operation to cancel
*/
void
TALER_MERCHANT_webhook_patch_cancel (
@@ -5625,7 +5643,7 @@ TALER_MERCHANT_webhook_delete (
/**
* Cancel DELETE /webhook/$ID operation.
*
- * @param wdh operation to cancel
+ * @param[in] wdh operation to cancel
*/
void
TALER_MERCHANT_webhook_delete_cancel (