diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-21 00:25:06 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-21 00:25:31 +0100 |
commit | 7d9f4347829af7f39393f5808a1f8d6bbea89a51 (patch) | |
tree | 1d15a0e4b4771d3c461c5fc9a7c296faf2e8bb81 /src/backenddb | |
parent | 98fab354308e6b26c931dbdbeb68463a9c4cdadd (diff) | |
download | merchant-7d9f4347829af7f39393f5808a1f8d6bbea89a51.tar.gz merchant-7d9f4347829af7f39393f5808a1f8d6bbea89a51.tar.bz2 merchant-7d9f4347829af7f39393f5808a1f8d6bbea89a51.zip |
-big renaming of structs for consistent naming with P suffix
Diffstat (limited to 'src/backenddb')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 69 | ||||
-rw-r--r-- | src/backenddb/test_merchantdb.c | 32 |
2 files changed, 51 insertions, 50 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 7aad3c7c..834b73a3 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -838,7 +838,7 @@ struct KycStatusContext /** * Filter, NULL to not filter. */ - const struct TALER_MerchantWireHash *h_wire; + const struct TALER_MerchantWireHashP *h_wire; /** * Filter, NULL to not filter. @@ -874,7 +874,7 @@ kyc_status_cb (void *cls, for (unsigned int i = 0; i < num_results; i++) { - struct TALER_MerchantWireHash h_wire; + struct TALER_MerchantWireHashP h_wire; uint64_t kyc_serial; char *exchange_url; char *payto_uri; @@ -948,7 +948,7 @@ kyc_status_cb (void *cls, static enum GNUNET_DB_QueryStatus postgres_account_kyc_get_status (void *cls, const char *merchant_id, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, const char *exchange_url, TALER_MERCHANTDB_KycCallback kyc_cb, void *kyc_cb_cls) @@ -1001,7 +1001,7 @@ static enum GNUNET_DB_QueryStatus postgres_account_kyc_set_status ( void *cls, const char *merchant_id, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, const char *exchange_url, uint64_t exchange_kyc_serial, const struct TALER_ExchangeSignatureP *exchange_sig, @@ -1158,7 +1158,7 @@ postgres_update_instance_auth ( static enum GNUNET_DB_QueryStatus postgres_inactivate_account (void *cls, const char *merchant_id, - const struct TALER_MerchantWireHash *h_wire) + const struct TALER_MerchantWireHashP *h_wire) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -1185,7 +1185,7 @@ postgres_inactivate_account (void *cls, static enum GNUNET_DB_QueryStatus postgres_activate_account (void *cls, const char *merchant_id, - const struct TALER_MerchantWireHash *h_wire) + const struct TALER_MerchantWireHashP *h_wire) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -2053,7 +2053,7 @@ postgres_insert_contract_terms (void *cls, struct GNUNET_TIME_Timestamp pay_deadline; struct GNUNET_TIME_Timestamp refund_deadline; const char *fulfillment_url; - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms; if (GNUNET_OK != TALER_JSON_contract_hash (contract_terms, @@ -2133,7 +2133,7 @@ postgres_update_contract_terms (void *cls, struct GNUNET_TIME_Timestamp pay_deadline; struct GNUNET_TIME_Timestamp refund_deadline; const char *fulfillment_url = NULL; - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms; if (GNUNET_OK != TALER_JSON_contract_hash (contract_terms, @@ -2325,12 +2325,12 @@ lookup_deposits_cb (void *cls, * @return transaction status */ static enum GNUNET_DB_QueryStatus -postgres_lookup_deposits (void *cls, - const char *instance_id, - const struct - TALER_PrivateContractHash *h_contract_terms, - TALER_MERCHANTDB_DepositsCallback cb, - void *cb_cls) +postgres_lookup_deposits ( + void *cls, + const char *instance_id, + const struct TALER_PrivateContractHashP *h_contract_terms, + TALER_MERCHANTDB_DepositsCallback cb, + void *cb_cls) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -2425,14 +2425,14 @@ postgres_insert_deposit ( void *cls, const char *instance_id, struct GNUNET_TIME_Timestamp deposit_timestamp, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, const struct TALER_CoinSpendPublicKeyP *coin_pub, const char *exchange_url, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, const struct TALER_Amount *refund_fee, const struct TALER_Amount *wire_fee, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, const struct TALER_ExchangeSignatureP *exchange_sig, const struct TALER_ExchangePublicKeyP *exchange_pub) { @@ -2552,12 +2552,12 @@ lookup_refunds_cb (void *cls, * @return transaction status */ static enum GNUNET_DB_QueryStatus -postgres_lookup_refunds (void *cls, - const char *instance_id, - const struct - TALER_PrivateContractHash *h_contract_terms, - TALER_MERCHANTDB_RefundCallback rc, - void *rc_cls) +postgres_lookup_refunds ( + void *cls, + const char *instance_id, + const struct TALER_PrivateContractHashP *h_contract_terms, + TALER_MERCHANTDB_RefundCallback rc, + void *rc_cls) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -2600,11 +2600,11 @@ postgres_lookup_refunds (void *cls, * @return transaction status */ static enum GNUNET_DB_QueryStatus -postgres_mark_contract_paid (void *cls, - const char *instance_id, - const struct - TALER_PrivateContractHash *h_contract_terms, - const char *session_id) +postgres_mark_contract_paid ( + void *cls, + const char *instance_id, + const struct TALER_PrivateContractHashP *h_contract_terms, + const char *session_id) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { @@ -2664,7 +2664,7 @@ postgres_mark_contract_paid (void *cls, static enum GNUNET_DB_QueryStatus postgres_refund_coin (void *cls, const char *instance_id, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, struct GNUNET_TIME_Timestamp refund_timestamp, const struct TALER_CoinSpendPublicKeyP *coin_pub, const char *reason) @@ -2699,7 +2699,8 @@ static enum GNUNET_DB_QueryStatus postgres_lookup_order_status (void *cls, const char *instance_id, const char *order_id, - struct TALER_PrivateContractHash *h_contract_terms, + struct TALER_PrivateContractHashP * + h_contract_terms, bool *paid) { struct PostgresClosure *pg = cls; @@ -2747,7 +2748,7 @@ postgres_lookup_order_status_by_serial (void *cls, const char *instance_id, uint64_t order_serial, char **order_id, - struct TALER_PrivateContractHash * + struct TALER_PrivateContractHashP * h_contract_terms, bool *paid) { @@ -2898,7 +2899,7 @@ lookup_deposits_by_order_cb (void *cls, { uint64_t deposit_serial; char *exchange_url; - struct TALER_MerchantWireHash h_wire; + struct TALER_MerchantWireHashP h_wire; struct TALER_CoinSpendPublicKeyP coin_pub; struct TALER_Amount amount_with_fee; struct TALER_Amount deposit_fee; @@ -3723,7 +3724,7 @@ static enum GNUNET_DB_QueryStatus postgres_lookup_refunds_detailed ( void *cls, const char *instance_id, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, TALER_MERCHANTDB_RefundDetailCallback rc, void *rc_cls) { @@ -4311,7 +4312,7 @@ lookup_deposits_by_contract_and_coin_cb (void *cls, struct TALER_Amount deposit_fee; struct TALER_Amount refund_fee; struct TALER_Amount wire_fee; - struct TALER_MerchantWireHash h_wire; + struct TALER_MerchantWireHashP h_wire; struct GNUNET_TIME_Timestamp deposit_timestamp; struct GNUNET_TIME_Timestamp refund_deadline; struct TALER_ExchangeSignatureP exchange_sig; @@ -4382,7 +4383,7 @@ static enum GNUNET_DB_QueryStatus postgres_lookup_deposits_by_contract_and_coin ( void *cls, const char *instance_id, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, const struct TALER_CoinSpendPublicKeyP *coin_pub, TALER_MERCHANTDB_CoinDepositCallback cb, void *cb_cls) diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c index ba222ee3..b30c88eb 100644 --- a/src/backenddb/test_merchantdb.c +++ b/src/backenddb/test_merchantdb.c @@ -1750,7 +1750,7 @@ test_mark_contract_paid (const struct InstanceData *instance, const struct OrderData *order, enum GNUNET_DB_QueryStatus expected_result) { - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms; GNUNET_assert (GNUNET_OK == TALER_JSON_contract_hash (order->contract, @@ -1778,8 +1778,8 @@ test_lookup_order_status (const struct InstanceData *instance, const struct OrderData *order, bool expected_paid) { - struct TALER_PrivateContractHash h_contract_terms_expected; - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms_expected; + struct TALER_PrivateContractHashP h_contract_terms; bool order_paid = false; if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != @@ -2097,7 +2097,7 @@ run_test_orders (struct TestOrders_Closure *cls) &cls->orders[0], false)); { - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms; bool order_paid = false; if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != @@ -2130,7 +2130,7 @@ run_test_orders (struct TestOrders_Closure *cls) } /* Test lookup order status fails for nonexistent order */ { - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms; bool order_paid; if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != @@ -2367,7 +2367,7 @@ struct DepositData /** * Hash of the associated order's contract terms. */ - struct TALER_PrivateContractHash h_contract_terms; + struct TALER_PrivateContractHashP h_contract_terms; /** * Public key of the coin that has been deposited. @@ -2402,7 +2402,7 @@ struct DepositData /** * Hash of the wire details. */ - struct TALER_MerchantWireHash h_wire; + struct TALER_MerchantWireHashP h_wire; /** * Signature the exchange made on this deposit. @@ -2635,7 +2635,7 @@ lookup_deposits_cb (void *cls, */ static int test_lookup_deposits (const struct InstanceData *instance, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, unsigned int deposits_length, const struct DepositData *deposits) { @@ -2699,7 +2699,7 @@ lookup_deposits_contract_coin_cb ( const struct TALER_Amount *deposit_fee, const struct TALER_Amount *refund_fee, const struct TALER_Amount *wire_fee, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, struct GNUNET_TIME_Timestamp deposit_timestamp, struct GNUNET_TIME_Timestamp refund_deadline, const struct TALER_ExchangeSignatureP *exchange_sig, @@ -2761,7 +2761,7 @@ lookup_deposits_contract_coin_cb ( static int test_lookup_deposits_contract_and_coin ( const struct InstanceData *instance, - const struct TALER_PrivateContractHash *h_contract, + const struct TALER_PrivateContractHashP *h_contract, const struct TALER_CoinSpendPublicKeyP *coin_pub, unsigned int deposits_length, const struct DepositData *deposits) @@ -2821,7 +2821,7 @@ static void lookup_deposits_order_cb (void *cls, uint64_t deposit_serial, const char *exchange_url, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub) @@ -2938,7 +2938,7 @@ static void get_deposit_serial_cb (void *cls, uint64_t deposit_serial, const char *exchange_url, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *deposit_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub) @@ -5725,7 +5725,7 @@ lookup_refunds_cb (void *cls, */ static int test_lookup_refunds (const struct InstanceData *instance, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, unsigned int refunds_length, const struct TALER_CoinSpendPublicKeyP *coin_pubs, const struct TALER_Amount *refund_amounts) @@ -6048,7 +6048,7 @@ get_refund_serial_cb (void *cls, */ static uint64_t get_refund_serial (const struct InstanceData *instance, - const struct TALER_PrivateContractHash *h_contract_terms, + const struct TALER_PrivateContractHashP *h_contract_terms, const struct RefundData *refund) { struct LookupRefundSerial_Closure lookup_cls = { @@ -6684,7 +6684,7 @@ test_lookup_orders_all_filters (void) static void kyc_status_ok (void *cls, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, uint64_t exchange_kyc_serial, const char *payto_uri, const char *exchange_url, @@ -6700,7 +6700,7 @@ kyc_status_ok (void *cls, static void kyc_status_fail (void *cls, - const struct TALER_MerchantWireHash *h_wire, + const struct TALER_MerchantWireHashP *h_wire, uint64_t exchange_kyc_serial, const char *payto_uri, const char *exchange_url, |