merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit af1ec2705ca4458ad19cfadada85bb70354c9d4b
parent 9cc34ff64006661fa31104ed6af24acf8fda9233
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Thu, 14 Aug 2025 12:12:01 +0200

fix donau-less linker issues

Diffstat:
Msrc/backenddb/Makefile.am | 14+++++++-------
Msrc/backenddb/pg_select_donau_instances.h | 1-
Msrc/backenddb/pg_update_donau_instance_receipts_amount.h | 1-
Msrc/backenddb/plugin_merchantdb_postgres.c | 2+-
Msrc/include/taler_merchantdb_plugin.h | 125++++++++++++++++++++++++++++++++++++++++---------------------------------------
5 files changed, 71 insertions(+), 72 deletions(-)

diff --git a/src/backenddb/Makefile.am b/src/backenddb/Makefile.am @@ -178,6 +178,7 @@ libtaler_plugin_merchantdb_postgres_la_SOURCES = \ pg_lookup_wire_fee.h pg_lookup_wire_fee.c \ pg_mark_contract_paid.h pg_mark_contract_paid.c \ pg_mark_order_wired.h pg_mark_order_wired.c \ + pg_select_order_blinded_sigs.h pg_select_order_blinded_sigs.c \ pg_purge_instance.h pg_purge_instance.c \ pg_refund_coin.h pg_refund_coin.c \ pg_select_account.h pg_select_account.c \ @@ -208,6 +209,8 @@ libtaler_plugin_merchantdb_postgres_la_SOURCES = \ pg_update_token_family.h pg_update_token_family.c \ pg_update_transfer_status.h pg_update_transfer_status.c \ pg_finalize_transfer_status.h pg_finalize_transfer_status.c \ + pg_delete_donau_instance.h pg_delete_donau_instance.c \ + pg_insert_order_blinded_sigs.h pg_insert_order_blinded_sigs.c \ pg_update_webhook.h pg_update_webhook.c \ pg_update_wirewatch_progress.h pg_update_wirewatch_progress.c \ pg_lookup_statistics_counter_by_bucket.h pg_lookup_statistics_counter_by_bucket.c \ @@ -218,16 +221,13 @@ libtaler_plugin_merchantdb_postgres_la_SOURCES = \ if HAVE_DONAU libtaler_plugin_merchantdb_postgres_la_SOURCES += \ - pg_lookup_donau_keys.h pg_lookup_donau_keys.c \ - pg_lookup_order_charity.h pg_lookup_order_charity.c \ - pg_upsert_donau_keys.h pg_upsert_donau_keys.c \ pg_insert_donau_instance.h pg_insert_donau_instance.c \ - pg_insert_order_blinded_sigs.h pg_insert_order_blinded_sigs.c \ - pg_select_donau_instance_by_serial.h pg_select_donau_instance_by_serial.c \ pg_select_donau_instances.h pg_select_donau_instances.c \ pg_select_donau_instances_filtered.h pg_select_donau_instances_filtered.c \ - pg_select_order_blinded_sigs.h pg_select_order_blinded_sigs.c \ - pg_delete_donau_instance.h pg_delete_donau_instance.c \ + pg_select_donau_instance_by_serial.h pg_select_donau_instance_by_serial.c \ + pg_lookup_donau_keys.h pg_lookup_donau_keys.c \ + pg_lookup_order_charity.h pg_lookup_order_charity.c \ + pg_upsert_donau_keys.h pg_upsert_donau_keys.c \ pg_update_donau_instance.h pg_update_donau_instance.c endif diff --git a/src/backenddb/pg_select_donau_instances.h b/src/backenddb/pg_select_donau_instances.h @@ -26,7 +26,6 @@ #include <taler/taler_json_lib.h> #include "taler_merchantdb_plugin.h" #include "taler_merchant_donau.h" -#include "donau/donau_util.h" /** * Select multiple Donau instances from the database. diff --git a/src/backenddb/pg_update_donau_instance_receipts_amount.h b/src/backenddb/pg_update_donau_instance_receipts_amount.h @@ -25,7 +25,6 @@ #include <taler/taler_util.h> #include <taler/taler_json_lib.h> #include "taler_merchantdb_plugin.h" -#include "donau/donau_service.h" /** * Update information about a Donau charity instance. diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -163,6 +163,7 @@ #include "pg_lookup_statistics_counter_by_bucket.h" #include "pg_lookup_statistics_counter_by_interval.h" #include "pg_update_donau_instance_receipts_amount.h" +#include "pg_delete_donau_instance.h" #ifdef HAVE_DONAU_DONAU_SERVICE_H #include "donau/donau_service.h" @@ -170,7 +171,6 @@ #include "pg_select_donau_instance_by_serial.h" #include "pg_select_donau_instances.h" #include "pg_select_donau_instances_filtered.h" -#include "pg_delete_donau_instance.h" #include "pg_lookup_donau_keys.h" #include "pg_lookup_order_charity.h" #include "pg_upsert_donau_keys.h" diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h @@ -4165,65 +4165,8 @@ struct TALER_MERCHANTDB_Plugin const struct TALER_Amount *new_amount ); - #ifdef HAVE_DONAU_DONAU_SERVICE_H /** - * Upsert Donau keys into the database. - * - * @param cls closure - * @param keys Donau keys to insert or update - */ - enum GNUNET_DB_QueryStatus - (*upsert_donau_keys)( - void *cls, - const struct DONAU_Keys *keys, - struct GNUNET_TIME_Absolute first_retry - ); - - /** - * Lookup Donau keys by URL. - * - * @param cls closure - * @param donau_url URL of the Donau instance - * @param[out] keys set to the Donau keys on success - */ - enum GNUNET_DB_QueryStatus - (*lookup_donau_keys)( - void *cls, - const char *donau_url, - struct GNUNET_TIME_Absolute *first_retry, - struct DONAU_Keys **keys - ); - - /** - * Lookup a Donau instance by its instance ID and URL. - * - * @param cls closure - * @param instance_id instance ID of the Donau instance - * @param donau_url URL of the Donau instance - * @param charity_id set to the charity ID of the Donau instance - * @param charity_priv set to the private key of the charity - * @param charity_max_per_year set to the maximum amount - * the charity can receive per year - * @param charity_receipts_to_date set to the total amount - * the charity has received to date - * @param donau_keys_json set to the JSON representation of the - * Donau keys - */ - enum GNUNET_DB_QueryStatus - (*lookup_order_charity)( - void *cls, - const char *instance_id, - const char *donau_url, - uint64_t *charity_id, - struct DONAU_CharityPrivateKeyP *charity_priv, - struct TALER_Amount *charity_max_per_year, - struct TALER_Amount *charity_receipts_to_date, - json_t **donau_keys_json, - uint64_t *donau_instance_serial - ); - - /** * Insert information about a Donau instance. * * @param cls closure @@ -4284,16 +4227,59 @@ struct TALER_MERCHANTDB_Plugin void *cb_cls); /** - * Delete information about a Donau instance. + * Lookup Donau keys by URL. * * @param cls closure - * @param charity_id charity ID of the Donau instance to delete + * @param donau_url URL of the Donau instance + * @param[out] keys set to the Donau keys on success */ enum GNUNET_DB_QueryStatus - (*delete_donau_instance)( + (*lookup_donau_keys)( void *cls, - const char *id, - const uint64_t charity_id + const char *donau_url, + struct GNUNET_TIME_Absolute *first_retry, + struct DONAU_Keys **keys + ); + + /** + * Lookup a Donau instance by its instance ID and URL. + * + * @param cls closure + * @param instance_id instance ID of the Donau instance + * @param donau_url URL of the Donau instance + * @param charity_id set to the charity ID of the Donau instance + * @param charity_priv set to the private key of the charity + * @param charity_max_per_year set to the maximum amount + * the charity can receive per year + * @param charity_receipts_to_date set to the total amount + * the charity has received to date + * @param donau_keys_json set to the JSON representation of the + * Donau keys + */ + enum GNUNET_DB_QueryStatus + (*lookup_order_charity)( + void *cls, + const char *instance_id, + const char *donau_url, + uint64_t *charity_id, + struct DONAU_CharityPrivateKeyP *charity_priv, + struct TALER_Amount *charity_max_per_year, + struct TALER_Amount *charity_receipts_to_date, + json_t **donau_keys_json, + uint64_t *donau_instance_serial + ); + + /** + * Upsert Donau keys into the database. + * + * @param cls closure + * @param keys Donau keys to insert or update + */ + enum GNUNET_DB_QueryStatus + (*upsert_donau_keys)( + void *cls, + const struct DONAU_Keys *keys, + struct GNUNET_TIME_Absolute first_retry ); /** @@ -4311,7 +4297,22 @@ struct TALER_MERCHANTDB_Plugin const struct DONAU_Charity *charity, const uint64_t charity_id ); + #endif + + /** + * Delete information about a Donau instance. + * + * @param cls closure + * @param charity_id charity ID of the Donau instance to delete + */ + enum GNUNET_DB_QueryStatus + (*delete_donau_instance)( + void *cls, + const char *id, + const uint64_t charity_id + ); + /** * Lookup amount statistics for instance and slug by bucket. *