summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-19 12:12:50 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-19 12:12:50 +0100
commit5f57dbbc7b1e1ed21fff24daa537b949727b7966 (patch)
tree76b0cbdb74cea37e85363de794ae2580808fe866 /src/include
parent7fc151fbb8080395579888e1cb384ccd35a36daa (diff)
downloadmerchant-5f57dbbc7b1e1ed21fff24daa537b949727b7966.tar.gz
merchant-5f57dbbc7b1e1ed21fff24daa537b949727b7966.tar.bz2
merchant-5f57dbbc7b1e1ed21fff24daa537b949727b7966.zip
-introduce new types for tip identifiers and tip pickups
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_merchant_service.h21
-rw-r--r--src/include/taler_merchant_testing_lib.h3
-rw-r--r--src/include/taler_merchantdb_plugin.h22
3 files changed, 24 insertions, 22 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 7520b553..f4eded04 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -3140,7 +3140,7 @@ struct TALER_MERCHANT_TipDetails
/**
* Identifier for the tip.
*/
- struct GNUNET_HashCode tip_id;
+ struct TALER_TipIdentifierP tip_id;
/**
* Total value of the tip (including fees).
@@ -3230,7 +3230,7 @@ typedef void
(*TALER_MERCHANT_TipAuthorizeCallback) (
void *cls,
const struct TALER_MERCHANT_HttpResponse *hr,
- struct GNUNET_HashCode *tip_id,
+ struct TALER_TipIdentifierP *tip_id,
const char *tip_uri,
struct GNUNET_TIME_Timestamp tip_expiration);
@@ -3403,7 +3403,7 @@ typedef void
struct TALER_MERCHANT_TipWalletGetHandle *
TALER_MERCHANT_wallet_tip_get (struct GNUNET_CURL_Context *ctx,
const char *backend_url,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
TALER_MERCHANT_TipWalletGetCallback cb,
void *cb_cls);
@@ -3414,8 +3414,8 @@ TALER_MERCHANT_wallet_tip_get (struct GNUNET_CURL_Context *ctx,
* @param tgh handle to the request to be canceled
*/
void
-TALER_MERCHANT_wallet_tip_get_cancel (struct
- TALER_MERCHANT_TipWalletGetHandle *tgh);
+TALER_MERCHANT_wallet_tip_get_cancel (
+ struct TALER_MERCHANT_TipWalletGetHandle *tgh);
/**
@@ -3432,7 +3432,7 @@ struct TALER_MERCHANT_PickupDetail
/**
* Identifier of the pickup.
*/
- struct GNUNET_HashCode pickup_id;
+ struct TALER_PickupIdentifierP pickup_id;
/**
* Number of planchets involved.
@@ -3445,6 +3445,7 @@ struct TALER_MERCHANT_PickupDetail
struct TALER_Amount requested_amount;
};
+
/**
* Callback to process a GET /private/tips/$TIP_ID request
*
@@ -3486,7 +3487,7 @@ typedef void
struct TALER_MERCHANT_TipMerchantGetHandle *
TALER_MERCHANT_merchant_tip_get (struct GNUNET_CURL_Context *ctx,
const char *backend_url,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
bool pickups,
TALER_MERCHANT_TipMerchantGetCallback cb,
void *cb_cls);
@@ -3521,7 +3522,7 @@ struct TALER_MERCHANT_TipEntry
/**
* Identifier for the tip.
*/
- struct GNUNET_HashCode tip_id;
+ struct TALER_TipIdentifierP tip_id;
/**
* Total value of the tip (including fees).
@@ -3650,7 +3651,7 @@ struct TALER_MERCHANT_PlanchetData
struct TALER_MERCHANT_TipPickupHandle *
TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx,
const char *backend_url,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
unsigned int num_planchets,
const struct TALER_MERCHANT_PlanchetData planchets[],
TALER_MERCHANT_TipPickupCallback pickup_cb,
@@ -3706,7 +3707,7 @@ typedef void
struct TALER_MERCHANT_TipPickup2Handle *
TALER_MERCHANT_tip_pickup2 (struct GNUNET_CURL_Context *ctx,
const char *backend_url,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
unsigned int num_planchets,
const struct TALER_PlanchetDetail planchets[],
TALER_MERCHANT_TipPickup2Callback pickup_cb,
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
index 18a1e0cc..b846b622 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -1496,7 +1496,8 @@ TALER_TESTING_cmd_merchant_kyc_get (const char *label,
// FIXME: rename: refund_entry->refund_detail
#define TALER_MERCHANT_TESTING_SIMPLE_TRAITS(op) \
op (claim_nonce, const struct GNUNET_CRYPTO_EddsaPublicKey) \
- op (tip_id, const struct GNUNET_HashCode) \
+ op (tip_id, const struct TALER_TipIdentifierP) \
+ op (pickup_id, const struct TALER_PickupIdentifierP) \
op (instance_name, const char *) \
op (instance_id, const char *) \
op (address, const json_t) \
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 3925011a..b4dc17b2 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -552,7 +552,7 @@ struct TALER_MERCHANTDB_TipDetails
/**
* ID of the tip.
*/
- struct GNUNET_HashCode tip_id;
+ struct TALER_TipIdentifierP tip_id;
/**
* Total amount of the tip.
@@ -633,7 +633,7 @@ typedef void
typedef void
(*TALER_MERCHANTDB_TipsCallback)(void *cls,
uint64_t row_id,
- struct GNUNET_HashCode tip_id,
+ struct TALER_TipIdentifierP tip_id,
struct TALER_Amount amount);
@@ -675,7 +675,7 @@ struct TALER_MERCHANTDB_PickupDetails
/**
* Identifier for the pickup operation.
*/
- struct GNUNET_HashCode pickup_id;
+ struct TALER_PickupIdentifierP pickup_id;
/**
* Total amount requested for this @e pickup_id.
@@ -2168,7 +2168,7 @@ struct TALER_MERCHANTDB_Plugin
const struct TALER_Amount *amount,
const char *justification,
const char *next_url,
- struct GNUNET_HashCode *tip_id,
+ struct TALER_TipIdentifierP *tip_id,
struct GNUNET_TIME_Timestamp *expiration);
@@ -2189,8 +2189,8 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*lookup_pickup)(void *cls,
const char *instance_id,
- const struct GNUNET_HashCode *tip_id,
- const struct GNUNET_HashCode *pickup_id,
+ const struct TALER_TipIdentifierP *tip_id,
+ const struct TALER_PickupIdentifierP *pickup_id,
char **exchange_url,
struct TALER_ReservePrivateKeyP *reserve_priv,
unsigned int sigs_length,
@@ -2213,7 +2213,7 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*lookup_tip)(void *cls,
const char *instance_id,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
struct TALER_Amount *total_authorized,
struct TALER_Amount *total_picked_up,
struct GNUNET_TIME_Timestamp *expiration,
@@ -2263,7 +2263,7 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*lookup_tip_details)(void *cls,
const char *instance_id,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
bool fpu,
struct TALER_Amount *total_authorized,
struct TALER_Amount *total_picked_up,
@@ -2295,9 +2295,9 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*insert_pickup)(void *cls,
const char *instance_id,
- const struct GNUNET_HashCode *tip_id,
+ const struct TALER_TipIdentifierP *tip_id,
const struct TALER_Amount *total_picked_up,
- const struct GNUNET_HashCode *pickup_id,
+ const struct TALER_PickupIdentifierP *pickup_id,
const struct TALER_Amount *total_requested);
@@ -2316,7 +2316,7 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*insert_pickup_blind_signature)(
void *cls,
- const struct GNUNET_HashCode *pickup_id,
+ const struct TALER_PickupIdentifierP *pickup_id,
uint32_t offset,
const struct TALER_BlindedDenominationSignature *blind_sig);