donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 70b863244afe5f50c43fd8823b2b7bcb6644cde3
parent d2682dbcce1678eb9f140a47e2b1d3be3907c661
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Mon, 27 Nov 2023 20:28:54 +0100

Big rename

Diffstat:
Msrc/donau-tools/taler-donau-dbinit.c | 10+++++-----
Msrc/donau-tools/taler-donau-offline.c | 160++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/donau/donau-httpd.c | 8++++----
Msrc/donau/donau-httpd.h | 6+++---
Msrc/donau/donau-httpd_batch-issue_receipts.c | 6+++---
Msrc/donau/donau-httpd_batch-issue_receipts.h | 4++--
Msrc/donau/donau-httpd_batch-submit_receipts.c | 22+++++++++++-----------
Msrc/donau/donau-httpd_batch-submit_receipts.h | 4++--
Msrc/donau/donau-httpd_charities_close.c | 4++--
Msrc/donau/donau-httpd_charities_close.h | 4++--
Msrc/donau/donau-httpd_charities_get.h | 4++--
Msrc/donau/donau-httpd_charities_history.c | 4++--
Msrc/donau/donau-httpd_charities_history.h | 4++--
Msrc/donau/donau-httpd_charities_open.h | 4++--
Msrc/donau/donau-httpd_charities_status.c | 4++--
Msrc/donau/donau-httpd_charities_status.h | 4++--
Msrc/donau/donau-httpd_common_submit_receipts.h | 4++--
Msrc/donau/donau-httpd_config.h | 4++--
Msrc/donau/donau-httpd_csr.h | 4++--
Msrc/donau/donau-httpd_db.c | 14+++++++-------
Msrc/donau/donau-httpd_db.h | 6+++---
Msrc/donau/donau-httpd_issue_receipts.c | 6+++---
Msrc/donau/donau-httpd_issue_receipts.h | 4++--
Msrc/donau/donau-httpd_keys.c | 34+++++++++++++++++-----------------
Msrc/donau/donau-httpd_keys.h | 18+++++++++---------
Msrc/donau/donau-httpd_metrics.h | 4++--
Msrc/donau/donau-httpd_mhd.c | 2+-
Msrc/donau/donau-httpd_mhd.h | 4++--
Msrc/donau/donau-httpd_responses.c | 104++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/donau/donau-httpd_responses.h | 10+++++-----
Msrc/donau/donau-httpd_submit_receipts_get.c | 8++++----
Msrc/donau/donau-httpd_submit_receipts_get.h | 4++--
Msrc/donau/donau-httpd_terms.h | 4++--
Msrc/donaudb/donaudb_plugin.c | 8++++----
Msrc/donaudb/donaudb_transactions.c | 24++++++++++++------------
Msrc/donaudb/pg_get_donation_unit_info.c | 6+++---
Msrc/donaudb/pg_get_donation_unit_info.h | 2+-
Msrc/donaudb/pg_insert_submitted_receipt.c | 2+-
Msrc/donaudb/pg_insert_submitted_receipt.h | 2+-
Msrc/donaudb/plugin_donaudb_common.c | 70+++++++++++++++++++++++++++++++++++-----------------------------------
Msrc/donaudb/plugin_donaudb_common.h | 4++--
Msrc/donaudb/plugin_donaudb_postgres.c | 10+++++-----
Msrc/donaudb/test_donaudb.c | 144++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/include/donau_service.h | 294++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/include/donaudb_lib.h | 58+++++++++++++++++++++++++++++-----------------------------
Msrc/include/donaudb_plugin.h | 29++++++++++++++---------------
Msrc/lib/donau_api_batch_issue_receipts.c | 74+++++++++++++++++++++++++++++++++++++-------------------------------------
Msrc/lib/donau_api_batch_issue_receipts2.c | 66+++++++++++++++++++++++++++++++++---------------------------------
Msrc/lib/donau_api_batch_submit_receipts.c | 88++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/lib/donau_api_charities_close.c | 36++++++++++++++++++------------------
Msrc/lib/donau_api_charities_get.c | 32++++++++++++++++----------------
Msrc/lib/donau_api_charities_history.c | 54+++++++++++++++++++++++++++---------------------------
Msrc/lib/donau_api_charities_open.c | 58+++++++++++++++++++++++++++++-----------------------------
Msrc/lib/donau_api_charities_status.c | 50+++++++++++++++++++++++++-------------------------
Msrc/lib/donau_api_common.c | 194++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/lib/donau_api_common.h | 36++++++++++++++++++------------------
Msrc/lib/donau_api_csr_issue_receipts.c | 40++++++++++++++++++++--------------------
Msrc/lib/donau_api_curl_defaults.c | 2+-
Msrc/lib/donau_api_curl_defaults.h | 2+-
Msrc/lib/donau_api_handle.c | 174++++++++++++++++++++++++++++++++++++++++----------------------------------------
Msrc/lib/donau_api_handle.h | 2+-
Msrc/lib/donau_api_issue_receipts.c | 62+++++++++++++++++++++++++++++++-------------------------------
Msrc/lib/donau_api_issue_receipts2.c | 56++++++++++++++++++++++++++++----------------------------
Msrc/lib/donau_api_submit_receipts_get.c | 54+++++++++++++++++++++++++++---------------------------
Msrc/lib/donau_api_transfers_get.c | 48++++++++++++++++++++++++------------------------
Msrc/pq/pq_query_helper.c | 22++++++++++++----------
Msrc/testing/testing_api_cmd_batch_deposit.c | 20++++++++++----------
Msrc/testing/testing_api_cmd_batch_withdraw.c | 30+++++++++++++++---------------
Msrc/testing/testing_api_cmd_common.c | 22+++++++++++-----------
Msrc/testing/testing_api_cmd_deposit.c | 18+++++++++---------
Msrc/testing/testing_api_cmd_deposits_get.c | 8++++----
Msrc/testing/testing_api_cmd_get_donau.c | 28++++++++++++++--------------
Msrc/testing/testing_api_cmd_insert_deposit.c | 16++++++++--------
Msrc/testing/testing_api_cmd_reserve_close.c | 8++++----
Msrc/testing/testing_api_cmd_reserve_get.c | 8++++----
Msrc/testing/testing_api_cmd_reserve_history.c | 26+++++++++++++-------------
Msrc/testing/testing_api_cmd_reserve_open.c | 14+++++++-------
Msrc/testing/testing_api_cmd_reserve_status.c | 14+++++++-------
Msrc/testing/testing_api_cmd_revoke.c | 2+-
Msrc/testing/testing_api_cmd_revoke_denom_key.c | 12++++++------
Msrc/testing/testing_api_cmd_revoke_sign_key.c | 12++++++------
Msrc/testing/testing_api_cmd_transfer_get.c | 12++++++------
Msrc/testing/testing_api_cmd_withdraw.c | 28++++++++++++++--------------
Msrc/testing/testing_api_misc.c | 6+++---
Msrc/util/donau_signatures.c | 2+-
85 files changed, 1288 insertions(+), 1287 deletions(-)

diff --git a/src/donau-tools/taler-donau-dbinit.c b/src/donau-tools/taler-donau-dbinit.c @@ -68,14 +68,14 @@ run (void *cls, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - struct TALER_DONAUDB_Plugin *plugin; + struct DONAUDB_Plugin *plugin; (void) cls; (void) args; (void) cfgfile; if (NULL == - (plugin = TALER_DONAUDB_plugin_load (cfg))) + (plugin = DONAUDB_plugin_load (cfg))) { fprintf (stderr, "Failed to initialize database plugin.\n"); @@ -98,7 +98,7 @@ run (void *cls, { fprintf (stderr, "Failed to initialize database.\n"); - TALER_DONAUDB_plugin_unload (plugin); + DONAUDB_plugin_unload (plugin); plugin = NULL; global_ret = EXIT_NOPERMISSION; return; @@ -110,7 +110,7 @@ run (void *cls, { fprintf (stderr, "Failed to prepare database.\n"); - TALER_DONAUDB_plugin_unload (plugin); + DONAUDB_plugin_unload (plugin); plugin = NULL; global_ret = EXIT_NOPERMISSION; return; @@ -133,7 +133,7 @@ run (void *cls, } } } - TALER_DONAUDB_plugin_unload (plugin); + DONAUDB_plugin_unload (plugin); plugin = NULL; } diff --git a/src/donau-tools/taler-donau-offline.c b/src/donau-tools/taler-donau-offline.c @@ -224,7 +224,7 @@ struct DenomRevocationRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementRevokeDenominationKeyHandle *h; + struct DONAU_ManagementRevokeDenominationKeyHandle *h; /** * Array index of the associated command. @@ -252,7 +252,7 @@ struct SignkeyRevocationRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementRevokeSigningKeyHandle *h; + struct DONAU_ManagementRevokeSigningKeyHandle *h; /** * Array index of the associated command. @@ -280,7 +280,7 @@ struct AuditorAddRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementAuditorEnableHandle *h; + struct DONAU_ManagementAuditorEnableHandle *h; /** * Array index of the associated command. @@ -308,7 +308,7 @@ struct AuditorDelRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementAuditorDisableHandle *h; + struct DONAU_ManagementAuditorDisableHandle *h; /** * Array index of the associated command. @@ -336,7 +336,7 @@ struct WireAddRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementWireEnableHandle *h; + struct DONAU_ManagementWireEnableHandle *h; /** * Array index of the associated command. @@ -364,7 +364,7 @@ struct WireDelRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementWireDisableHandle *h; + struct DONAU_ManagementWireDisableHandle *h; /** * Array index of the associated command. @@ -392,7 +392,7 @@ struct WireFeeRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementSetWireFeeHandle *h; + struct DONAU_ManagementSetWireFeeHandle *h; /** * Array index of the associated command. @@ -420,7 +420,7 @@ struct DrainProfitsRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementDrainProfitsHandle *h; + struct DONAU_ManagementDrainProfitsHandle *h; /** * Array index of the associated command. @@ -448,7 +448,7 @@ struct GlobalFeeRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementSetGlobalFeeHandle *h; + struct DONAU_ManagementSetGlobalFeeHandle *h; /** * Array index of the associated command. @@ -475,7 +475,7 @@ struct UploadKeysRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementPostKeysHandle *h; + struct DONAU_ManagementPostKeysHandle *h; /** * Operation index. @@ -501,7 +501,7 @@ struct UploadExtensionsRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementPostExtensionsHandle *h; + struct DONAU_ManagementPostExtensionsHandle *h; /** * Operation index. @@ -529,7 +529,7 @@ struct AmlStaffRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementUpdateAmlOfficer *h; + struct DONAU_ManagementUpdateAmlOfficer *h; /** * Array index of the associated command. @@ -557,7 +557,7 @@ struct PartnerAddRequest /** * Operation handle. */ - struct TALER_DONAU_ManagementAddPartner *h; + struct DONAU_ManagementAddPartner *h; /** * Array index of the associated command. @@ -574,7 +574,7 @@ static struct GNUNET_SCHEDULER_Task *nxt; /** * Handle for #do_download. */ -static struct TALER_DONAU_ManagementGetKeysHandle *mgkh; +static struct DONAU_ManagementGetKeysHandle *mgkh; /** @@ -726,7 +726,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete AML staff update #%u\n", (unsigned int) asr->idx); - TALER_DONAU_management_update_aml_officer_cancel (asr->h); + DONAU_management_update_aml_officer_cancel (asr->h); GNUNET_CONTAINER_DLL_remove (asr_head, asr_tail, asr); @@ -741,7 +741,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete partner add request #%u\n", (unsigned int) par->idx); - TALER_DONAU_management_add_partner_cancel (par->h); + DONAU_management_add_partner_cancel (par->h); GNUNET_CONTAINER_DLL_remove (par_head, par_tail, par); @@ -756,7 +756,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete denomination revocation #%u\n", (unsigned int) drr->idx); - TALER_DONAU_management_revoke_denomination_key_cancel (drr->h); + DONAU_management_revoke_denomination_key_cancel (drr->h); GNUNET_CONTAINER_DLL_remove (drr_head, drr_tail, drr); @@ -771,7 +771,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete signkey revocation #%u\n", (unsigned int) srr->idx); - TALER_DONAU_management_revoke_signing_key_cancel (srr->h); + DONAU_management_revoke_signing_key_cancel (srr->h); GNUNET_CONTAINER_DLL_remove (srr_head, srr_tail, srr); @@ -787,7 +787,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete auditor add #%u\n", (unsigned int) aar->idx); - TALER_DONAU_management_enable_auditor_cancel (aar->h); + DONAU_management_enable_auditor_cancel (aar->h); GNUNET_CONTAINER_DLL_remove (aar_head, aar_tail, aar); @@ -802,7 +802,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete auditor del #%u\n", (unsigned int) adr->idx); - TALER_DONAU_management_disable_auditor_cancel (adr->h); + DONAU_management_disable_auditor_cancel (adr->h); GNUNET_CONTAINER_DLL_remove (adr_head, adr_tail, adr); @@ -817,7 +817,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete wire add #%u\n", (unsigned int) war->idx); - TALER_DONAU_management_enable_wire_cancel (war->h); + DONAU_management_enable_wire_cancel (war->h); GNUNET_CONTAINER_DLL_remove (war_head, war_tail, war); @@ -832,7 +832,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete wire del #%u\n", (unsigned int) wdr->idx); - TALER_DONAU_management_disable_wire_cancel (wdr->h); + DONAU_management_disable_wire_cancel (wdr->h); GNUNET_CONTAINER_DLL_remove (wdr_head, wdr_tail, wdr); @@ -847,7 +847,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete wire fee #%u\n", (unsigned int) wfr->idx); - TALER_DONAU_management_set_wire_fees_cancel (wfr->h); + DONAU_management_set_wire_fees_cancel (wfr->h); GNUNET_CONTAINER_DLL_remove (wfr_head, wfr_tail, wfr); @@ -862,7 +862,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete global fee #%u\n", (unsigned int) gfr->idx); - TALER_DONAU_management_set_global_fees_cancel (gfr->h); + DONAU_management_set_global_fees_cancel (gfr->h); GNUNET_CONTAINER_DLL_remove (gfr_head, gfr_tail, gfr); @@ -877,7 +877,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete key signature upload #%u\n", (unsigned int) ukr->idx); - TALER_DONAU_post_management_keys_cancel (ukr->h); + DONAU_post_management_keys_cancel (ukr->h); GNUNET_CONTAINER_DLL_remove (ukr_head, ukr_tail, ukr); @@ -892,7 +892,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete extensions signature upload #%u\n", (unsigned int) uer->idx); - TALER_DONAU_management_post_extensions_cancel (uer->h); + DONAU_management_post_extensions_cancel (uer->h); GNUNET_CONTAINER_DLL_remove (uer_head, uer_tail, uer); @@ -908,7 +908,7 @@ do_shutdown (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Aborting incomplete drain profits request #%u\n", (unsigned int) dpr->idx); - TALER_DONAU_management_drain_profits_cancel (dpr->h); + DONAU_management_drain_profits_cancel (dpr->h); GNUNET_CONTAINER_DLL_remove (dpr_head, dpr_tail, dpr); @@ -938,7 +938,7 @@ do_shutdown (void *cls) } if (NULL != mgkh) { - TALER_DONAU_get_management_keys_cancel (mgkh); + DONAU_get_management_keys_cancel (mgkh); mgkh = NULL; } if (NULL != ctx) @@ -1126,10 +1126,10 @@ load_offline_key (int do_create) static void denom_revocation_cb ( void *cls, - const struct TALER_DONAU_ManagementRevokeDenominationResponse *dr) + const struct DONAU_ManagementRevokeDenominationResponse *dr) { struct DenomRevocationRequest *drr = cls; - const struct TALER_DONAU_HttpResponse *hr = &dr->hr; + const struct DONAU_HttpResponse *hr = &dr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1195,7 +1195,7 @@ upload_denom_revocation (const char *donau_url, drr = GNUNET_new (struct DenomRevocationRequest); drr->idx = idx; drr->h = - TALER_DONAU_management_revoke_denomination_key (ctx, + DONAU_management_revoke_denomination_key (ctx, donau_url, &h_denom_pub, &master_sig, @@ -1216,10 +1216,10 @@ upload_denom_revocation (const char *donau_url, static void signkey_revocation_cb ( void *cls, - const struct TALER_DONAU_ManagementRevokeSigningKeyResponse *sr) + const struct DONAU_ManagementRevokeSigningKeyResponse *sr) { struct SignkeyRevocationRequest *srr = cls; - const struct TALER_DONAU_HttpResponse *hr = &sr->hr; + const struct DONAU_HttpResponse *hr = &sr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1252,7 +1252,7 @@ upload_signkey_revocation (const char *donau_url, const json_t *value) { struct TALER_MasterSignatureP master_sig; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct SignkeyRevocationRequest *srr; const char *err_name; unsigned int err_line; @@ -1285,7 +1285,7 @@ upload_signkey_revocation (const char *donau_url, srr = GNUNET_new (struct SignkeyRevocationRequest); srr->idx = idx; srr->h = - TALER_DONAU_management_revoke_signing_key (ctx, + DONAU_management_revoke_signing_key (ctx, donau_url, &donau_pub, &master_sig, @@ -1306,10 +1306,10 @@ upload_signkey_revocation (const char *donau_url, static void auditor_add_cb ( void *cls, - const struct TALER_DONAU_ManagementAuditorEnableResponse *mer) + const struct DONAU_ManagementAuditorEnableResponse *mer) { struct AuditorAddRequest *aar = cls; - const struct TALER_DONAU_HttpResponse *hr = &mer->hr; + const struct DONAU_HttpResponse *hr = &mer->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1384,7 +1384,7 @@ upload_auditor_add (const char *donau_url, aar = GNUNET_new (struct AuditorAddRequest); aar->idx = idx; aar->h = - TALER_DONAU_management_enable_auditor (ctx, + DONAU_management_enable_auditor (ctx, donau_url, &auditor_pub, auditor_url, @@ -1408,10 +1408,10 @@ upload_auditor_add (const char *donau_url, static void auditor_del_cb (void *cls, const struct - TALER_DONAU_ManagementAuditorDisableResponse *mdr) + DONAU_ManagementAuditorDisableResponse *mdr) { struct AuditorDelRequest *adr = cls; - const struct TALER_DONAU_HttpResponse *hr = &mdr->hr; + const struct DONAU_HttpResponse *hr = &mdr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1480,7 +1480,7 @@ upload_auditor_del (const char *donau_url, adr = GNUNET_new (struct AuditorDelRequest); adr->idx = idx; adr->h = - TALER_DONAU_management_disable_auditor (ctx, + DONAU_management_disable_auditor (ctx, donau_url, &auditor_pub, end_time, @@ -1501,10 +1501,10 @@ upload_auditor_del (const char *donau_url, */ static void wire_add_cb (void *cls, - const struct TALER_DONAU_ManagementWireEnableResponse *wer) + const struct DONAU_ManagementWireEnableResponse *wer) { struct WireAddRequest *war = cls; - const struct TALER_DONAU_HttpResponse *hr = &wer->hr; + const struct DONAU_HttpResponse *hr = &wer->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1616,7 +1616,7 @@ upload_wire_add (const char *donau_url, war = GNUNET_new (struct WireAddRequest); war->idx = idx; war->h = - TALER_DONAU_management_enable_wire (ctx, + DONAU_management_enable_wire (ctx, donau_url, payto_uri, conversion_url, @@ -1641,10 +1641,10 @@ upload_wire_add (const char *donau_url, */ static void wire_del_cb (void *cls, - const struct TALER_DONAU_ManagementWireDisableResponse *wdres) + const struct DONAU_ManagementWireDisableResponse *wdres) { struct WireDelRequest *wdr = cls; - const struct TALER_DONAU_HttpResponse *hr = &wdres->hr; + const struct DONAU_HttpResponse *hr = &wdres->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1713,7 +1713,7 @@ upload_wire_del (const char *donau_url, wdr = GNUNET_new (struct WireDelRequest); wdr->idx = idx; wdr->h = - TALER_DONAU_management_disable_wire (ctx, + DONAU_management_disable_wire (ctx, donau_url, payto_uri, end_time, @@ -1735,10 +1735,10 @@ upload_wire_del (const char *donau_url, static void wire_fee_cb ( void *cls, - const struct TALER_DONAU_ManagementSetWireFeeResponse *swr) + const struct DONAU_ManagementSetWireFeeResponse *swr) { struct WireFeeRequest *wfr = cls; - const struct TALER_DONAU_HttpResponse *hr = &swr->hr; + const struct DONAU_HttpResponse *hr = &swr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1817,7 +1817,7 @@ upload_wire_fee (const char *donau_url, wfr = GNUNET_new (struct WireFeeRequest); wfr->idx = idx; wfr->h = - TALER_DONAU_management_set_wire_fees (ctx, + DONAU_management_set_wire_fees (ctx, donau_url, wire_method, start_time, @@ -1841,10 +1841,10 @@ upload_wire_fee (const char *donau_url, static void global_fee_cb ( void *cls, - const struct TALER_DONAU_ManagementSetGlobalFeeResponse *gr) + const struct DONAU_ManagementSetGlobalFeeResponse *gr) { struct GlobalFeeRequest *gfr = cls; - const struct TALER_DONAU_HttpResponse *hr = &gr->hr; + const struct DONAU_HttpResponse *hr = &gr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -1932,7 +1932,7 @@ upload_global_fee (const char *donau_url, gfr = GNUNET_new (struct GlobalFeeRequest); gfr->idx = idx; gfr->h = - TALER_DONAU_management_set_global_fees (ctx, + DONAU_management_set_global_fees (ctx, donau_url, start_time, end_time, @@ -1958,10 +1958,10 @@ upload_global_fee (const char *donau_url, static void drain_profits_cb ( void *cls, - const struct TALER_DONAU_ManagementDrainResponse *mdr) + const struct DONAU_ManagementDrainResponse *mdr) { struct DrainProfitsRequest *dpr = cls; - const struct TALER_DONAU_HttpResponse *hr = &mdr->hr; + const struct DONAU_HttpResponse *hr = &mdr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -2040,7 +2040,7 @@ upload_drain (const char *donau_url, dpr = GNUNET_new (struct DrainProfitsRequest); dpr->idx = idx; dpr->h = - TALER_DONAU_management_drain_profits (ctx, + DONAU_management_drain_profits (ctx, donau_url, &wtid, &amount, @@ -2065,10 +2065,10 @@ upload_drain (const char *donau_url, static void keys_cb ( void *cls, - const struct TALER_DONAU_ManagementPostKeysResponse *mr) + const struct DONAU_ManagementPostKeysResponse *mr) { struct UploadKeysRequest *ukr = cls; - const struct TALER_DONAU_HttpResponse *hr = &mr->hr; + const struct DONAU_HttpResponse *hr = &mr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -2100,7 +2100,7 @@ upload_keys (const char *donau_url, size_t idx, const json_t *value) { - struct TALER_DONAU_ManagementPostKeysData pkd; + struct DONAU_ManagementPostKeysData pkd; struct UploadKeysRequest *ukr; const char *err_name; unsigned int err_line; @@ -2140,13 +2140,13 @@ upload_keys (const char *donau_url, pkd.num_sign_sigs); pkd.sign_sigs = GNUNET_new_array ( pkd.num_sign_sigs, - struct TALER_DONAU_SigningKeySignature); + struct DONAU_SigningKeySignature); pkd.denom_sigs = GNUNET_new_array ( pkd.num_denom_sigs, - struct TALER_DONAU_DenominationKeySignature); + struct DONAU_DenominationKeySignature); for (unsigned int i = 0; i<pkd.num_sign_sigs; i++) { - struct TALER_DONAU_SigningKeySignature *ss = &pkd.sign_sigs[i]; + struct DONAU_SigningKeySignature *ss = &pkd.sign_sigs[i]; json_t *val = json_array_get (signkey_sigs, i); struct GNUNET_JSON_Specification spec[] = { @@ -2176,7 +2176,7 @@ upload_keys (const char *donau_url, } for (unsigned int i = 0; i<pkd.num_denom_sigs; i++) { - struct TALER_DONAU_DenominationKeySignature *ds = &pkd.denom_sigs[i]; + struct DONAU_DenominationKeySignature *ds = &pkd.denom_sigs[i]; json_t *val = json_array_get (denom_sigs, i); struct GNUNET_JSON_Specification spec[] = { @@ -2210,7 +2210,7 @@ upload_keys (const char *donau_url, ukr = GNUNET_new (struct UploadKeysRequest); ukr->idx = idx; ukr->h = - TALER_DONAU_post_management_keys (ctx, + DONAU_post_management_keys (ctx, donau_url, &pkd, &keys_cb, @@ -2238,10 +2238,10 @@ upload_keys (const char *donau_url, static void extensions_cb ( void *cls, - const struct TALER_DONAU_ManagementPostExtensionsResponse *er) + const struct DONAU_ManagementPostExtensionsResponse *er) { struct UploadExtensionsRequest *uer = cls; - const struct TALER_DONAU_HttpResponse *hr = &er->hr; + const struct DONAU_HttpResponse *hr = &er->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -2339,7 +2339,7 @@ upload_extensions (const char *donau_url, /* 3. Upload the extensions */ { - struct TALER_DONAU_ManagementPostExtensionsData ped = { + struct DONAU_ManagementPostExtensionsData ped = { .extensions = extensions, .extensions_sig = sig, }; @@ -2347,7 +2347,7 @@ upload_extensions (const char *donau_url, = GNUNET_new (struct UploadExtensionsRequest); uer->idx = idx; - uer->h = TALER_DONAU_management_post_extensions ( + uer->h = DONAU_management_post_extensions ( ctx, donau_url, &ped, @@ -2369,10 +2369,10 @@ upload_extensions (const char *donau_url, static void add_partner_cb ( void *cls, - const struct TALER_DONAU_ManagementAddPartnerResponse *apr) + const struct DONAU_ManagementAddPartnerResponse *apr) { struct PartnerAddRequest *par = cls; - const struct TALER_DONAU_HttpResponse *hr = &apr->hr; + const struct DONAU_HttpResponse *hr = &apr->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -2454,7 +2454,7 @@ add_partner (const char *donau_url, par = GNUNET_new (struct PartnerAddRequest); par->idx = idx; par->h = - TALER_DONAU_management_add_partner (ctx, + DONAU_management_add_partner (ctx, donau_url, &partner_pub, start_date, @@ -2480,10 +2480,10 @@ add_partner (const char *donau_url, static void update_aml_officer_cb ( void *cls, - const struct TALER_DONAU_ManagementUpdateAmlOfficerResponse *ar) + const struct DONAU_ManagementUpdateAmlOfficerResponse *ar) { struct AmlStaffRequest *asr = cls; - const struct TALER_DONAU_HttpResponse *hr = &ar->hr; + const struct DONAU_HttpResponse *hr = &ar->hr; if (MHD_HTTP_NO_CONTENT != hr->http_status) { @@ -2561,7 +2561,7 @@ update_aml_staff (const char *donau_url, asr = GNUNET_new (struct AmlStaffRequest); asr->idx = idx; asr->h = - TALER_DONAU_management_update_aml_officer (ctx, + DONAU_management_update_aml_officer (ctx, donau_url, &officer_pub, officer_name, @@ -2811,7 +2811,7 @@ do_revoke_denomination_key (char *const *args) static void do_revoke_signkey (char *const *args) { - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_MasterSignatureP master_sig; if (NULL != in) @@ -3875,10 +3875,10 @@ enable_aml_staff (char *const *args) */ static void download_cb (void *cls, - const struct TALER_DONAU_ManagementGetKeysResponse *mgr) + const struct DONAU_ManagementGetKeysResponse *mgr) { char *const *args = cls; - const struct TALER_DONAU_HttpResponse *hr = &mgr->hr; + const struct DONAU_HttpResponse *hr = &mgr->hr; mgkh = NULL; switch (hr->http_status) @@ -3940,7 +3940,7 @@ do_download (char *const *args) global_ret = EXIT_NOTCONFIGURED; return; } - mgkh = TALER_DONAU_get_management_keys (ctx, + mgkh = DONAU_get_management_keys (ctx, CFG_donau_url, &download_cb, (void *) args); @@ -4154,7 +4154,7 @@ show_signkeys (const struct TALER_SecurityModulePublicKeyP *secm_pub, json_array_foreach (signkeys, index, value) { const char *err_name; unsigned int err_line; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_SecurityModuleSignatureP secm_sig; struct GNUNET_TIME_Timestamp start_time; struct GNUNET_TIME_Timestamp sign_end; @@ -4584,7 +4584,7 @@ sign_signkeys (const struct TALER_SecurityModulePublicKeyP *secm_pub, json_array_foreach (signkeys, index, value) { const char *err_name; unsigned int err_line; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_SecurityModuleSignatureP secm_sig; struct GNUNET_TIME_Timestamp start_time; struct GNUNET_TIME_Timestamp sign_end; diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c @@ -146,7 +146,7 @@ struct TALER_AttributeEncryptionKeyP TEH_attribute_key; /** * Our DB plugin. (global) */ -struct TALER_DONAUDB_Plugin *TEH_plugin; +struct DONAUDB_Plugin *TEH_plugin; /** * Absolute STEFAN parameter. @@ -1174,7 +1174,7 @@ handle_post_management (struct TEH_RequestContext *rc, if (0 == strcmp (args[0], "signkeys")) { - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; if ( (NULL == args[0]) || (NULL == args[1]) || @@ -2089,7 +2089,7 @@ donau_serve_process_config (void) for (unsigned int i = 0; i<MAX_DB_RETRIES; i++) { - TEH_plugin = TALER_DONAUDB_plugin_load (TEH_cfg); + TEH_plugin = DONAUDB_plugin_load (TEH_cfg); if (NULL != TEH_plugin) break; GNUNET_log (GNUNET_ERROR_TYPE_WARNING, @@ -2348,7 +2348,7 @@ do_shutdown (void *cls) TEH_keys_finished (); if (NULL != TEH_plugin) { - TALER_DONAUDB_plugin_unload (TEH_plugin); + DONAUDB_plugin_unload (TEH_plugin); TEH_plugin = NULL; } if (NULL != TEH_curl_ctx) diff --git a/src/donau/donau-httpd.h b/src/donau/donau-httpd.h @@ -20,8 +20,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_H -#define TALER_DONAU_HTTPD_H +#ifndef DONAU_HTTPD_H +#define DONAU_HTTPD_H #include <microhttpd.h> #include "taler_json_lib.h" @@ -95,7 +95,7 @@ extern struct TALER_AttributeEncryptionKeyP TEH_attribute_key; /** * Our DB plugin. */ -extern struct TALER_DONAUDB_Plugin *TEH_plugin; +extern struct DONAUDB_Plugin *TEH_plugin; /** * Absolute STEFAN parameter. diff --git a/src/donau/donau-httpd_batch-issue_receipts.c b/src/donau/donau-httpd_batch-issue_receipts.c @@ -64,7 +64,7 @@ struct PlanchetContext /** * Set to the resulting signed coin data to be returned to the client. */ - struct TALER_DONAUDB_CollectableBlindcoin collectable; + struct DONAUDB_CollectableBlindcoin collectable; }; @@ -87,7 +87,7 @@ struct BatchWithdrawContext /** * KYC status of the reserve used for the operation. */ - struct TALER_DONAUDB_KycStatus kyc; + struct DONAUDB_KycStatus kyc; /** * Array of @e planchets_length planchets we are processing. @@ -141,7 +141,7 @@ struct BatchWithdrawContext static void batch_withdraw_amount_cb (void *cls, struct GNUNET_TIME_Absolute limit, - TALER_DONAUDB_KycAmountCallback cb, + DONAUDB_KycAmountCallback cb, void *cb_cls) { struct BatchWithdrawContext *wc = cls; diff --git a/src/donau/donau-httpd_batch-issue_receipts.h b/src/donau/donau-httpd_batch-issue_receipts.h @@ -20,8 +20,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_BATCH_WITHDRAW_H -#define TALER_DONAU_HTTPD_BATCH_WITHDRAW_H +#ifndef DONAU_HTTPD_BATCH_WITHDRAW_H +#define DONAU_HTTPD_BATCH_WITHDRAW_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_batch-submit_receipts.c b/src/donau/donau-httpd_batch-submit_receipts.c @@ -57,7 +57,7 @@ struct BatchDepositContext /** * Details about the batch deposit operation. */ - struct TALER_DONAUDB_BatchDeposit bd; + struct DONAUDB_BatchDeposit bd; /** * Additional details for policy extension relevant for this @@ -107,18 +107,18 @@ reply_batch_deposit_success ( struct MHD_Connection *connection, const struct BatchDepositContext *dc) { - const struct TALER_DONAUDB_BatchDeposit *bd = &dc->bd; + const struct DONAUDB_BatchDeposit *bd = &dc->bd; json_t *arr; - struct TALER_DonauPublicKeyP pub; + struct DONAU_DonauPublicKeyP pub; again: arr = json_array (); GNUNET_assert (NULL != arr); for (unsigned int i = 0; i<bd->num_cdis; i++) { - const struct TALER_DONAUDB_CoinDepositInformation *cdi + const struct DONAUDB_CoinDepositInformation *cdi = &bd->cdis[i]; - struct TALER_DonauPublicKeyP pubi; + struct DONAU_DonauPublicKeyP pubi; struct TALER_DonauSignatureP sig; enum TALER_ErrorCode ec; struct TALER_Amount amount_without_fee; @@ -199,7 +199,7 @@ batch_deposit_transaction (void *cls, MHD_RESULT *mhd_ret) { struct BatchDepositContext *dc = cls; - const struct TALER_DONAUDB_BatchDeposit *bd = &dc->bd; + const struct DONAUDB_BatchDeposit *bd = &dc->bd; enum GNUNET_DB_QueryStatus qs = GNUNET_SYSERR; uint32_t bad_balance_coin_index = UINT32_MAX; bool balance_ok; @@ -224,7 +224,7 @@ batch_deposit_transaction (void *cls, /* FIXME: replace by batch insert! */ for (unsigned int i = 0; i<bd->num_cdis; i++) { - const struct TALER_DONAUDB_CoinDepositInformation *cdi + const struct DONAUDB_CoinDepositInformation *cdi = &bd->cdis[i]; uint64_t known_coin_id; @@ -312,10 +312,10 @@ static enum GNUNET_GenericReturnValue parse_coin (struct MHD_Connection *connection, const struct BatchDepositContext *dc, json_t *jcoin, - struct TALER_DONAUDB_CoinDepositInformation *cdi, + struct DONAUDB_CoinDepositInformation *cdi, struct TALER_Amount *deposit_fee) { - const struct TALER_DONAUDB_BatchDeposit *bd = &dc->bd; + const struct DONAUDB_BatchDeposit *bd = &dc->bd; struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_amount ("contribution", TEH_currency, @@ -501,7 +501,7 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc, { struct MHD_Connection *connection = rc->connection; struct BatchDepositContext dc = { 0 }; - struct TALER_DONAUDB_BatchDeposit *bd = &dc.bd; + struct DONAUDB_BatchDeposit *bd = &dc.bd; const json_t *coins; bool no_refund_deadline = true; struct GNUNET_JSON_Specification spec[] = { @@ -635,7 +635,7 @@ TEH_handler_batch_deposit (struct TEH_RequestContext *rc, } { - struct TALER_DONAUDB_CoinDepositInformation cdis[ + struct DONAUDB_CoinDepositInformation cdis[ GNUNET_NZL (bd->num_cdis)]; struct TALER_Amount deposit_fees[GNUNET_NZL (bd->num_cdis)]; diff --git a/src/donau/donau-httpd_batch-submit_receipts.h b/src/donau/donau-httpd_batch-submit_receipts.h @@ -20,8 +20,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_BATCH_DEPOSIT_H -#define TALER_DONAU_HTTPD_BATCH_DEPOSIT_H +#ifndef DONAU_HTTPD_BATCH_DEPOSIT_H +#define DONAU_HTTPD_BATCH_DEPOSIT_H #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> diff --git a/src/donau/donau-httpd_charities_close.c b/src/donau/donau-httpd_charities_close.c @@ -83,7 +83,7 @@ struct ReserveCloseContext /** * KYC status for the request. */ - struct TALER_DONAUDB_KycStatus kyc; + struct DONAUDB_KycStatus kyc; /** * Hash of the payto-URI that was used for the KYC decision. @@ -134,7 +134,7 @@ reply_reserve_close_success (struct MHD_Connection *connection, static void amount_it (void *cls, struct GNUNET_TIME_Absolute limit, - TALER_DONAUDB_KycAmountCallback cb, + DONAUDB_KycAmountCallback cb, void *cb_cls) { struct ReserveCloseContext *rcc = cls; diff --git a/src/donau/donau-httpd_charities_close.h b/src/donau/donau-httpd_charities_close.h @@ -18,8 +18,8 @@ * @brief Handle /reserves/$RESERVE_PUB/close requests * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_RESERVES_CLOSE_H -#define TALER_DONAU_HTTPD_RESERVES_CLOSE_H +#ifndef DONAU_HTTPD_RESERVES_CLOSE_H +#define DONAU_HTTPD_RESERVES_CLOSE_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_charities_get.h b/src/donau/donau-httpd_charities_get.h @@ -20,8 +20,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_RESERVES_GET_H -#define TALER_DONAU_HTTPD_RESERVES_GET_H +#ifndef DONAU_HTTPD_RESERVES_GET_H +#define DONAU_HTTPD_RESERVES_GET_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_charities_history.c b/src/donau/donau-httpd_charities_history.c @@ -62,7 +62,7 @@ struct ReserveHistoryContext /** * History of the reserve, set in the callback. */ - struct TALER_DONAUDB_ReserveHistory *rh; + struct DONAUDB_ReserveHistory *rh; /** * Global fees applying to the request. @@ -87,7 +87,7 @@ static MHD_RESULT reply_reserve_history_success (struct MHD_Connection *connection, const struct ReserveHistoryContext *rhc) { - const struct TALER_DONAUDB_ReserveHistory *rh = rhc->rh; + const struct DONAUDB_ReserveHistory *rh = rhc->rh; json_t *json_history; json_history = TEH_RESPONSE_compile_reserve_history (rh); diff --git a/src/donau/donau-httpd_charities_history.h b/src/donau/donau-httpd_charities_history.h @@ -19,8 +19,8 @@ * @author Florian Dold * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_RESERVES_HISTORY_H -#define TALER_DONAU_HTTPD_RESERVES_HISTORY_H +#ifndef DONAU_HTTPD_RESERVES_HISTORY_H +#define DONAU_HTTPD_RESERVES_HISTORY_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_charities_open.h b/src/donau/donau-httpd_charities_open.h @@ -18,8 +18,8 @@ * @brief Handle /reserves/$RESERVE_PUB/open requests * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_RESERVES_OPEN_H -#define TALER_DONAU_HTTPD_RESERVES_OPEN_H +#ifndef DONAU_HTTPD_RESERVES_OPEN_H +#define DONAU_HTTPD_RESERVES_OPEN_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_charities_status.c b/src/donau/donau-httpd_charities_status.c @@ -51,7 +51,7 @@ struct ReserveStatusContext /** * History of the reserve, set in the callback. */ - struct TALER_DONAUDB_ReserveHistory *rh; + struct DONAUDB_ReserveHistory *rh; /** * Sum of incoming transactions within the returned history. @@ -83,7 +83,7 @@ static MHD_RESULT reply_reserve_status_success (struct MHD_Connection *connection, const struct ReserveStatusContext *rhc) { - const struct TALER_DONAUDB_ReserveHistory *rh = rhc->rh; + const struct DONAUDB_ReserveHistory *rh = rhc->rh; json_t *json_history; json_history = TEH_RESPONSE_compile_reserve_history (rh); diff --git a/src/donau/donau-httpd_charities_status.h b/src/donau/donau-httpd_charities_status.h @@ -20,8 +20,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_RESERVES_STATUS_H -#define TALER_DONAU_HTTPD_RESERVES_STATUS_H +#ifndef DONAU_HTTPD_RESERVES_STATUS_H +#define DONAU_HTTPD_RESERVES_STATUS_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_common_submit_receipts.h b/src/donau/donau-httpd_common_submit_receipts.h @@ -18,8 +18,8 @@ * @brief shared logic for handling deposited coins * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_COMMON_DEPOSIT_H -#define TALER_DONAU_HTTPD_COMMON_DEPOSIT_H +#ifndef DONAU_HTTPD_COMMON_DEPOSIT_H +#define DONAU_HTTPD_COMMON_DEPOSIT_H #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> diff --git a/src/donau/donau-httpd_config.h b/src/donau/donau-httpd_config.h @@ -18,8 +18,8 @@ * @brief headers for /config handler * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_CONFIG_H -#define TALER_DONAU_HTTPD_CONFIG_H +#ifndef DONAU_HTTPD_CONFIG_H +#define DONAU_HTTPD_CONFIG_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_csr.h b/src/donau/donau-httpd_csr.h @@ -19,8 +19,8 @@ * @author Lucien Heuzeveldt * @author Gian Demarmles */ -#ifndef TALER_DONAU_HTTPD_CSR_H -#define TALER_DONAU_HTTPD_CSR_H +#ifndef DONAU_HTTPD_CSR_H +#define DONAU_HTTPD_CSR_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_db.c b/src/donau/donau-httpd_db.c @@ -35,7 +35,7 @@ TEH_make_coin_known (const struct TALER_CoinPublicInfo *coin, uint64_t *known_coin_id, MHD_RESULT *mhd_ret) { - enum TALER_DONAUDB_CoinKnownStatus cks; + enum DONAUDB_CoinKnownStatus cks; struct TALER_DenominationHashP h_denom_pub; struct TALER_AgeCommitmentHash age_hash; @@ -47,20 +47,20 @@ TEH_make_coin_known (const struct TALER_CoinPublicInfo *coin, &age_hash); switch (cks) { - case TALER_DONAUDB_CKS_ADDED: + case DONAUDB_CKS_ADDED: return GNUNET_DB_STATUS_SUCCESS_ONE_RESULT; - case TALER_DONAUDB_CKS_PRESENT: + case DONAUDB_CKS_PRESENT: return GNUNET_DB_STATUS_SUCCESS_NO_RESULTS; - case TALER_DONAUDB_CKS_SOFT_FAIL: + case DONAUDB_CKS_SOFT_FAIL: return GNUNET_DB_STATUS_SOFT_ERROR; - case TALER_DONAUDB_CKS_HARD_FAIL: + case DONAUDB_CKS_HARD_FAIL: *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GENERIC_DB_STORE_FAILED, NULL); return GNUNET_DB_STATUS_HARD_ERROR; - case TALER_DONAUDB_CKS_DENOM_CONFLICT: + case DONAUDB_CKS_DENOM_CONFLICT: /* FIXME: insufficient_funds != denom conflict! See issue #7267, need new * strategy for evidence gathering */ *mhd_ret = TEH_RESPONSE_reply_coin_insufficient_funds ( @@ -69,7 +69,7 @@ TEH_make_coin_known (const struct TALER_CoinPublicInfo *coin, &h_denom_pub, &coin->coin_pub); return GNUNET_DB_STATUS_HARD_ERROR; - case TALER_DONAUDB_CKS_AGE_CONFLICT: + case DONAUDB_CKS_AGE_CONFLICT: /* FIXME: insufficient_funds != Age conflict! See issue #7267, need new * strategy for evidence gathering */ *mhd_ret = TEH_RESPONSE_reply_coin_insufficient_funds ( diff --git a/src/donau/donau-httpd_db.h b/src/donau/donau-httpd_db.h @@ -18,8 +18,8 @@ * @brief High-level (transactional-layer) database operations for the donau * @author Chrisitan Grothoff */ -#ifndef TALER_DONAU_HTTPD_DB_H -#define TALER_DONAU_HTTPD_DB_H +#ifndef DONAU_HTTPD_DB_H +#define DONAU_HTTPD_DB_H #include <microhttpd.h> #include "taler_donaudb_plugin.h" @@ -103,4 +103,4 @@ TEH_DB_run_transaction (struct MHD_Connection *connection, #endif -/* TALER_DONAU_HTTPD_DB_H */ +/* DONAU_HTTPD_DB_H */ diff --git a/src/donau/donau-httpd_issue_receipts.c b/src/donau/donau-httpd_issue_receipts.c @@ -54,12 +54,12 @@ struct WithdrawContext /** * Set to the resulting signed coin data to be returned to the client. */ - struct TALER_DONAUDB_CollectableBlindcoin collectable; + struct DONAUDB_CollectableBlindcoin collectable; /** * KYC status for the operation. */ - struct TALER_DONAUDB_KycStatus kyc; + struct DONAUDB_KycStatus kyc; /** * Hash of the payto-URI representing the account @@ -98,7 +98,7 @@ struct WithdrawContext static void withdraw_amount_cb (void *cls, struct GNUNET_TIME_Absolute limit, - TALER_DONAUDB_KycAmountCallback cb, + DONAUDB_KycAmountCallback cb, void *cb_cls) { struct WithdrawContext *wc = cls; diff --git a/src/donau/donau-httpd_issue_receipts.h b/src/donau/donau-httpd_issue_receipts.h @@ -20,8 +20,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_WITHDRAW_H -#define TALER_DONAU_HTTPD_WITHDRAW_H +#ifndef DONAU_HTTPD_WITHDRAW_H +#define DONAU_HTTPD_WITHDRAW_H #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_keys.c b/src/donau/donau-httpd_keys.c @@ -151,7 +151,7 @@ struct HelperSignkey /** * The public key. */ - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; /** * Signature over this key from the security module's key. @@ -253,12 +253,12 @@ struct SigningKey /** * The donau's (online signing) public key. */ - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; /** * Meta data about the signing key, such as validity periods. */ - struct TALER_DONAUDB_SignkeyMetaData meta; + struct DONAUDB_SignkeyMetaData meta; /** * The long-term offline master key's signature for this signing key. @@ -1639,7 +1639,7 @@ helper_esign_cb ( void *cls, struct GNUNET_TIME_Timestamp start_time, struct GNUNET_TIME_Relative validity_duration, - const struct TALER_DonauPublicKeyP *donau_pub, + const struct DONAU_DonauPublicKeyP *donau_pub, const struct TALER_SecurityModulePublicKeyP *sm_pub, const struct TALER_SecurityModuleSignatureP *sm_sig) { @@ -1951,7 +1951,7 @@ denomination_info_cb ( void *cls, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_DenominationHashP *h_denom_pub, - const struct TALER_DONAUDB_DenominationKeyMetaData *meta, + const struct DONAUDB_DenominationKeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig, bool recoup_possible) { @@ -2015,8 +2015,8 @@ denomination_info_cb ( static void signkey_info_cb ( void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - const struct TALER_DONAUDB_SignkeyMetaData *meta, + const struct DONAU_DonauPublicKeyP *donau_pub, + const struct DONAUDB_SignkeyMetaData *meta, const struct TALER_MasterSignatureP *master_sig) { struct TEH_KeyStateHandle *ksh = cls; @@ -2428,9 +2428,9 @@ create_krd (struct TEH_KeyStateHandle *ksh, const struct GNUNET_HashCode *h_grouped) { struct KeysResponseData krd; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_DonauSignatureP donau_sig; - struct TALER_DonauPublicKeyP grouped_donau_pub; + struct DONAU_DonauPublicKeyP grouped_donau_pub; struct TALER_DonauSignatureP grouped_donau_sig; struct WireStateHandle *wsh; json_t *keys; @@ -3762,7 +3762,7 @@ TEH_keys_denomination_revoke (const struct TALER_DenominationHashP *h_denom_pub) enum TALER_ErrorCode TEH_keys_donau_sign_ ( const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, - struct TALER_DonauPublicKeyP *pub, + struct DONAU_DonauPublicKeyP *pub, struct TALER_DonauSignatureP *sig) { struct TEH_KeyStateHandle *ksh; @@ -3787,7 +3787,7 @@ enum TALER_ErrorCode TEH_keys_donau_sign2_ ( void *cls, const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, - struct TALER_DonauPublicKeyP *pub, + struct DONAU_DonauPublicKeyP *pub, struct TALER_DonauSignatureP *sig) { struct TEH_KeyStateHandle *ksh = cls; @@ -3828,7 +3828,7 @@ TEH_keys_donau_sign2_ ( void -TEH_keys_donau_revoke (const struct TALER_DonauPublicKeyP *donau_pub) +TEH_keys_donau_revoke (const struct DONAU_DonauPublicKeyP *donau_pub) { struct TEH_KeyStateHandle *ksh; @@ -4012,7 +4012,7 @@ TEH_keys_get_handler (struct TEH_RequestContext *rc, */ static enum GNUNET_GenericReturnValue load_extension_data (const char *section_name, - struct TALER_DONAUDB_DenominationKeyMetaData *meta) + struct DONAUDB_DenominationKeyMetaData *meta) { struct GNUNET_TIME_Relative deposit_duration; struct GNUNET_TIME_Relative legal_duration; @@ -4083,7 +4083,7 @@ enum GNUNET_GenericReturnValue TEH_keys_load_fees (struct TEH_KeyStateHandle *ksh, const struct TALER_DenominationHashP *h_denom_pub, struct TALER_DenominationPublicKey *denom_pub, - struct TALER_DONAUDB_DenominationKeyMetaData *meta) + struct DONAUDB_DenominationKeyMetaData *meta) { struct HelperDenomination *hd; enum GNUNET_GenericReturnValue ok; @@ -4123,8 +4123,8 @@ TEH_keys_load_fees (struct TEH_KeyStateHandle *ksh, enum GNUNET_GenericReturnValue -TEH_keys_get_timing (const struct TALER_DonauPublicKeyP *donau_pub, - struct TALER_DONAUDB_SignkeyMetaData *meta) +TEH_keys_get_timing (const struct DONAU_DonauPublicKeyP *donau_pub, + struct DONAUDB_SignkeyMetaData *meta) { struct TEH_KeyStateHandle *ksh; struct HelperSignkey *hsk; @@ -4194,7 +4194,7 @@ add_future_denomkey_cb (void *cls, struct FutureBuilderContext *fbc = cls; struct HelperDenomination *hd = value; struct TEH_DenominationKey *dk; - struct TALER_DONAUDB_DenominationKeyMetaData meta = {0}; + struct DONAUDB_DenominationKeyMetaData meta = {0}; dk = GNUNET_CONTAINER_multihashmap_get (fbc->ksh->denomkey_map, h_denom_pub); diff --git a/src/donau/donau-httpd_keys.h b/src/donau/donau-httpd_keys.h @@ -24,8 +24,8 @@ #include "taler-donau-httpd_responses.h" -#ifndef TALER_DONAU_HTTPD_KEYS_H -#define TALER_DONAU_HTTPD_KEYS_H +#ifndef DONAU_HTTPD_KEYS_H +#define DONAU_HTTPD_KEYS_H /** * Signatures of an auditor over a denomination key of this donau. @@ -55,7 +55,7 @@ struct TEH_DenominationKey * Meta data about the type of the denomination, such as fees and validity * periods. */ - struct TALER_DONAUDB_DenominationKeyMetaData meta; + struct DONAUDB_DenominationKeyMetaData meta; /** * The long-term offline master key's signature for this denomination. @@ -430,7 +430,7 @@ TEH_resume_keys_requests (bool do_shutdown); enum TALER_ErrorCode TEH_keys_donau_sign_ ( const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, - struct TALER_DonauPublicKeyP *pub, + struct DONAU_DonauPublicKeyP *pub, struct TALER_DonauSignatureP *sig); @@ -452,7 +452,7 @@ enum TALER_ErrorCode TEH_keys_donau_sign2_ ( void *cls, const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose, - struct TALER_DonauPublicKeyP *pub, + struct DONAU_DonauPublicKeyP *pub, struct TALER_DonauSignatureP *sig); @@ -529,7 +529,7 @@ TEH_keys_donau_sign2_ ( * @param donau_pub key to revoke */ void -TEH_keys_donau_revoke (const struct TALER_DonauPublicKeyP *donau_pub); +TEH_keys_donau_revoke (const struct DONAU_DonauPublicKeyP *donau_pub); /** @@ -575,7 +575,7 @@ enum GNUNET_GenericReturnValue TEH_keys_load_fees (struct TEH_KeyStateHandle *ksh, const struct TALER_DenominationHashP *h_denom_pub, struct TALER_DenominationPublicKey *denom_pub, - struct TALER_DONAUDB_DenominationKeyMetaData *meta); + struct DONAUDB_DenominationKeyMetaData *meta); /** @@ -586,8 +586,8 @@ TEH_keys_load_fees (struct TEH_KeyStateHandle *ksh, * @return #GNUNET_OK on success */ enum GNUNET_GenericReturnValue -TEH_keys_get_timing (const struct TALER_DonauPublicKeyP *donau_pub, - struct TALER_DONAUDB_SignkeyMetaData *meta); +TEH_keys_get_timing (const struct DONAU_DonauPublicKeyP *donau_pub, + struct DONAUDB_SignkeyMetaData *meta); /** diff --git a/src/donau/donau-httpd_metrics.h b/src/donau/donau-httpd_metrics.h @@ -18,8 +18,8 @@ * @brief Handle /metrics requests * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_METRICS_H -#define TALER_DONAU_HTTPD_METRICS_H +#ifndef DONAU_HTTPD_METRICS_H +#define DONAU_HTTPD_METRICS_H #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> diff --git a/src/donau/donau-httpd_mhd.c b/src/donau/donau-httpd_mhd.c @@ -16,7 +16,7 @@ /** * @file taler-donau-httpd_mhd.c - * @brief helpers for MHD interaction; these are TALER_DONAU_handler_ functions + * @brief helpers for MHD interaction; these are DONAU_handler_ functions * that generate simple MHD replies that do not require any real operations * to be performed (error handling, static pages, etc.) * @author Florian Dold diff --git a/src/donau/donau-httpd_mhd.h b/src/donau/donau-httpd_mhd.h @@ -21,8 +21,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_MHD_H -#define TALER_DONAU_HTTPD_MHD_H +#ifndef DONAU_HTTPD_MHD_H +#define DONAU_HTTPD_MHD_H #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> #include "taler-donau-httpd.h" diff --git a/src/donau/donau-httpd_responses.c b/src/donau/donau-httpd_responses.c @@ -42,7 +42,7 @@ json_t * TEH_RESPONSE_compile_transaction_history ( const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_DONAUDB_TransactionList *tl) + const struct DONAUDB_TransactionList *tl) { json_t *history; @@ -52,15 +52,15 @@ TEH_RESPONSE_compile_transaction_history ( GNUNET_break (0); /* out of memory!? */ return NULL; } - for (const struct TALER_DONAUDB_TransactionList *pos = tl; + for (const struct DONAUDB_TransactionList *pos = tl; NULL != pos; pos = pos->next) { switch (pos->type) { - case TALER_DONAUDB_TT_DEPOSIT: + case DONAUDB_TT_DEPOSIT: { - const struct TALER_DONAUDB_DepositListEntry *deposit = + const struct DONAUDB_DepositListEntry *deposit = pos->details.deposit; struct TALER_CharityWireHashP h_wire; @@ -131,9 +131,9 @@ TEH_RESPONSE_compile_transaction_history ( } break; } - case TALER_DONAUDB_TT_MELT: + case DONAUDB_TT_MELT: { - const struct TALER_DONAUDB_MeltListEntry *melt = + const struct DONAUDB_MeltListEntry *melt = pos->details.melt; const struct TALER_AgeCommitmentHash *phac = NULL; @@ -184,9 +184,9 @@ TEH_RESPONSE_compile_transaction_history ( } } break; - case TALER_DONAUDB_TT_REFUND: + case DONAUDB_TT_REFUND: { - const struct TALER_DONAUDB_RefundListEntry *refund = + const struct DONAUDB_RefundListEntry *refund = pos->details.refund; struct TALER_Amount value; @@ -240,11 +240,11 @@ TEH_RESPONSE_compile_transaction_history ( } } break; - case TALER_DONAUDB_TT_OLD_COIN_RECOUP: + case DONAUDB_TT_OLD_COIN_RECOUP: { - struct TALER_DONAUDB_RecoupRefreshListEntry *pr = + struct DONAUDB_RecoupRefreshListEntry *pr = pos->details.old_coin_recoup; - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; if (TALER_EC_NONE != @@ -289,11 +289,11 @@ TEH_RESPONSE_compile_transaction_history ( } break; } - case TALER_DONAUDB_TT_RECOUP: + case DONAUDB_TT_RECOUP: { - const struct TALER_DONAUDB_RecoupListEntry *recoup = + const struct DONAUDB_RecoupListEntry *recoup = pos->details.recoup; - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; if (TALER_EC_NONE != @@ -339,11 +339,11 @@ TEH_RESPONSE_compile_transaction_history ( } } break; - case TALER_DONAUDB_TT_RECOUP_REFRESH: + case DONAUDB_TT_RECOUP_REFRESH: { - struct TALER_DONAUDB_RecoupRefreshListEntry *pr = + struct DONAUDB_RecoupRefreshListEntry *pr = pos->details.recoup_refresh; - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; if (TALER_EC_NONE != @@ -393,9 +393,9 @@ TEH_RESPONSE_compile_transaction_history ( break; } - case TALER_DONAUDB_TT_PURSE_DEPOSIT: + case DONAUDB_TT_PURSE_DEPOSIT: { - struct TALER_DONAUDB_PurseDepositListEntry *pd + struct DONAUDB_PurseDepositListEntry *pd = pos->details.purse_deposit; const struct TALER_AgeCommitmentHash *phac = NULL; @@ -431,13 +431,13 @@ TEH_RESPONSE_compile_transaction_history ( break; } - case TALER_DONAUDB_TT_PURSE_REFUND: + case DONAUDB_TT_PURSE_REFUND: { - const struct TALER_DONAUDB_PurseRefundListEntry *prefund = + const struct DONAUDB_PurseRefundListEntry *prefund = pos->details.purse_refund; struct TALER_Amount value; enum TALER_ErrorCode ec; - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; if (0 > @@ -487,9 +487,9 @@ TEH_RESPONSE_compile_transaction_history ( } break; - case TALER_DONAUDB_TT_RESERVE_OPEN: + case DONAUDB_TT_RESERVE_OPEN: { - struct TALER_DONAUDB_ReserveOpenListEntry *role + struct DONAUDB_ReserveOpenListEntry *role = pos->details.reserve_open; if (0 != @@ -522,7 +522,7 @@ TEH_RESPONSE_reply_unknown_denom_pub_hash ( struct MHD_Connection *connection, const struct TALER_DenominationHashP *dph) { - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; struct GNUNET_TIME_Timestamp now; enum TALER_ErrorCode ec; @@ -564,7 +564,7 @@ TEH_RESPONSE_reply_expired_denom_pub_hash ( enum TALER_ErrorCode ec, const char *oper) { - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; enum TALER_ErrorCode ecr; struct GNUNET_TIME_Timestamp now @@ -607,7 +607,7 @@ TEH_RESPONSE_reply_invalid_denom_cipher_for_operation ( struct MHD_Connection *connection, const struct TALER_DenominationHashP *dph) { - struct TALER_DonauPublicKeyP epub; + struct DONAU_DonauPublicKeyP epub; struct TALER_DonauSignatureP esig; struct GNUNET_TIME_Timestamp now; enum TALER_ErrorCode ec; @@ -650,7 +650,7 @@ TEH_RESPONSE_reply_coin_insufficient_funds ( const struct TALER_DenominationHashP *h_denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub) { - struct TALER_DONAUDB_TransactionList *tl; + struct DONAUDB_TransactionList *tl; enum GNUNET_DB_QueryStatus qs; json_t *history; @@ -705,21 +705,21 @@ TEH_RESPONSE_reply_coin_insufficient_funds ( json_t * TEH_RESPONSE_compile_reserve_history ( - const struct TALER_DONAUDB_ReserveHistory *rh) + const struct DONAUDB_ReserveHistory *rh) { json_t *json_history; json_history = json_array (); GNUNET_assert (NULL != json_history); - for (const struct TALER_DONAUDB_ReserveHistory *pos = rh; + for (const struct DONAUDB_ReserveHistory *pos = rh; NULL != pos; pos = pos->next) { switch (pos->type) { - case TALER_DONAUDB_RO_BANK_TO_DONAU: + case DONAUDB_RO_BANK_TO_DONAU: { - const struct TALER_DONAUDB_BankTransfer *bank = + const struct DONAUDB_BankTransfer *bank = pos->details.bank; if (0 != @@ -743,9 +743,9 @@ TEH_RESPONSE_compile_reserve_history ( } break; } - case TALER_DONAUDB_RO_WITHDRAW_COIN: + case DONAUDB_RO_WITHDRAW_COIN: { - const struct TALER_DONAUDB_CollectableBlindcoin *withdraw + const struct DONAUDB_CollectableBlindcoin *withdraw = pos->details.withdraw; if (0 != @@ -771,11 +771,11 @@ TEH_RESPONSE_compile_reserve_history ( } } break; - case TALER_DONAUDB_RO_RECOUP_COIN: + case DONAUDB_RO_RECOUP_COIN: { - const struct TALER_DONAUDB_Recoup *recoup + const struct DONAUDB_Recoup *recoup = pos->details.recoup; - struct TALER_DonauPublicKeyP pub; + struct DONAU_DonauPublicKeyP pub; struct TALER_DonauSignatureP sig; if (TALER_EC_NONE != @@ -816,11 +816,11 @@ TEH_RESPONSE_compile_reserve_history ( } } break; - case TALER_DONAUDB_RO_DONAU_TO_BANK: + case DONAUDB_RO_DONAU_TO_BANK: { - const struct TALER_DONAUDB_ClosingTransfer *closing = + const struct DONAUDB_ClosingTransfer *closing = pos->details.closing; - struct TALER_DonauPublicKeyP pub; + struct DONAU_DonauPublicKeyP pub; struct TALER_DonauSignatureP sig; if (TALER_EC_NONE != @@ -866,9 +866,9 @@ TEH_RESPONSE_compile_reserve_history ( } } break; - case TALER_DONAUDB_RO_PURSE_MERGE: + case DONAUDB_RO_PURSE_MERGE: { - const struct TALER_DONAUDB_PurseMerge *merge = + const struct DONAUDB_PurseMerge *merge = pos->details.merge; if (0 != @@ -906,9 +906,9 @@ TEH_RESPONSE_compile_reserve_history ( } } break; - case TALER_DONAUDB_RO_HISTORY_REQUEST: + case DONAUDB_RO_HISTORY_REQUEST: { - const struct TALER_DONAUDB_HistoryRequest *history = + const struct DONAUDB_HistoryRequest *history = pos->details.history; if (0 != @@ -931,9 +931,9 @@ TEH_RESPONSE_compile_reserve_history ( } break; - case TALER_DONAUDB_RO_OPEN_REQUEST: + case DONAUDB_RO_OPEN_REQUEST: { - const struct TALER_DONAUDB_OpenRequest *orq = + const struct DONAUDB_OpenRequest *orq = pos->details.open_request; if (0 != @@ -960,9 +960,9 @@ TEH_RESPONSE_compile_reserve_history ( } break; - case TALER_DONAUDB_RO_CLOSE_REQUEST: + case DONAUDB_RO_CLOSE_REQUEST: { - const struct TALER_DONAUDB_CloseRequest *crq = + const struct DONAUDB_CloseRequest *crq = pos->details.close_request; if (0 != @@ -1013,7 +1013,7 @@ reply_reserve_insufficient_funds ( enum TALER_ErrorCode ec, const struct TALER_Amount *ebalance, const struct TALER_Amount *withdraw_amount, - const struct TALER_DONAUDB_ReserveHistory *rh) + const struct DONAUDB_ReserveHistory *rh) { json_t *json_history; @@ -1047,7 +1047,7 @@ TEH_RESPONSE_reply_reserve_insufficient_balance ( const struct TALER_Amount *balance_required, const struct TALER_ReservePublicKeyP *reserve_pub) { - struct TALER_DONAUDB_ReserveHistory *rh = NULL; + struct DONAUDB_ReserveHistory *rh = NULL; struct TALER_Amount balance; enum GNUNET_DB_QueryStatus qs; MHD_RESULT mhd_ret; @@ -1111,7 +1111,7 @@ TEH_RESPONSE_reply_purse_created ( const struct TALER_Amount *purse_balance, const struct TEH_PurseDetails *pd) { - struct TALER_DonauPublicKeyP pub; + struct DONAU_DonauPublicKeyP pub; struct TALER_DonauSignatureP sig; enum TALER_ErrorCode ec; @@ -1149,7 +1149,7 @@ TEH_RESPONSE_reply_purse_created ( MHD_RESULT TEH_RESPONSE_reply_kyc_required (struct MHD_Connection *connection, const struct TALER_PaytoHashP *h_payto, - const struct TALER_DONAUDB_KycStatus *kyc) + const struct DONAUDB_KycStatus *kyc) { return TALER_MHD_REPLY_JSON_PACK ( connection, diff --git a/src/donau/donau-httpd_responses.h b/src/donau/donau-httpd_responses.h @@ -22,8 +22,8 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_RESPONSES_H -#define TALER_DONAU_HTTPD_RESPONSES_H +#ifndef DONAU_HTTPD_RESPONSES_H +#define DONAU_HTTPD_RESPONSES_H #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <microhttpd.h> @@ -41,7 +41,7 @@ */ json_t * TEH_RESPONSE_compile_reserve_history ( - const struct TALER_DONAUDB_ReserveHistory *rh); + const struct DONAUDB_ReserveHistory *rh); /** @@ -102,7 +102,7 @@ TEH_RESPONSE_reply_reserve_age_restriction_required ( MHD_RESULT TEH_RESPONSE_reply_kyc_required (struct MHD_Connection *connection, const struct TALER_PaytoHashP *h_payto, - const struct TALER_DONAUDB_KycStatus *kyc); + const struct DONAUDB_KycStatus *kyc); /** @@ -223,7 +223,7 @@ TEH_RESPONSE_reply_purse_created ( json_t * TEH_RESPONSE_compile_transaction_history ( const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_DONAUDB_TransactionList *tl); + const struct DONAUDB_TransactionList *tl); #endif diff --git a/src/donau/donau-httpd_submit_receipts_get.c b/src/donau/donau-httpd_submit_receipts_get.c @@ -72,7 +72,7 @@ struct DepositWtidContext * The Charity's public key. The deposit inquiry request is to be * signed by the corresponding private key (using EdDSA). */ - struct TALER_CharityPublicKeyP charity; + struct DONAU_CharityPublicKeyP charity; /** * The coin's public key. This is the value that must have been @@ -88,7 +88,7 @@ struct DepositWtidContext /** * Signature by the charity. */ - struct TALER_CharitySignatureP charity_sig; + struct DONAU_CharitySignatureP charity_sig; /** @@ -120,7 +120,7 @@ struct DepositWtidContext /** * KYC status information for the receiving account. */ - struct TALER_DONAUDB_KycStatus kyc; + struct DONAUDB_KycStatus kyc; /** * AML status information for the receiving account. @@ -185,7 +185,7 @@ reply_deposit_details ( struct MHD_Connection *connection, const struct DepositWtidContext *ctx) { - struct TALER_DonauPublicKeyP pub; + struct DONAU_DonauPublicKeyP pub; struct TALER_DonauSignatureP sig; enum TALER_ErrorCode ec; diff --git a/src/donau/donau-httpd_submit_receipts_get.h b/src/donau/donau-httpd_submit_receipts_get.h @@ -18,8 +18,8 @@ * @brief Handle wire transfer tracking-related requests * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_DEPOSITS_GET_H -#define TALER_DONAU_HTTPD_DEPOSITS_GET_H +#ifndef DONAU_HTTPD_DEPOSITS_GET_H +#define DONAU_HTTPD_DEPOSITS_GET_H #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> diff --git a/src/donau/donau-httpd_terms.h b/src/donau/donau-httpd_terms.h @@ -18,8 +18,8 @@ * @brief Handle /terms requests to return the terms of service * @author Christian Grothoff */ -#ifndef TALER_DONAU_HTTPD_TERMS_H -#define TALER_DONAU_HTTPD_TERMS_H +#ifndef DONAU_HTTPD_TERMS_H +#define DONAU_HTTPD_TERMS_H #include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> diff --git a/src/donaudb/donaudb_plugin.c b/src/donaudb/donaudb_plugin.c @@ -24,12 +24,12 @@ #include <ltdl.h> -struct TALER_DONAUDB_Plugin * -TALER_DONAUDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg) +struct DONAUDB_Plugin * +DONAUDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg) { char *plugin_name; char *lib_name; - struct TALER_DONAUDB_Plugin *plugin; + struct DONAUDB_Plugin *plugin; if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, @@ -57,7 +57,7 @@ TALER_DONAUDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg) void -TALER_DONAUDB_plugin_unload (struct TALER_DONAUDB_Plugin *plugin) +DONAUDB_plugin_unload (struct DONAUDB_Plugin *plugin) { char *lib_name; diff --git a/src/donaudb/donaudb_transactions.c b/src/donaudb/donaudb_transactions.c @@ -23,8 +23,8 @@ enum GNUNET_GenericReturnValue -TALER_DONAUDB_calculate_transaction_list_totals ( - struct TALER_DONAUDB_TransactionList *tl, +DONAUDB_calculate_transaction_list_totals ( + struct DONAUDB_TransactionList *tl, const struct TALER_Amount *off, struct TALER_Amount *ret) { @@ -37,13 +37,13 @@ TALER_DONAUDB_calculate_transaction_list_totals ( TALER_amount_set_zero (spent.currency, &refunded)); have_refund = false; - for (struct TALER_DONAUDB_TransactionList *pos = tl; + for (struct DONAUDB_TransactionList *pos = tl; NULL != pos; pos = pos->next) { switch (pos->type) { - case TALER_DONAUDB_TT_DEPOSIT: + case DONAUDB_TT_DEPOSIT: /* spent += pos->amount_with_fee */ if (0 > TALER_amount_add (&spent, @@ -55,7 +55,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( } deposit_fee = pos->details.deposit->deposit_fee; break; - case TALER_DONAUDB_TT_MELT: + case DONAUDB_TT_MELT: /* spent += pos->amount_with_fee */ if (0 > TALER_amount_add (&spent, @@ -66,7 +66,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( return GNUNET_SYSERR; } break; - case TALER_DONAUDB_TT_REFUND: + case DONAUDB_TT_REFUND: /* refunded += pos->refund_amount - pos->refund_fee */ if (0 > TALER_amount_add (&refunded, @@ -86,7 +86,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( } have_refund = true; break; - case TALER_DONAUDB_TT_OLD_COIN_RECOUP: + case DONAUDB_TT_OLD_COIN_RECOUP: /* refunded += pos->value */ if (0 > TALER_amount_add (&refunded, @@ -97,7 +97,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( return GNUNET_SYSERR; } break; - case TALER_DONAUDB_TT_RECOUP: + case DONAUDB_TT_RECOUP: /* spent += pos->value */ if (0 > TALER_amount_add (&spent, @@ -108,7 +108,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( return GNUNET_SYSERR; } break; - case TALER_DONAUDB_TT_RECOUP_REFRESH: + case DONAUDB_TT_RECOUP_REFRESH: /* spent += pos->value */ if (0 > TALER_amount_add (&spent, @@ -119,7 +119,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( return GNUNET_SYSERR; } break; - case TALER_DONAUDB_TT_PURSE_DEPOSIT: + case DONAUDB_TT_PURSE_DEPOSIT: /* spent += pos->amount_with_fee */ if (0 > TALER_amount_add (&spent, @@ -131,7 +131,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( } deposit_fee = pos->details.purse_deposit->deposit_fee; break; - case TALER_DONAUDB_TT_PURSE_REFUND: + case DONAUDB_TT_PURSE_REFUND: /* refunded += pos->refund_amount - pos->refund_fee */ if (0 > TALER_amount_add (&refunded, @@ -151,7 +151,7 @@ TALER_DONAUDB_calculate_transaction_list_totals ( } have_refund = true; break; - case TALER_DONAUDB_TT_RESERVE_OPEN: + case DONAUDB_TT_RESERVE_OPEN: /* spent += pos->amount_with_fee */ if (0 > TALER_amount_add (&spent, diff --git a/src/donaudb/pg_get_donation_unit_info.c b/src/donaudb/pg_get_donation_unit_info.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2022 Taler Systems SA + Copyright (C) 2023 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -16,7 +16,7 @@ /** * @file donaudb/pg_get_denomination_info.c * @brief Implementation of the get_denomination_info function for Postgres - * @author Christian Grothoff + * @author Johannes Casaburi */ #include "platform.h" #include "taler_error_codes.h" @@ -30,7 +30,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_get_donation_unit_info ( void *cls, const struct DONAU_DonationUnitHashP *donation_unit_pub_hash, - struct DONAUDB_DenominationKeyMetaData *meta) + struct DONAUDB_DonationUnitKeyMetaData *meta) { struct PostgresClosure *pg = cls; enum GNUNET_DB_QueryStatus qs; diff --git a/src/donaudb/pg_get_donation_unit_info.h b/src/donaudb/pg_get_donation_unit_info.h @@ -35,7 +35,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_get_donation_unit_info ( void *cls, - const struct DONAU_DonationUNitHashP *donation_unit_pub_hash, + const struct DONAU_DonationUnitHashP *donation_unit_pub_hash, struct DONAUDB_DonationUnitKeyMetaData *meta); #endif diff --git a/src/donaudb/pg_insert_submitted_receipt.c b/src/donaudb/pg_insert_submitted_receipt.c @@ -29,7 +29,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_submitted_receipt (void *cls, const struct TALER_TaxNumberHashP *h_tax_number, const struct TALER_CsNonce *nonce, - const struct TALER_DonationUnitPublicKey *donation_unit_pub, + const struct DONAU_DonationUnitPublicKey *donation_unit_pub, const struct TALER_DonauSignatureP *donau_sig, const uint64_t donation_year) { diff --git a/src/donaudb/pg_insert_submitted_receipt.h b/src/donaudb/pg_insert_submitted_receipt.h @@ -40,7 +40,7 @@ enum GNUNET_DB_QueryStatus TEH_PG_insert_submitted_receipt (void *cls, const struct TALER_TaxNumberHashP *h_tax_number, const struct TALER_CsNonce *nonce, - const struct TALER_DonationUnitPublicKey *donation_unit_pub, + const struct DONAU_DonationUnitPublicKey *donation_unit_pub, const struct TALER_DonauSignatureP *donau_sig, const uint64_t donation_year); #endif diff --git a/src/donaudb/plugin_donaudb_common.c b/src/donaudb/plugin_donaudb_common.c @@ -26,76 +26,76 @@ void TEH_COMMON_free_reserve_history ( void *cls, - struct TALER_DONAUDB_ReserveHistory *rh) + struct DONAUDB_ReserveHistory *rh) { (void) cls; while (NULL != rh) { switch (rh->type) { - case TALER_DONAUDB_RO_BANK_TO_DONAU: + case DONAUDB_RO_BANK_TO_DONAU: { - struct TALER_DONAUDB_BankTransfer *bt; + struct DONAUDB_BankTransfer *bt; bt = rh->details.bank; GNUNET_free (bt->sender_account_details); GNUNET_free (bt); break; } - case TALER_DONAUDB_RO_WITHDRAW_COIN: + case DONAUDB_RO_WITHDRAW_COIN: { - struct TALER_DONAUDB_CollectableBlindcoin *cbc; + struct DONAUDB_CollectableBlindcoin *cbc; cbc = rh->details.withdraw; TALER_blinded_denom_sig_free (&cbc->sig); GNUNET_free (cbc); break; } - case TALER_DONAUDB_RO_RECOUP_COIN: + case DONAUDB_RO_RECOUP_COIN: { - struct TALER_DONAUDB_Recoup *recoup; + struct DONAUDB_Recoup *recoup; recoup = rh->details.recoup; TALER_denom_sig_free (&recoup->coin.denom_sig); GNUNET_free (recoup); break; } - case TALER_DONAUDB_RO_DONAU_TO_BANK: + case DONAUDB_RO_DONAU_TO_BANK: { - struct TALER_DONAUDB_ClosingTransfer *closing; + struct DONAUDB_ClosingTransfer *closing; closing = rh->details.closing; GNUNET_free (closing->receiver_account_details); GNUNET_free (closing); break; } - case TALER_DONAUDB_RO_PURSE_MERGE: + case DONAUDB_RO_PURSE_MERGE: { - struct TALER_DONAUDB_PurseMerge *merge; + struct DONAUDB_PurseMerge *merge; merge = rh->details.merge; GNUNET_free (merge); break; } - case TALER_DONAUDB_RO_HISTORY_REQUEST: + case DONAUDB_RO_HISTORY_REQUEST: { - struct TALER_DONAUDB_HistoryRequest *history; + struct DONAUDB_HistoryRequest *history; history = rh->details.history; GNUNET_free (history); break; } - case TALER_DONAUDB_RO_OPEN_REQUEST: + case DONAUDB_RO_OPEN_REQUEST: { - struct TALER_DONAUDB_OpenRequest *or; + struct DONAUDB_OpenRequest *or; or = rh->details.open_request; GNUNET_free (or); break; } - case TALER_DONAUDB_RO_CLOSE_REQUEST: + case DONAUDB_RO_CLOSE_REQUEST: { - struct TALER_DONAUDB_CloseRequest *cr; + struct DONAUDB_CloseRequest *cr; cr = rh->details.close_request; GNUNET_free (cr); @@ -103,7 +103,7 @@ TEH_COMMON_free_reserve_history ( } } { - struct TALER_DONAUDB_ReserveHistory *next; + struct DONAUDB_ReserveHistory *next; next = rh->next; GNUNET_free (rh); @@ -116,69 +116,69 @@ TEH_COMMON_free_reserve_history ( void TEH_COMMON_free_coin_transaction_list ( void *cls, - struct TALER_DONAUDB_TransactionList *tl) + struct DONAUDB_TransactionList *tl) { (void) cls; while (NULL != tl) { switch (tl->type) { - case TALER_DONAUDB_TT_DEPOSIT: + case DONAUDB_TT_DEPOSIT: { - struct TALER_DONAUDB_DepositListEntry *deposit; + struct DONAUDB_DepositListEntry *deposit; deposit = tl->details.deposit; GNUNET_free (deposit->receiver_wire_account); GNUNET_free (deposit); break; } - case TALER_DONAUDB_TT_MELT: + case DONAUDB_TT_MELT: GNUNET_free (tl->details.melt); break; - case TALER_DONAUDB_TT_OLD_COIN_RECOUP: + case DONAUDB_TT_OLD_COIN_RECOUP: { - struct TALER_DONAUDB_RecoupRefreshListEntry *rr; + struct DONAUDB_RecoupRefreshListEntry *rr; rr = tl->details.old_coin_recoup; TALER_denom_sig_free (&rr->coin.denom_sig); GNUNET_free (rr); break; } - case TALER_DONAUDB_TT_REFUND: + case DONAUDB_TT_REFUND: GNUNET_free (tl->details.refund); break; - case TALER_DONAUDB_TT_RECOUP: + case DONAUDB_TT_RECOUP: GNUNET_free (tl->details.recoup); break; - case TALER_DONAUDB_TT_RECOUP_REFRESH: + case DONAUDB_TT_RECOUP_REFRESH: { - struct TALER_DONAUDB_RecoupRefreshListEntry *rr; + struct DONAUDB_RecoupRefreshListEntry *rr; rr = tl->details.recoup_refresh; TALER_denom_sig_free (&rr->coin.denom_sig); GNUNET_free (rr); break; } - case TALER_DONAUDB_TT_PURSE_DEPOSIT: + case DONAUDB_TT_PURSE_DEPOSIT: { - struct TALER_DONAUDB_PurseDepositListEntry *deposit; + struct DONAUDB_PurseDepositListEntry *deposit; deposit = tl->details.purse_deposit; GNUNET_free (deposit->donau_base_url); GNUNET_free (deposit); break; } - case TALER_DONAUDB_TT_PURSE_REFUND: + case DONAUDB_TT_PURSE_REFUND: { - struct TALER_DONAUDB_PurseRefundListEntry *prefund; + struct DONAUDB_PurseRefundListEntry *prefund; prefund = tl->details.purse_refund; GNUNET_free (prefund); break; } - case TALER_DONAUDB_TT_RESERVE_OPEN: + case DONAUDB_TT_RESERVE_OPEN: { - struct TALER_DONAUDB_ReserveOpenListEntry *role; + struct DONAUDB_ReserveOpenListEntry *role; role = tl->details.reserve_open; GNUNET_free (role); @@ -186,7 +186,7 @@ TEH_COMMON_free_coin_transaction_list ( } } { - struct TALER_DONAUDB_TransactionList *next; + struct DONAUDB_TransactionList *next; next = tl->next; GNUNET_free (tl); diff --git a/src/donaudb/plugin_donaudb_common.h b/src/donaudb/plugin_donaudb_common.h @@ -34,7 +34,7 @@ void TEH_COMMON_free_reserve_history ( void *cls, - struct TALER_DONAUDB_ReserveHistory *rh); + struct DONAUDB_ReserveHistory *rh); /** @@ -46,6 +46,6 @@ TEH_COMMON_free_reserve_history ( void TEH_COMMON_free_coin_transaction_list ( void *cls, - struct TALER_DONAUDB_TransactionList *tl); + struct DONAUDB_TransactionList *tl); #endif diff --git a/src/donaudb/plugin_donaudb_postgres.c b/src/donaudb/plugin_donaudb_postgres.c @@ -306,14 +306,14 @@ TEH_PG_internal_setup (struct PostgresClosure *pg) * * @param cls a configuration instance * @return NULL on error, otherwise a `struct - * TALER_DONAUDB_Plugin` + * DONAUDB_Plugin` */ void * libtaler_plugin_donaudb_postgres_init (void *cls) { const struct GNUNET_CONFIGURATION_Handle *cfg = cls; struct PostgresClosure *pg; - struct TALER_DONAUDB_Plugin *plugin; + struct DONAUDB_Plugin *plugin; unsigned long long dpl; pg = GNUNET_new (struct PostgresClosure); @@ -407,7 +407,7 @@ libtaler_plugin_donaudb_postgres_init (void *cls) GNUNET_free (pg); return NULL; } - plugin = GNUNET_new (struct TALER_DONAUDB_Plugin); + plugin = GNUNET_new (struct DONAUDB_Plugin); plugin->cls = pg; plugin->do_reserve_open = &TEH_PG_do_reserve_open; @@ -780,13 +780,13 @@ libtaler_plugin_donaudb_postgres_init (void *cls) /** * Shutdown Postgres database subsystem. * - * @param cls a `struct TALER_DONAUDB_Plugin` + * @param cls a `struct DONAUDB_Plugin` * @return NULL (always) */ void * libtaler_plugin_donaudb_postgres_done (void *cls) { - struct TALER_DONAUDB_Plugin *plugin = cls; + struct DONAUDB_Plugin *plugin = cls; struct PostgresClosure *pg = plugin->cls; if (NULL != pg->conn) diff --git a/src/donaudb/test_donaudb.c b/src/donaudb/test_donaudb.c @@ -62,7 +62,7 @@ static int result; /** * Database plugin under test. */ -static struct TALER_DONAUDB_Plugin *plugin; +static struct DONAUDB_Plugin *plugin; /** @@ -219,7 +219,7 @@ check_reserve (const struct TALER_ReservePublicKeyP *pub, uint32_t fraction, const char *currency) { - struct TALER_DONAUDB_Reserve reserve; + struct DONAUDB_Reserve reserve; reserve.pub = *pub; FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != @@ -271,8 +271,8 @@ create_denom_key_pair (unsigned int size, const struct TALER_DenomFeeSet *fees) { struct DenomKeyPair *dkp; - struct TALER_DONAUDB_DenominationKey dki; - struct TALER_DONAUDB_DenominationKeyInformation issue2; + struct DONAUDB_DenominationKey dki; + struct DONAUDB_DenominationKeyInformation issue2; dkp = GNUNET_new (struct DenomKeyPair); GNUNET_assert (GNUNET_OK == @@ -284,7 +284,7 @@ create_denom_key_pair (unsigned int size, are not properly initialized for this test. */ memset (&dki, 0, - sizeof (struct TALER_DONAUDB_DenominationKey)); + sizeof (struct DONAUDB_DenominationKey)); dki.denom_pub = dkp->pub; dki.issue.start = now; dki.issue.expire_withdraw @@ -359,7 +359,7 @@ static struct TALER_Amount amount_with_fee; */ #define RSA_KEY_SIZE 1024 -static struct TALER_DONAUDB_RefreshRevealedCoin *revealed_coins; +static struct DONAUDB_RefreshRevealedCoin *revealed_coins; static struct TALER_TransferPrivateKeyP tprivs[TALER_CNC_KAPPA]; @@ -378,7 +378,7 @@ static struct TALER_TransferPublicKeyP tpub; static void never_called_cb (void *cls, uint32_t num_freshcoins, - const struct TALER_DONAUDB_RefreshRevealedCoin *rrcs) + const struct DONAUDB_RefreshRevealedCoin *rrcs) { (void) cls; (void) num_freshcoins; @@ -400,15 +400,15 @@ static void check_refresh_reveal_cb ( void *cls, uint32_t num_freshcoins, - const struct TALER_DONAUDB_RefreshRevealedCoin *rrcs) + const struct DONAUDB_RefreshRevealedCoin *rrcs) { (void) cls; /* compare the refresh commit coin arrays */ for (unsigned int cnt = 0; cnt < num_freshcoins; cnt++) { - const struct TALER_DONAUDB_RefreshRevealedCoin *acoin = + const struct DONAUDB_RefreshRevealedCoin *acoin = &revealed_coins[cnt]; - const struct TALER_DONAUDB_RefreshRevealedCoin *bcoin = &rrcs[cnt]; + const struct DONAUDB_RefreshRevealedCoin *bcoin = &rrcs[cnt]; GNUNET_assert (0 == TALER_blinded_planchet_cmp (&acoin->blinded_planchet, @@ -487,11 +487,11 @@ static struct DenomKeyPair **new_dkp; static void handle_link_data_cb (void *cls, const struct TALER_TransferPublicKeyP *transfer_pub, - const struct TALER_DONAUDB_LinkList *ldl) + const struct DONAUDB_LinkList *ldl) { (void) cls; (void) transfer_pub; - for (const struct TALER_DONAUDB_LinkList *ldlp = ldl; + for (const struct DONAUDB_LinkList *ldlp = ldl; NULL != ldlp; ldlp = ldlp->next) { @@ -522,7 +522,7 @@ handle_link_data_cb (void *cls, static void cb_wt_never (void *cls, uint64_t serial_id, - const struct TALER_CharityPublicKeyP *charity_pub, + const struct DONAU_CharityPublicKeyP *charity_pub, const char *account_payto_uri, const struct TALER_PaytoHashP *h_payto, struct GNUNET_TIME_Timestamp exec_time, @@ -547,7 +547,7 @@ cb_wt_never (void *cls, } -static struct TALER_CharityPublicKeyP charity_pub_wt; +static struct DONAU_CharityPublicKeyP charity_pub_wt; static struct TALER_CharityWireHashP h_wire_wt; static struct TALER_PrivateContractHashP h_contract_terms_wt; static struct TALER_CoinSpendPublicKeyP coin_pub_wt; @@ -564,7 +564,7 @@ static struct TALER_WireTransferIdentifierRawP wire_out_wtid; static void cb_wt_check (void *cls, uint64_t rowid, - const struct TALER_CharityPublicKeyP *charity_pub, + const struct DONAU_CharityPublicKeyP *charity_pub, const char *account_payto_uri, const struct TALER_PaytoHashP *h_payto, struct GNUNET_TIME_Timestamp exec_time, @@ -617,7 +617,7 @@ static enum GNUNET_GenericReturnValue audit_deposit_cb (void *cls, uint64_t rowid, struct GNUNET_TIME_Timestamp donau_timestamp, - const struct TALER_DONAUDB_Deposit *deposit, + const struct DONAUDB_Deposit *deposit, const struct TALER_DenominationPublicKey *denom_pub, bool done) { @@ -654,8 +654,8 @@ audit_refund_cb (void *cls, uint64_t rowid, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_CharityPublicKeyP *charity_pub, - const struct TALER_CharitySignatureP *charity_sig, + const struct DONAU_CharityPublicKeyP *charity_pub, + const struct DONAU_CharitySignatureP *charity_sig, const struct TALER_PrivateContractHashP *h_contract_terms, uint64_t rtransaction_id, bool full_refund, @@ -756,7 +756,7 @@ test_gc (void) struct DenomKeyPair *dkp; struct GNUNET_TIME_Timestamp now; struct GNUNET_TIME_Timestamp past; - struct TALER_DONAUDB_DenominationKeyInformation issue2; + struct DONAUDB_DenominationKeyInformation issue2; struct TALER_DenominationHashP denom_hash; now = GNUNET_TIME_timestamp_get (); @@ -934,9 +934,9 @@ audit_wire_cb (void *cls, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -test_wire_out (const struct TALER_DONAUDB_BatchDeposit *bd) +test_wire_out (const struct DONAUDB_BatchDeposit *bd) { - const struct TALER_DONAUDB_CoinDepositInformation *deposit = &bd->cdis[0]; + const struct DONAUDB_CoinDepositInformation *deposit = &bd->cdis[0]; struct TALER_PaytoHashP h_payto; GNUNET_assert (0 < bd->num_cdis); @@ -982,7 +982,7 @@ test_wire_out (const struct TALER_DONAUDB_BatchDeposit *bd) struct TALER_Amount coin_contribution2; struct TALER_Amount coin_fee2; struct GNUNET_TIME_Timestamp execution_time2; - struct TALER_DONAUDB_KycStatus kyc; + struct DONAUDB_KycStatus kyc; enum TALER_AmlDecisionState aml; h_contract_terms_wt2.hash.bits[0]++; @@ -1029,7 +1029,7 @@ test_wire_out (const struct TALER_DONAUDB_BatchDeposit *bd) struct TALER_Amount coin_contribution2; struct TALER_Amount coin_fee2; struct GNUNET_TIME_Timestamp execution_time2; - struct TALER_DONAUDB_KycStatus kyc; + struct DONAUDB_KycStatus kyc; enum TALER_AmlDecisionState aml = TALER_AML_FROZEN; FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != @@ -1116,7 +1116,7 @@ drop: * Function called on deposits that are past their due date * and have not yet seen a wire transfer. * - * @param cls closure a `struct TALER_DONAUDB_Deposit *` + * @param cls closure a `struct DONAUDB_Deposit *` * @param rowid deposit table row of the coin's deposit * @param coin_pub public key of the coin * @param amount value of the deposit, including fee @@ -1133,7 +1133,7 @@ wire_missing_cb (void *cls, struct GNUNET_TIME_Timestamp deadline, bool done) { - const struct TALER_DONAUDB_CoinDepositInformation *deposit = cls; + const struct DONAUDB_CoinDepositInformation *deposit = cls; (void) payto_uri; (void) deadline; @@ -1162,7 +1162,7 @@ wire_missing_cb (void *cls, * Callback invoked with information about refunds applicable * to a particular coin. * - * @param cls closure with the `struct TALER_DONAUDB_Refund *` we expect to get + * @param cls closure with the `struct DONAUDB_Refund *` we expect to get * @param amount_with_fee amount being refunded * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop */ @@ -1170,7 +1170,7 @@ static enum GNUNET_GenericReturnValue check_refund_cb (void *cls, const struct TALER_Amount *amount_with_fee) { - const struct TALER_DONAUDB_Refund *refund = cls; + const struct DONAUDB_Refund *refund = cls; if (0 != TALER_amount_cmp (amount_with_fee, &refund->details.refund_amount)) @@ -1199,19 +1199,19 @@ run (void *cls) struct TALER_ReservePublicKeyP reserve_pub3; struct DenomKeyPair *dkp = NULL; struct TALER_MasterSignatureP master_sig; - struct TALER_DONAUDB_CollectableBlindcoin cbc; - struct TALER_DONAUDB_CollectableBlindcoin cbc2; - struct TALER_DONAUDB_ReserveHistory *rh = NULL; - struct TALER_DONAUDB_ReserveHistory *rh_head; - struct TALER_DONAUDB_BankTransfer *bt; - struct TALER_DONAUDB_CollectableBlindcoin *withdraw; - struct TALER_DONAUDB_CoinDepositInformation deposit; - struct TALER_DONAUDB_BatchDeposit bd; + struct DONAUDB_CollectableBlindcoin cbc; + struct DONAUDB_CollectableBlindcoin cbc2; + struct DONAUDB_ReserveHistory *rh = NULL; + struct DONAUDB_ReserveHistory *rh_head; + struct DONAUDB_BankTransfer *bt; + struct DONAUDB_CollectableBlindcoin *withdraw; + struct DONAUDB_CoinDepositInformation deposit; + struct DONAUDB_BatchDeposit bd; struct TALER_CoinSpendPublicKeyP cpub2; - struct TALER_CharityPublicKeyP mpub2; - struct TALER_DONAUDB_Refund refund; - struct TALER_DONAUDB_TransactionList *tl; - struct TALER_DONAUDB_TransactionList *tlp; + struct DONAU_CharityPublicKeyP mpub2; + struct DONAUDB_Refund refund; + struct DONAUDB_TransactionList *tl; + struct DONAUDB_TransactionList *tlp; const char *sndr = "payto://x-taler-bank/localhost:8080/1"; const char *rcvr = "payto://x-taler-bank/localhost:8080/2"; const uint32_t num_partitions = 10; @@ -1223,7 +1223,7 @@ run (void *cls) struct TALER_CoinPubHashP c_hash; uint64_t known_coin_id; uint64_t rrc_serial; - struct TALER_DONAUDB_Refresh refresh; + struct DONAUDB_Refresh refresh; struct TALER_DenominationPublicKey *new_denom_pubs = NULL; uint64_t reserve_out_serial_id; uint64_t melt_serial_id; @@ -1253,7 +1253,7 @@ run (void *cls) ZR_BLK (&cbc); ZR_BLK (&cbc2); if (NULL == - (plugin = TALER_DONAUDB_plugin_load (cfg))) + (plugin = DONAUDB_plugin_load (cfg))) { result = 77; return; @@ -1306,7 +1306,7 @@ run (void *cls) plugin->commit (plugin->cls)); now = GNUNET_TIME_timestamp_get (); { - struct TALER_DONAUDB_ReserveInInfo reserve = { + struct DONAUDB_ReserveInInfo reserve = { .reserve_pub = &reserve_pub, .balance = &value, .execution_time = now, @@ -1332,7 +1332,7 @@ run (void *cls) now = GNUNET_TIME_timestamp_get (); RND_BLK (&reserve_pub2); { - struct TALER_DONAUDB_ReserveInInfo reserve = { + struct DONAUDB_ReserveInInfo reserve = { .reserve_pub = &reserve_pub2, .balance = &value, .execution_time = now, @@ -1512,7 +1512,7 @@ run (void *cls) struct TALER_DenominationHashP dph; struct TALER_AgeCommitmentHash agh; - FAILIF (TALER_DONAUDB_CKS_ADDED != + FAILIF (DONAUDB_CKS_ADDED != plugin->ensure_coin_known (plugin->cls, &deposit.coin, &known_coin_id, @@ -1606,7 +1606,7 @@ run (void *cls) /* test get_melt */ { - struct TALER_DONAUDB_Melt ret_refresh_session; + struct DONAUDB_Melt ret_refresh_session; FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != plugin->get_melt (plugin->cls, @@ -1653,10 +1653,10 @@ run (void *cls) struct TALER_DenominationPublicKey); revealed_coins = GNUNET_new_array (MELT_NEW_COINS, - struct TALER_DONAUDB_RefreshRevealedCoin); + struct DONAUDB_RefreshRevealedCoin); for (unsigned int cnt = 0; cnt < MELT_NEW_COINS; cnt++) { - struct TALER_DONAUDB_RefreshRevealedCoin *ccoin; + struct DONAUDB_RefreshRevealedCoin *ccoin; struct GNUNET_TIME_Timestamp now; struct TALER_BlindedRsaPlanchet *rp; struct TALER_BlindedPlanchet *bp; @@ -1737,7 +1737,7 @@ run (void *cls) FAILIF (0 >= qs); { /* Just to test fetching a coin with melt history */ - struct TALER_DONAUDB_TransactionList *tl; + struct DONAUDB_TransactionList *tl; enum GNUNET_DB_QueryStatus qs; qs = plugin->get_coin_transactions (plugin->cls, @@ -1763,7 +1763,7 @@ run (void *cls) new_coin = deposit.coin; /* steal basic data */ RND_BLK (&new_coin.coin_pub); - FAILIF (TALER_DONAUDB_CKS_ADDED != + FAILIF (DONAUDB_CKS_ADDED != plugin->ensure_coin_known (plugin->cls, &new_coin, &new_known_coin_id, @@ -1787,8 +1787,8 @@ run (void *cls) /* do recoup */ { - struct TALER_DONAUDB_Reserve pre_reserve; - struct TALER_DONAUDB_Reserve post_reserve; + struct DONAUDB_Reserve pre_reserve; + struct DONAUDB_Reserve post_reserve; struct TALER_Amount delta; bool recoup_ok; bool internal_failure; @@ -1887,7 +1887,7 @@ run (void *cls) { switch (rh_head->type) { - case TALER_DONAUDB_RO_BANK_TO_DONAU: + case DONAUDB_RO_BANK_TO_DONAU: bt = rh_head->details.bank; FAILIF (0 != GNUNET_memcmp (&bt->reserve_pub, @@ -1898,7 +1898,7 @@ run (void *cls) FAILIF (0 != strcmp (CURRENCY, bt->amount.currency)); FAILIF (NULL == bt->sender_account_details); break; - case TALER_DONAUDB_RO_WITHDRAW_COIN: + case DONAUDB_RO_WITHDRAW_COIN: withdraw = rh_head->details.withdraw; FAILIF (0 != GNUNET_memcmp (&withdraw->reserve_pub, @@ -1907,9 +1907,9 @@ run (void *cls) GNUNET_memcmp (&withdraw->h_coin_envelope, &cbc.h_coin_envelope)); break; - case TALER_DONAUDB_RO_RECOUP_COIN: + case DONAUDB_RO_RECOUP_COIN: { - struct TALER_DONAUDB_Recoup *recoup = rh_head->details.recoup; + struct DONAUDB_Recoup *recoup = rh_head->details.recoup; FAILIF (0 != GNUNET_memcmp (&recoup->coin_sig, @@ -1928,9 +1928,9 @@ run (void *cls) &value)); } break; - case TALER_DONAUDB_RO_DONAU_TO_BANK: + case DONAUDB_RO_DONAU_TO_BANK: { - struct TALER_DONAUDB_ClosingTransfer *closing + struct DONAUDB_ClosingTransfer *closing = rh_head->details.closing; FAILIF (0 != @@ -1942,22 +1942,22 @@ run (void *cls) &fee_closing)); } break; - case TALER_DONAUDB_RO_PURSE_MERGE: + case DONAUDB_RO_PURSE_MERGE: { /* FIXME: not yet tested */ break; } - case TALER_DONAUDB_RO_HISTORY_REQUEST: + case DONAUDB_RO_HISTORY_REQUEST: { /* FIXME: not yet tested */ break; } - case TALER_DONAUDB_RO_OPEN_REQUEST: + case DONAUDB_RO_OPEN_REQUEST: { /* FIXME: not yet tested */ break; } - case TALER_DONAUDB_RO_CLOSE_REQUEST: + case DONAUDB_RO_CLOSE_REQUEST: { /* FIXME: not yet tested */ break; @@ -1998,9 +1998,9 @@ run (void *cls) { switch (tlp->type) { - case TALER_DONAUDB_TT_DEPOSIT: + case DONAUDB_TT_DEPOSIT: { - struct TALER_DONAUDB_DepositListEntry *have = tlp->details.deposit; + struct DONAUDB_DepositListEntry *have = tlp->details.deposit; /* Note: we're not comparing the denomination keys, as there is still the question of whether we should even bother exporting @@ -2032,15 +2032,15 @@ run (void *cls) break; } /* this coin pub was actually never melted... */ - case TALER_DONAUDB_TT_MELT: + case DONAUDB_TT_MELT: FAILIF (0 != GNUNET_memcmp (&refresh.rc, &tlp->details.melt->rc)); matched |= 2; break; - case TALER_DONAUDB_TT_REFUND: + case DONAUDB_TT_REFUND: { - struct TALER_DONAUDB_RefundListEntry *have = tlp->details.refund; + struct DONAUDB_RefundListEntry *have = tlp->details.refund; /* Note: we're not comparing the denomination keys, as there is still the question of whether we should even bother exporting @@ -2059,9 +2059,9 @@ run (void *cls) matched |= 4; break; } - case TALER_DONAUDB_TT_RECOUP: + case DONAUDB_TT_RECOUP: { - struct TALER_DONAUDB_RecoupListEntry *recoup = + struct DONAUDB_RecoupListEntry *recoup = tlp->details.recoup; FAILIF (0 != GNUNET_memcmp (&recoup->coin_sig, @@ -2075,7 +2075,7 @@ run (void *cls) matched |= 8; break; } - case TALER_DONAUDB_TT_OLD_COIN_RECOUP: + case DONAUDB_TT_OLD_COIN_RECOUP: /* TODO: check fields better... */ matched |= 16; break; @@ -2127,7 +2127,7 @@ run (void *cls) struct TALER_DenominationHashP dph; struct TALER_AgeCommitmentHash agh; - FAILIF (TALER_DONAUDB_CKS_ADDED != + FAILIF (DONAUDB_CKS_ADDED != plugin->ensure_coin_known (plugin->cls, &deposit.coin, &known_coin_id, @@ -2197,7 +2197,7 @@ run (void *cls) result = 8; sleep (2); /* give deposit time to be ready */ { - struct TALER_CharityPublicKeyP charity_pub2; + struct DONAU_CharityPublicKeyP charity_pub2; char *payto_uri2; FAILIF (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != @@ -2432,7 +2432,7 @@ cleanup: TALER_blinded_denom_sig_free (&cbc.sig); TALER_blinded_denom_sig_free (&cbc2.sig); dkp = NULL; - TALER_DONAUDB_plugin_unload (plugin); + DONAUDB_plugin_unload (plugin); plugin = NULL; } diff --git a/src/include/donau_service.h b/src/include/donau_service.h @@ -21,8 +21,8 @@ * @author Özgür Kesim * @author Lukas Matyja */ -#ifndef _TALER_DONAU_SERVICE_H -#define _TALER_DONAU_SERVICE_H +#ifndef _DONAU_SERVICE_H +#define _DONAU_SERVICE_H #include <jansson.h> #include "taler_util.h" @@ -38,12 +38,12 @@ /** * @brief Donau's statement signing public key */ -struct TALER_DONAU_SigningPublicKeyAndValidity +struct DONAU_SigningPublicKeyAndValidity { /** * The signing public key */ - struct TALER_DONAU_EddsaPublicKeyP key; + struct DONAU_EddsaPublicKeyP key; /** * Tax year this key is valid for. @@ -56,7 +56,7 @@ struct TALER_DONAU_SigningPublicKeyAndValidity /** * @brief Type of public signing keys for verifying blindly signed donation receipts. */ -struct TALER_DonationUnitPublicKey +struct DONAU_DonationUnitPublicKey { /** @@ -90,7 +90,7 @@ struct TALER_DonationUnitInformation /** * The public key */ - struct TALER_DonationUnitPublicKey key; + struct DONAU_DonationUnitPublicKey key; /** * amount of the donation @@ -107,13 +107,13 @@ struct TALER_DonationUnitInformation /** * @brief Information about keys from the donau. */ -struct TALER_DONAU_Keys +struct DONAU_Keys { /** * Array of the donau's online signing keys. */ - struct TALER_DONAU_SigningPublicKeyAndValidity *sign_keys; + struct DONAU_SigningPublicKeyAndValidity *sign_keys; /** * Array of the donau'sdonation unit keys. @@ -174,49 +174,49 @@ struct TALER_DONAU_Keys * client? The bits (1,2,4) can be used to test if the donau's * version is incompatible, older or newer respectively. */ -enum TALER_DONAU_VersionCompatibility +enum DONAU_VersionCompatibility { /** * The donau runs exactly the same protocol version. */ - TALER_DONAU_VC_MATCH = 0, + DONAU_VC_MATCH = 0, /** * The donau is too old or too new to be compatible with this * implementation (bit) */ - TALER_DONAU_VC_INCOMPATIBLE = 1, + DONAU_VC_INCOMPATIBLE = 1, /** * The donau is older than this implementation (bit) */ - TALER_DONAU_VC_OLDER = 2, + DONAU_VC_OLDER = 2, /** * The donau is too old to be compatible with * this implementation. */ - TALER_DONAU_VC_INCOMPATIBLE_OUTDATED - = TALER_DONAU_VC_INCOMPATIBLE - | TALER_DONAU_VC_OLDER, + DONAU_VC_INCOMPATIBLE_OUTDATED + = DONAU_VC_INCOMPATIBLE + | DONAU_VC_OLDER, /** * The donau is more recent than this implementation (bit). */ - TALER_DONAU_VC_NEWER = 4, + DONAU_VC_NEWER = 4, /** * The donau is too recent for this implementation. */ - TALER_DONAU_VC_INCOMPATIBLE_NEWER - = TALER_DONAU_VC_INCOMPATIBLE - | TALER_DONAU_VC_NEWER, + DONAU_VC_INCOMPATIBLE_NEWER + = DONAU_VC_INCOMPATIBLE + | DONAU_VC_NEWER, /** * We could not even parse the version data. */ - TALER_DONAU_VC_PROTOCOL_ERROR = 8 + DONAU_VC_PROTOCOL_ERROR = 8 }; @@ -225,7 +225,7 @@ enum TALER_DONAU_VersionCompatibility * General information about the HTTP response we obtained * from the donau for a request. */ -struct TALER_DONAU_HttpResponse +struct DONAU_HttpResponse { /** @@ -264,12 +264,12 @@ struct TALER_DONAU_HttpResponse /** * Response from /keys. */ -struct TALER_DONAU_KeysResponse +struct DONAU_KeysResponse { /** * HTTP response dataclosure */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; /** * Details depending on the HTTP status code. @@ -285,12 +285,12 @@ struct TALER_DONAU_KeysResponse /** * Information about the various keys used by the donau. */ - const struct TALER_DONAU_Keys *keys; + const struct DONAU_Keys *keys; /** * Protocol compatibility information */ - enum TALER_DONAU_VersionCompatibility compat; + enum DONAU_VersionCompatibility compat; } ok; } details; @@ -308,19 +308,19 @@ struct TALER_DONAU_KeysResponse * @param kr response from /keys * @param[in] keys keys object passed to callback with * reference counter of 1. Must be freed by callee - * using #TALER_DONAU_keys_decref(). NULL on failure. + * using #DONAU_keys_decref(). NULL on failure. */ typedef void -(*TALER_DONAU_GetKeysCallback) ( +(*DONAU_GetKeysCallback) ( void *cls, - const struct TALER_DONAU_KeysResponse *kr, - struct TALER_DONAU_Keys *keys); + const struct DONAU_KeysResponse *kr, + struct DONAU_Keys *keys); /** * @brief Handle for a GET /keys request. */ -struct TALER_DONAU_GetKeysHandle; +struct DONAU_GetKeysHandle; /** @@ -338,12 +338,12 @@ struct TALER_DONAU_GetKeysHandle; * @param cert_cb_cls closure for @a cert_cb * @return the donau handle; NULL upon error */ -struct TALER_DONAU_GetKeysHandle * -TALER_DONAU_get_keys ( +struct DONAU_GetKeysHandle * +DONAU_get_keys ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *last_keys, - TALER_DONAU_GetKeysCallback cert_cb, + struct DONAU_Keys *last_keys, + DONAU_GetKeysCallback cert_cb, void *cert_cb_cls); @@ -355,18 +355,18 @@ TALER_DONAU_get_keys ( * @return NULL on error; otherwise JSON object owned by the caller */ json_t * -TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd); +DONAU_keys_to_json (const struct DONAU_Keys *kd); /** * Deserialize keys data stored in @a j. * - * @param j JSON keys data previously returned from #TALER_DONAU_keys_to_json() + * @param j JSON keys data previously returned from #DONAU_keys_to_json() * @return NULL on error (i.e. invalid JSON); otherwise * keys object with reference counter 1 owned by the caller */ -struct TALER_DONAU_Keys * -TALER_DONAU_keys_from_json (const json_t *j); +struct DONAU_Keys * +DONAU_keys_from_json (const json_t *j); /** @@ -375,7 +375,7 @@ TALER_DONAU_keys_from_json (const json_t *j); * @param[in] gkh the GET /keys handle */ void -TALER_DONAU_get_keys_cancel (struct TALER_DONAU_GetKeysHandle *gkh); +DONAU_get_keys_cancel (struct DONAU_GetKeysHandle *gkh); /** @@ -384,8 +384,8 @@ TALER_DONAU_get_keys_cancel (struct TALER_DONAU_GetKeysHandle *gkh); * @param[in,out] keys object to increment reference counter for * @return keys, with incremented reference counter */ -struct TALER_DONAU_Keys * -TALER_DONAU_keys_incref (struct TALER_DONAU_Keys *keys); +struct DONAU_Keys * +DONAU_keys_incref (struct DONAU_Keys *keys); /** @@ -395,7 +395,7 @@ TALER_DONAU_keys_incref (struct TALER_DONAU_Keys *keys); * @param[in,out] keys object to decrement reference counter for */ void -TALER_DONAU_keys_decref (struct TALER_DONAU_Keys *keys); +DONAU_keys_decref (struct DONAU_Keys *keys); /** * Test if the given @a pub is a the current signing key from the donau @@ -407,10 +407,10 @@ TALER_DONAU_keys_decref (struct TALER_DONAU_Keys *keys); * @return #GNUNET_OK if @a pub is (according to /keys and @a year) the corresponding signing key */ enum GNUNET_GenericReturnValue -TALER_DONAU_test_signing_key ( - const struct TALER_DONAU_Keys *keys, +DONAU_test_signing_key ( + const struct DONAU_Keys *keys, const unsigned int year, - const struct TALER_DONAU_EddsaPublicKeyP *pub); + const struct DONAU_EddsaPublicKeyP *pub); /** @@ -422,9 +422,9 @@ TALER_DONAU_test_signing_key ( * found */ const struct TALER_DonationUnitInformation * -TALER_DONAU_get_donation_unit_key ( - const struct TALER_DONAU_Keys *keys, - const struct TALER_DonationUnitPublicKey *pk); +DONAU_get_donation_unit_key ( + const struct DONAU_Keys *keys, + const struct DONAU_DonationUnitPublicKey *pk); /** @@ -435,10 +435,10 @@ TALER_DONAU_get_donation_unit_key ( * @return details about the given donation unit key, returns NULL * if the key is not available or deprecated. */ -const struct TALER_DonationUnitPublicKey * -TALER_DONAU_get_donation_unit_key_by_hash ( - const struct TALER_DONAU_Keys *keys, - const struct TALER_DonationUnitHashP *hc); +const struct DONAU_DonationUnitPublicKey * +DONAU_get_donation_unit_key_by_hash ( + const struct DONAU_Keys *keys, + const struct DONAU_DonationUnitHashP *hc); /** @@ -449,10 +449,10 @@ TALER_DONAU_get_donation_unit_key_by_hash ( * @param donau_pub public key to lookup * @return NULL on error (@a donau_pub not known) */ -const struct TALER_DONAU_SigningPublicKeyAndValidity * -TALER_DONAU_get_signing_key_info ( - const struct TALER_DONAU_Keys *keys, - const struct TALER_DONAU_EddsaPublicKeyP *donau_pub); +const struct DONAU_SigningPublicKeyAndValidity * +DONAU_get_signing_key_info ( + const struct DONAU_Keys *keys, + const struct DONAU_EddsaPublicKeyP *donau_pub); /* ********************* POST / issue receipt *********************** */ @@ -489,19 +489,19 @@ struct TALER_BlindedUniqueDonationIdentifier /** * @brief A Batch Submit Handle */ -struct TALER_DONAU_BatchIssueReceiptHandle; +struct DONAU_BatchIssueReceiptHandle; /** * Structure with information about a batch * of issue receipts. */ -struct TALER_DONAU_BatchIssueReceipts +struct DONAU_BatchIssueReceipts { /** * HTTP response data */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; union { @@ -544,9 +544,9 @@ struct TALER_DONAU_BatchIssueReceipts * @param dr response details */ typedef void -(*TALER_DONAU_BatchIssueReceiptsCallback) ( +(*DONAU_BatchIssueReceiptsCallback) ( void *cls, - const struct TALER_DONAU_BatchIssueReceipts*dr); + const struct DONAU_BatchIssueReceipts*dr); /** @@ -573,14 +573,14 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_BatchIssueReceiptHandle * -TALER_DONAU_charity_issue_receipt ( +struct DONAU_BatchIssueReceiptHandle * +DONAU_charity_issue_receipt ( struct GNUNET_CURL_Context *ctx, const char *url, - const struct TALER_DONAU_CharityPrivateKeyP *charity_priv, + const struct DONAU_CharityPrivateKeyP *charity_priv, unsigned int num_bkp, const struct TALER_BlindedUniqueDonationIdentifierKeyPair bkp[static num_bkp], - TALER_DONAU_BatchIssueReceiptsCallback cb, + DONAU_BatchIssueReceiptsCallback cb, void *cb_cls); /** @@ -590,8 +590,8 @@ TALER_DONAU_charity_issue_receipt ( * @param[in] the issue receipt request handle */ void -TALER_DONAU_charity_issue_receipt_cancel ( - struct TALER_DONAU_BatchIssueReceiptHandle *); +DONAU_charity_issue_receipt_cancel ( + struct DONAU_BatchIssueReceiptHandle *); /** * unblinded donation unit signature from Donau @@ -608,18 +608,18 @@ struct TALER_DonationUnitSignature /** * Donation Receipt */ -struct TALER_DONAU_DonationReceipt +struct DONAU_DonationReceipt { /** * The hash of the donation unit's public key. */ - struct TALER_DonationUnitHashP h_donation_unit_pub; + struct DONAU_DonationUnitHashP h_donation_unit_pub; /** * Donor's hashed and salted unique donation identifier. */ - struct TALER_DONAU_HashDonorTaxId donor_id; + struct DONAU_HashDonorTaxId donor_id; /** * Unblinded donation unit signature from the donau. @@ -631,19 +631,19 @@ struct TALER_DONAU_DonationReceipt /** * @brief A Batch Submit receipts Handle */ -struct TALER_DONAU_DonorReceiptsToStatementHandle; +struct DONAU_DonorReceiptsToStatementHandle; /** * Structure with information about a batch * operation's result. */ -struct TALER_DONAU_DonorReceiptsToStatementResult +struct DONAU_DonorReceiptsToStatementResult { /** * HTTP response data */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; union { @@ -684,9 +684,9 @@ struct TALER_DONAU_DonorReceiptsToStatementResult * @param dr response details */ typedef void -(*TALER_DONAU_DonorReceiptsToStatementResultCallback) ( +(*DONAU_DonorReceiptsToStatementResultCallback) ( void *cls, - const struct TALER_DONAU_DonorReceiptsToStatementResult *dr); + const struct DONAU_DonorReceiptsToStatementResult *dr); /** @@ -712,13 +712,13 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_DonorReceiptsToStatementHandle * -TALER_DONAU_donor_receipts_to_statement ( +struct DONAU_DonorReceiptsToStatementHandle * +DONAU_donor_receipts_to_statement ( struct GNUNET_CURL_Context *ctx, const char *url, unsigned int num_drs, - const struct TALER_DONAU_DonationReceipt drs[static num_drs], - TALER_DONAU_DonorReceiptsToStatementResultCallback cb, + const struct DONAU_DonationReceipt drs[static num_drs], + DONAU_DonorReceiptsToStatementResultCallback cb, void *cls); /** @@ -728,8 +728,8 @@ TALER_DONAU_donor_receipts_to_statement ( * @param[in] the Batch Submit recipts handle */ void -TALER_DONAU_donor_receipts_to_statement_cancel ( - struct TALER_DONAU_DonorReceiptsToStatementHandle *); +DONAU_donor_receipts_to_statement_cancel ( + struct DONAU_DonorReceiptsToStatementHandle *); /* ********************* POST /csr batch-issue *********************** */ @@ -738,18 +738,18 @@ TALER_DONAU_donor_receipts_to_statement_cancel ( /** * @brief A /csr-batch-issue Handle */ -struct TALER_DONAU_CsRBatchIssueHandle; +struct DONAU_CsRBatchIssueHandle; /** * Details about a response for a CS R request. */ -struct TALER_DONAU_CsRBatchIssueResponse +struct DONAU_CsRBatchIssueResponse { /** * HTTP response data. */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; /** * Details about the response. @@ -788,9 +788,9 @@ struct TALER_DONAU_CsRBatchIssueResponse * @param csrr response details */ typedef void -(*TALER_DONAU_CsRBatchIssueCallback) ( +(*DONAU_CsRBatchIssueCallback) ( void *cls, - const struct TALER_DONAU_CsRBatchIssueResponse *csrr); + const struct DONAU_CsRBatchIssueResponse *csrr); /** @@ -806,13 +806,13 @@ typedef void * if the inputs are invalid (i.e.donation unit key not with this donau). * In this case, the callback is not called. */ -struct TALER_DONAU_CsRBatchIssueHandle * -TALER_DONAU_csr_batch_issue ( +struct DONAU_CsRBatchIssueHandle * +DONAU_csr_batch_issue ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - const struct TALER_DonationUnitPublicKey *pk, + const struct DONAU_DonationUnitPublicKey *pk, const struct TALER_CsNonce *nonce, - TALER_DONAU_CsRBatchIssueCallback res_cb, + DONAU_CsRBatchIssueCallback res_cb, void *res_cb_cls); @@ -824,8 +824,8 @@ TALER_DONAU_csr_batch_issue ( * @param csrh the batch-issue handle */ void -TALER_DONAU_csr_batch_issue_cancel ( - struct TALER_DONAU_CsRBatchIssueHandle *csrh); +DONAU_csr_batch_issue_cancel ( + struct DONAU_CsRBatchIssueHandle *csrh); /* ********************* GET /charities/ *********************** */ @@ -861,19 +861,19 @@ struct CharitySummary /** * @brief A /charities/ GET Handle */ -struct TALER_DONAU_CharitiesGetHandle; +struct DONAU_CharitiesGetHandle; /** * @brief summary of every charity */ -struct TALER_DONAU_GetCharitiesResponse +struct DONAU_GetCharitiesResponse { /** * High-level HTTP response details. */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; /** * Details depending on @e hr.http_status. @@ -913,9 +913,9 @@ struct TALER_DONAU_GetCharitiesResponse * @param rs HTTP response data */ typedef void -(*TALER_DONAU_GetCharitiesResponseCallback) ( +(*DONAU_GetCharitiesResponseCallback) ( void *cls, - const struct TALER_DONAU_GetCharitiesResponse *rs); + const struct DONAU_GetCharitiesResponse *rs); /** @@ -936,11 +936,11 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_CharitiesGetHandle * -TALER_DONAU_charities_get ( +struct DONAU_CharitiesGetHandle * +DONAU_charities_get ( struct GNUNET_CURL_Context *ctx, const char *url, - TALER_DONAU_GetCharitiesResponseCallback cb, + DONAU_GetCharitiesResponseCallback cb, void *cb_cls); @@ -951,8 +951,8 @@ TALER_DONAU_charities_get ( * @param rgh the charity request handle */ void -TALER_DONAU_charities_get_cancel ( - struct TALER_DONAU_charitiesGetHandle *rgh); +DONAU_charities_get_cancel ( + struct DONAU_charitiesGetHandle *rgh); /* ********************* GET /charities/$CHARITY_ID *********************** */ @@ -984,7 +984,7 @@ struct Charity /** * public key of the charity */ - struct TALER_DONAU_CharitySignatureP pub_key; + struct DONAU_CharitySignatureP pub_key; /** * Max donation amout for this charitiy and year. @@ -1007,19 +1007,19 @@ struct Charity /** * @brief A /charities/ GET Handle */ -struct TALER_DONAU_CharityGetHandle; +struct DONAU_CharityGetHandle; /** * @brief summary of a charity */ -struct TALER_DONAU_GetCharityResponse +struct DONAU_GetCharityResponse { /** * High-level HTTP response details. */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; /** * Details depending on @e hr.http_status. @@ -1055,9 +1055,9 @@ struct TALER_DONAU_GetCharityResponse * @param rs HTTP response data */ typedef void -(*TALER_DONAU_GetCharityResponseCallback) ( +(*DONAU_GetCharityResponseCallback) ( void *cls, - const struct TALER_DONAU_GetCharityResponse *rs); + const struct DONAU_GetCharityResponse *rs); /** @@ -1075,11 +1075,11 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_CharityGetHandle * -TALER_DONAU_charity_get ( +struct DONAU_CharityGetHandle * +DONAU_charity_get ( struct GNUNET_CURL_Context *ctx, const char *url, - TALER_DONAU_GetCharityResponseCallback cb, + DONAU_GetCharityResponseCallback cb, void *cb_cls); @@ -1090,8 +1090,8 @@ TALER_DONAU_charity_get ( * @param rgh the charity request handle */ void -TALER_DONAU_charity_get_cancel ( - struct TALER_DONAU_charityGetHandle *rgh); +DONAU_charity_get_cancel ( + struct DONAU_charityGetHandle *rgh); /* ********************* POST /charities/ *********************** */ @@ -1114,25 +1114,25 @@ struct charityRequest /** * public key of the charity */ - struct TALER_DONAU_EddsaPublicKeyP charity_pub; + struct DONAU_EddsaPublicKeyP charity_pub; }; /** * @brief A /charities Post Handle */ -struct TALER_DONAU_CharityPostHandle; +struct DONAU_CharityPostHandle; /** * @brief new charity ID Response */ -struct TALER_DONAU_PostCharityResponse +struct DONAU_PostCharityResponse { /** * High-level HTTP response details. */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; /** * Details depending on @e hr.http_status. @@ -1168,9 +1168,9 @@ struct TALER_DONAU_PostCharityResponse * @param rs HTTP response data */ typedef void -(*TALER_DONAU_PostCharityResponseCallback) ( +(*DONAU_PostCharityResponseCallback) ( void *cls, - const struct TALER_DONAU_PostCharityResponse *rs); + const struct DONAU_PostCharityResponse *rs); /** @@ -1190,13 +1190,13 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_CharityPostHandle * -TALER_DONAU_charity_post ( +struct DONAU_CharityPostHandle * +DONAU_charity_post ( struct GNUNET_CURL_Context *ctx, const char *url, const charityRequest charity_req, - const struct TALER_DONAU_BearerToken bearer, - TALER_DONAU_PostCharityResponseCallback cb, + const struct DONAU_BearerToken bearer, + DONAU_PostCharityResponseCallback cb, void *cb_cls); /** @@ -1206,27 +1206,27 @@ TALER_DONAU_charity_post ( * @param rgh the charity post handle */ void -TALER_DONAU_charity_post_cancel ( - struct TALER_DONAU_charityPostHandle *rgh); +DONAU_charity_post_cancel ( + struct DONAU_charityPostHandle *rgh); /* ********************* PATCH /charities/$CHARITY_ID *********************** */ /** * @brief A /charities/$CHARITY_ID Patch Handle */ -struct TALER_DONAU_CharityPatchHandle; +struct DONAU_CharityPatchHandle; /** * @brief charity patch response */ -struct TALER_DONAU_PatchCharityResponse +struct DONAU_PatchCharityResponse { /** * High-level HTTP response details. */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; }; @@ -1239,9 +1239,9 @@ struct TALER_DONAU_PatchCharityResponse * @param rs HTTP response data */ typedef void -(*TALER_DONAU_PatchCharityResponseCallback) ( +(*DONAU_PatchCharityResponseCallback) ( void *cls, - const struct TALER_DONAU_PatchCharityResponse *rs); + const struct DONAU_PatchCharityResponse *rs); /** @@ -1260,13 +1260,13 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_CharityPatchHandle * -TALER_DONAU_charity_patch ( +struct DONAU_CharityPatchHandle * +DONAU_charity_patch ( struct GNUNET_CURL_Context *ctx, const char *url, const struct charityRequest charity_req, - const struct TALER_DONAU_BearerToken bearer, - TALER_DONAU_PatchCharityResponseCallback cb, + const struct DONAU_BearerToken bearer, + DONAU_PatchCharityResponseCallback cb, void *cb_cls); /** @@ -1276,8 +1276,8 @@ TALER_DONAU_charity_patch ( * @param rgh the charity patch handle */ void -TALER_DONAU_charity_patch_cancel ( - struct TALER_DONAU_charityPatchHandle *rgh); +DONAU_charity_patch_cancel ( + struct DONAU_charityPatchHandle *rgh); /* ********************* DELETE /charities/$CHARITY_ID *********************** */ @@ -1285,19 +1285,19 @@ TALER_DONAU_charity_patch_cancel ( /** * @brief A /charities/$CHARITY_ID Delete Handle */ -struct TALER_DONAU_CharityDeleteHandle; +struct DONAU_CharityDeleteHandle; /** * @brief new charity ID Response */ -struct TALER_DONAU_DeleteCharityResponse +struct DONAU_DeleteCharityResponse { /** * High-level HTTP response details. */ - struct TALER_DONAU_HttpResponse hr; + struct DONAU_HttpResponse hr; }; @@ -1310,9 +1310,9 @@ struct TALER_DONAU_DeleteCharityResponse * @param rs HTTP response data */ typedef void -(*TALER_DONAU_DeleteCharityResponseCallback) ( +(*DONAU_DeleteCharityResponseCallback) ( void *cls, - const struct TALER_DONAU_DeleteCharityResponse *rs); + const struct DONAU_DeleteCharityResponse *rs); /** @@ -1331,12 +1331,12 @@ typedef void * @return a handle for this request; NULL if the inputs are invalid (i.e. * signatures fail to verify). In this case, the callback is not called. */ -struct TALER_DONAU_CharityDeleteHandle * -TALER_DONAU_charity_delete ( +struct DONAU_CharityDeleteHandle * +DONAU_charity_delete ( struct GNUNET_CURL_Context *ctx, const char *url, - const struct TALER_DONAU_BearerToken bearer, - TALER_DONAU_DeleteCharityResponseCallback cb, + const struct DONAU_BearerToken bearer, + DONAU_DeleteCharityResponseCallback cb, void *cb_cls); /** @@ -1346,5 +1346,5 @@ TALER_DONAU_charity_delete ( * @param rgh the charity request handle */ void -TALER_DONAU_charity_post_delete ( - struct TALER_DONAU_CharityDeleteHandle *rgh); +DONAU_charity_post_delete ( + struct DONAU_CharityDeleteHandle *rgh); diff --git a/src/include/donaudb_lib.h b/src/include/donaudb_lib.h @@ -24,8 +24,8 @@ COPYING.If not, see <http: // www.gnu.org/licenses/> * @author Benedikt Mueller * @author Christian Grothoff */ -#ifndef TALER_DONAUDB_LIB_H -#define TALER_DONAUDB_LIB_H +#ifndef DONAUDB_LIB_H +#define DONAUDB_LIB_H #include "taler_signatures.h" #include "taler_donaudb_plugin.h" @@ -38,8 +38,8 @@ COPYING.If not, see <http: // www.gnu.org/licenses/> * @param cfg configuration to use * @return NULL on failure */ -struct TALER_DONAUDB_Plugin * -TALER_DONAUDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); +struct DONAUDB_Plugin * +DONAUDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); /** @@ -48,16 +48,16 @@ TALER_DONAUDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg); * @param plugin plugin to unload */ void -TALER_DONAUDB_plugin_unload (struct TALER_DONAUDB_Plugin *plugin); +DONAUDB_plugin_unload (struct DONAUDB_Plugin *plugin); /** * Information about an account from the configuration. */ -struct TALER_DONAUDB_AccountInfo +struct DONAUDB_AccountInfo { /** * Authentication data. Only parsed if - * #TALER_DONAUDB_ALO_AUTHDATA was set. + * #DONAUDB_ALO_AUTHDATA was set. */ const struct TALER_BANK_AuthenticationData *auth; @@ -99,8 +99,8 @@ struct TALER_DONAUDB_AccountInfo * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ enum GNUNET_GenericReturnValue -TALER_DONAUDB_calculate_transaction_list_totals ( - struct TALER_DONAUDB_TransactionList *tl, +DONAUDB_calculate_transaction_list_totals ( + struct DONAUDB_TransactionList *tl, const struct TALER_Amount *off, struct TALER_Amount *ret); @@ -112,70 +112,70 @@ TALER_DONAUDB_calculate_transaction_list_totals ( * @param ai account information */ typedef void -(*TALER_DONAUDB_AccountCallback)( +(*DONAUDB_AccountCallback)( void *cls, - const struct TALER_DONAUDB_AccountInfo *ai); + const struct DONAUDB_AccountInfo *ai); /** * Return information about all accounts that - * were loaded by #TALER_DONAUDB_load_accounts(). + * were loaded by #DONAUDB_load_accounts(). * * @param cb callback to invoke * @param cb_cls closure for @a cb */ void -TALER_DONAUDB_find_accounts (TALER_DONAUDB_AccountCallback cb, +DONAUDB_find_accounts (DONAUDB_AccountCallback cb, void *cb_cls); /** * Find the wire plugin for the given payto:// URL. * Only useful after the accounts have been loaded - * using #TALER_DONAUDB_load_accounts(). + * using #DONAUDB_load_accounts(). * * @param method wire method we need an account for * @return NULL on error */ -const struct TALER_DONAUDB_AccountInfo * -TALER_DONAUDB_find_account_by_method (const char *method); +const struct DONAUDB_AccountInfo * +DONAUDB_find_account_by_method (const char *method); /** * Find the wire plugin for the given payto:// URL * Only useful after the accounts have been loaded - * using #TALER_DONAUDB_load_accounts(). + * using #DONAUDB_load_accounts(). * * @param url wire address we need an account for * @return NULL on error */ -const struct TALER_DONAUDB_AccountInfo * -TALER_DONAUDB_find_account_by_payto_uri (const char *url); +const struct DONAUDB_AccountInfo * +DONAUDB_find_account_by_payto_uri (const char *url); /** - * Options for #TALER_DONAUDB_load_accounts() + * Options for #DONAUDB_load_accounts() */ -enum TALER_DONAUDB_AccountLoaderOptions +enum DONAUDB_AccountLoaderOptions { - TALER_DONAUDB_ALO_NONE = 0, + DONAUDB_ALO_NONE = 0, /** * Load accounts enabled for DEBITs. */ - TALER_DONAUDB_ALO_DEBIT = 1, + DONAUDB_ALO_DEBIT = 1, /** * Load accounts enabled for CREDITs. */ - TALER_DONAUDB_ALO_CREDIT = 2, + DONAUDB_ALO_CREDIT = 2, /** * Load authentication data from the * "taler-accountcredentials-" section * to access the account at the bank. */ - TALER_DONAUDB_ALO_AUTHDATA = 4 + DONAUDB_ALO_AUTHDATA = 4 }; @@ -188,16 +188,16 @@ enum TALER_DONAUDB_AccountLoaderOptions * @return #GNUNET_OK on success, #GNUNET_NO if no accounts are configured */ enum GNUNET_GenericReturnValue -TALER_DONAUDB_load_accounts ( +DONAUDB_load_accounts ( const struct GNUNET_CONFIGURATION_Handle *cfg, - enum TALER_DONAUDB_AccountLoaderOptions options); + enum DONAUDB_AccountLoaderOptions options); /** * Free resources allocated by - * #TALER_DONAUDB_load_accounts(). + * #DONAUDB_load_accounts(). */ void -TALER_DONAUDB_unload_accounts (void); +DONAUDB_unload_accounts (void); #endif diff --git a/src/include/donaudb_plugin.h b/src/include/donaudb_plugin.h @@ -18,8 +18,8 @@ * @brief Low-level (statement-level) database access for the donau * @author Johannes Casaburi */ -#ifndef TALER_DONAUDB_PLUGIN_H -#define TALER_DONAUDB_PLUGIN_H +#ifndef DONAUDB_PLUGIN_H +#define DONAUDB_PLUGIN_H #include <jansson.h> #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_db_lib.h> @@ -31,7 +31,7 @@ /** * Meta data about a donation unit key. */ -struct TALER_DONAUDB_DonationUnitKeyMetaData +struct DONAUDB_DonationUnitKeyMetaData { /** * The value of the donation unit. @@ -53,7 +53,7 @@ struct TALER_DONAUDB_DonationUnitKeyMetaData /** * Meta data about an donau signing key. */ -struct TALER_DONAUDB_SignkeyMetaData +struct DONAUDB_SignkeyMetaData { /** * Start time of the validity period for this key. @@ -79,18 +79,18 @@ struct TALER_DONAUDB_SignkeyMetaData /** * @brief All information about a donation unit key. */ -struct TALER_DONAUDB_DonationUnitKey +struct DONAUDB_DonationUnitKey { /** * The private key of the donation unit. Will be NULL if the private * key is not available. */ - // struct TALER_DonationUnitPublicKey donation_unit_priv; + // struct DONAU_DonationUnitPublicKey donation_unit_priv; /** * Decoded donation unit public key. */ - // struct TALER_DonationUnitPublicKey donation_unit_pub; + // struct DONAU_DonationUnitPublicKey donation_unit_pub; }; @@ -104,10 +104,10 @@ struct TALER_DONAUDB_DonationUnitKey * @param info donation unit key information */ typedef void -(*TALER_DONAUDB_DonationUnitsCallback)( +(*DONAUDB_DonationUnitsCallback)( void *cls, - const struct TALER_DonationUnitPublicKey *donation_unit_pub, - const struct TALER_DONAUDB_DonationUnitKeyInformation *info); + const struct DONAU_DonationUnitPublicKey *donation_unit_pub, + const struct DONAUDB_DonationUnitKeyInformation *info); /** @@ -119,10 +119,10 @@ typedef void * @param meta meta data information about the signing type (expirations) */ typedef void -(*TALER_DONAUDB_ActiveSignkeysCallback)( +(*DONAUDB_ActiveSignkeysCallback)( void *cls, - const struct TALER_DonauPublicKeyP *donau_pub, - const struct TALER_DONAUDB_SignkeyMetaData *meta); + const struct DONAU_DonauPublicKeyP *donau_pub, + const struct DONAUDB_SignkeyMetaData *meta); -#endif -\ No newline at end of file +#endif diff --git a/src/lib/donau_api_batch_issue_receipts.c b/src/lib/donau_api_batch_issue_receipts.c @@ -41,7 +41,7 @@ struct CoinData /** * Denomination key we are withdrawing. */ - struct TALER_DONAU_DenomPublicKey pk; + struct DONAU_DenomPublicKey pk; /** * Master key material for the coin. @@ -81,19 +81,19 @@ struct CoinData /** * Handler for the CS R request (only used for TALER_DENOMINATION_CS denominations) */ - struct TALER_DONAU_CsRWithdrawHandle *csrh; + struct DONAU_CsRWithdrawHandle *csrh; /** * Batch withdraw this coin is part of. */ - struct TALER_DONAU_BatchWithdrawHandle *wh; + struct DONAU_BatchWithdrawHandle *wh; }; /** * @brief A batch withdraw handle */ -struct TALER_DONAU_BatchWithdrawHandle +struct DONAU_BatchWithdrawHandle { /** @@ -109,18 +109,18 @@ struct TALER_DONAU_BatchWithdrawHandle /** * The /keys information from the donau */ - const struct TALER_DONAU_Keys *keys; + const struct DONAU_Keys *keys; /** * Handle for the actual (internal) batch withdraw operation. */ - struct TALER_DONAU_BatchWithdraw2Handle *wh2; + struct DONAU_BatchWithdraw2Handle *wh2; /** * Function to call with the result. */ - TALER_DONAU_BatchWithdrawCallback cb; + DONAU_BatchWithdrawCallback cb; /** * Closure for @a cb. @@ -154,19 +154,19 @@ struct TALER_DONAU_BatchWithdrawHandle * Function called when we're done processing the * HTTP /reserves/$RESERVE_PUB/batch-withdraw request. * - * @param cls the `struct TALER_DONAU_BatchWithdrawHandle` + * @param cls the `struct DONAU_BatchWithdrawHandle` * @param bw2r response data */ static void handle_reserve_batch_withdraw_finished ( void *cls, - const struct TALER_DONAU_BatchWithdraw2Response *bw2r) + const struct DONAU_BatchWithdraw2Response *bw2r) { - struct TALER_DONAU_BatchWithdrawHandle *wh = cls; - struct TALER_DONAU_BatchWithdrawResponse wr = { + struct DONAU_BatchWithdrawHandle *wh = cls; + struct DONAU_BatchWithdrawResponse wr = { .hr = bw2r->hr }; - struct TALER_DONAU_PrivateCoinDetails coins[GNUNET_NZL (wh->num_coins)]; + struct DONAU_PrivateCoinDetails coins[GNUNET_NZL (wh->num_coins)]; wh->wh2 = NULL; memset (coins, @@ -186,7 +186,7 @@ handle_reserve_batch_withdraw_finished ( for (unsigned int i = 0; i<wh->num_coins; i++) { struct CoinData *cd = &wh->coins[i]; - struct TALER_DONAU_PrivateCoinDetails *coin = &coins[i]; + struct DONAU_PrivateCoinDetails *coin = &coins[i]; struct TALER_FreshCoin fc; if (GNUNET_OK != @@ -243,7 +243,7 @@ handle_reserve_batch_withdraw_finished ( &wr); for (unsigned int i = 0; i<wh->num_coins; i++) TALER_denom_sig_free (&coins[i].sig); - TALER_DONAU_batch_withdraw_cancel (wh); + DONAU_batch_withdraw_cancel (wh); } @@ -255,7 +255,7 @@ handle_reserve_batch_withdraw_finished ( * @param[in,out] wh batch withdraw to start phase 2 for */ static void -phase_two (struct TALER_DONAU_BatchWithdrawHandle *wh) +phase_two (struct DONAU_BatchWithdrawHandle *wh) { struct TALER_PlanchetDetail pds[wh->num_coins]; @@ -265,7 +265,7 @@ phase_two (struct TALER_DONAU_BatchWithdrawHandle *wh) pds[i] = cd->pd; } - wh->wh2 = TALER_DONAU_batch_withdraw2 ( + wh->wh2 = DONAU_batch_withdraw2 ( wh->curl_ctx, wh->donau_url, wh->keys, @@ -286,11 +286,11 @@ phase_two (struct TALER_DONAU_BatchWithdrawHandle *wh) static void withdraw_cs_stage_two_callback ( void *cls, - const struct TALER_DONAU_CsRWithdrawResponse *csrr) + const struct DONAU_CsRWithdrawResponse *csrr) { struct CoinData *cd = cls; - struct TALER_DONAU_BatchWithdrawHandle *wh = cd->wh; - struct TALER_DONAU_BatchWithdrawResponse wr = { + struct DONAU_BatchWithdrawHandle *wh = cd->wh; + struct DONAU_BatchWithdrawResponse wr = { .hr = csrr->hr }; @@ -318,7 +318,7 @@ withdraw_cs_stage_two_callback ( &cd->pd)) { GNUNET_break (0); - TALER_DONAU_batch_withdraw_cancel (wh); + DONAU_batch_withdraw_cancel (wh); } wh->cs_pending--; if (0 == wh->cs_pending) @@ -329,24 +329,24 @@ withdraw_cs_stage_two_callback ( } wh->cb (wh->cb_cls, &wr); - TALER_DONAU_batch_withdraw_cancel (wh); + DONAU_batch_withdraw_cancel (wh); } -struct TALER_DONAU_BatchWithdrawHandle * -TALER_DONAU_batch_withdraw ( +struct DONAU_BatchWithdrawHandle * +DONAU_batch_withdraw ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - const struct TALER_DONAU_Keys *keys, + const struct DONAU_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, unsigned int wci_length, - const struct TALER_DONAU_WithdrawCoinInput wcis[static wci_length], - TALER_DONAU_BatchWithdrawCallback res_cb, + const struct DONAU_WithdrawCoinInput wcis[static wci_length], + DONAU_BatchWithdrawCallback res_cb, void *res_cb_cls) { - struct TALER_DONAU_BatchWithdrawHandle *wh; + struct DONAU_BatchWithdrawHandle *wh; - wh = GNUNET_new (struct TALER_DONAU_BatchWithdrawHandle); + wh = GNUNET_new (struct DONAU_BatchWithdrawHandle); wh->curl_ctx = curl_ctx; wh->donau_url = donau_url; wh->keys = keys; @@ -359,7 +359,7 @@ TALER_DONAU_batch_withdraw ( for (unsigned int i = 0; i<wci_length; i++) { struct CoinData *cd = &wh->coins[i]; - const struct TALER_DONAU_WithdrawCoinInput *wci = &wcis[i]; + const struct DONAU_WithdrawCoinInput *wci = &wcis[i]; cd->wh = wh; cd->ps = *wci->ps; @@ -388,7 +388,7 @@ TALER_DONAU_batch_withdraw ( &cd->pd)) { GNUNET_break (0); - TALER_DONAU_batch_withdraw_cancel (wh); + DONAU_batch_withdraw_cancel (wh); return NULL; } break; @@ -402,7 +402,7 @@ TALER_DONAU_batch_withdraw ( of the blinded_planchet here; the other part will be done after the /csr-withdraw request! */ cd->pd.blinded_planchet.cipher = TALER_DENOMINATION_CS; - cd->csrh = TALER_DONAU_csr_withdraw ( + cd->csrh = DONAU_csr_withdraw ( curl_ctx, donau_url, &cd->pk, @@ -412,7 +412,7 @@ TALER_DONAU_batch_withdraw ( if (NULL == cd->csrh) { GNUNET_break (0); - TALER_DONAU_batch_withdraw_cancel (wh); + DONAU_batch_withdraw_cancel (wh); return NULL; } wh->cs_pending++; @@ -420,7 +420,7 @@ TALER_DONAU_batch_withdraw ( } default: GNUNET_break (0); - TALER_DONAU_batch_withdraw_cancel (wh); + DONAU_batch_withdraw_cancel (wh); return NULL; } } @@ -431,8 +431,8 @@ TALER_DONAU_batch_withdraw ( void -TALER_DONAU_batch_withdraw_cancel ( - struct TALER_DONAU_BatchWithdrawHandle *wh) +DONAU_batch_withdraw_cancel ( + struct DONAU_BatchWithdrawHandle *wh) { for (unsigned int i = 0; i<wh->num_coins; i++) { @@ -440,7 +440,7 @@ TALER_DONAU_batch_withdraw_cancel ( if (NULL != cd->csrh) { - TALER_DONAU_csr_withdraw_cancel (cd->csrh); + DONAU_csr_withdraw_cancel (cd->csrh); cd->csrh = NULL; } TALER_blinded_planchet_free (&cd->pd.blinded_planchet); @@ -449,7 +449,7 @@ TALER_DONAU_batch_withdraw_cancel ( GNUNET_free (wh->coins); if (NULL != wh->wh2) { - TALER_DONAU_batch_withdraw2_cancel (wh->wh2); + DONAU_batch_withdraw2_cancel (wh->wh2); wh->wh2 = NULL; } GNUNET_free (wh); diff --git a/src/lib/donau_api_batch_issue_receipts2.c b/src/lib/donau_api_batch_issue_receipts2.c @@ -35,7 +35,7 @@ /** * @brief A batch withdraw handle */ -struct TALER_DONAU_BatchWithdraw2Handle +struct DONAU_BatchWithdraw2Handle { /** @@ -46,7 +46,7 @@ struct TALER_DONAU_BatchWithdraw2Handle /** * The /keys material from the donau */ - const struct TALER_DONAU_Keys *keys; + const struct DONAU_Keys *keys; /** * Handle for the request. @@ -56,7 +56,7 @@ struct TALER_DONAU_BatchWithdraw2Handle /** * Function to call with the result. */ - TALER_DONAU_BatchWithdraw2Callback cb; + DONAU_BatchWithdraw2Callback cb; /** * Closure for @a cb. @@ -100,7 +100,7 @@ struct TALER_DONAU_BatchWithdraw2Handle * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static enum GNUNET_GenericReturnValue -reserve_batch_withdraw_ok (struct TALER_DONAU_BatchWithdraw2Handle *wh, +reserve_batch_withdraw_ok (struct DONAU_BatchWithdraw2Handle *wh, const json_t *json) { struct TALER_BlindedDenominationSignature blind_sigs[wh->num_coins]; @@ -108,7 +108,7 @@ reserve_batch_withdraw_ok (struct TALER_DONAU_BatchWithdraw2Handle *wh, "ev_sigs"); const json_t *j; unsigned int index; - struct TALER_DONAU_BatchWithdraw2Response bwr = { + struct DONAU_BatchWithdraw2Response bwr = { .hr.reply = json, .hr.http_status = MHD_HTTP_OK }; @@ -168,7 +168,7 @@ reserve_batch_withdraw_ok (struct TALER_DONAU_BatchWithdraw2Handle *wh, */ static enum GNUNET_GenericReturnValue reserve_batch_withdraw_payment_required ( - struct TALER_DONAU_BatchWithdraw2Handle *wh, + struct DONAU_BatchWithdraw2Handle *wh, const json_t *json) { struct TALER_Amount balance; @@ -202,14 +202,14 @@ reserve_batch_withdraw_payment_required ( total incoming and outgoing amounts */ len = json_array_size (history); { - struct TALER_DONAU_ReserveHistoryEntry *rhistory; + struct DONAU_ReserveHistoryEntry *rhistory; /* Use heap allocation as "len" may be very big and thus this may not fit on the stack. Use "GNUNET_malloc_large" as a malicious donau may theoretically try to crash us by giving a history that does not fit into our memory. */ rhistory = GNUNET_malloc_large ( - sizeof (struct TALER_DONAU_ReserveHistoryEntry) + sizeof (struct DONAU_ReserveHistoryEntry) * len); if (NULL == rhistory) { @@ -218,7 +218,7 @@ reserve_batch_withdraw_payment_required ( } if (GNUNET_OK != - TALER_DONAU_parse_reserve_history ( + DONAU_parse_reserve_history ( wh->keys, history, &wh->reserve_pub, @@ -229,11 +229,11 @@ reserve_batch_withdraw_payment_required ( rhistory)) { GNUNET_break_op (0); - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); return GNUNET_SYSERR; } - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); } @@ -254,7 +254,7 @@ reserve_batch_withdraw_payment_required ( * Function called when we're done processing the * HTTP /reserves/$RESERVE_PUB/batch-withdraw request. * - * @param cls the `struct TALER_DONAU_BatchWithdraw2Handle` + * @param cls the `struct DONAU_BatchWithdraw2Handle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -263,9 +263,9 @@ handle_reserve_batch_withdraw_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_BatchWithdraw2Handle *wh = cls; + struct DONAU_BatchWithdraw2Handle *wh = cls; const json_t *j = response; - struct TALER_DONAU_BatchWithdraw2Response bwr = { + struct DONAU_BatchWithdraw2Response bwr = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -287,7 +287,7 @@ handle_reserve_batch_withdraw_finished (void *cls, break; } GNUNET_assert (NULL == wh->cb); - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); return; case MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS: /* only validate reply is well-formed */ @@ -381,30 +381,30 @@ handle_reserve_batch_withdraw_finished (void *cls, &bwr); wh->cb = NULL; } - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); } -struct TALER_DONAU_BatchWithdraw2Handle * -TALER_DONAU_batch_withdraw2 ( +struct DONAU_BatchWithdraw2Handle * +DONAU_batch_withdraw2 ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - const struct TALER_DONAU_Keys *keys, + const struct DONAU_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, unsigned int pds_length, const struct TALER_PlanchetDetail pds[static pds_length], - TALER_DONAU_BatchWithdraw2Callback res_cb, + DONAU_BatchWithdraw2Callback res_cb, void *res_cb_cls) { - struct TALER_DONAU_BatchWithdraw2Handle *wh; - const struct TALER_DONAU_DenomPublicKey *dk; + struct DONAU_BatchWithdraw2Handle *wh; + const struct DONAU_DenomPublicKey *dk; struct TALER_ReserveSignatureP reserve_sig; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 32]; struct TALER_BlindedCoinHashP bch; json_t *jc; GNUNET_assert (NULL != keys); - wh = GNUNET_new (struct TALER_DONAU_BatchWithdraw2Handle); + wh = GNUNET_new (struct DONAU_BatchWithdraw2Handle); wh->keys = keys; wh->cb = res_cb; wh->cb_cls = res_cb_cls; @@ -438,7 +438,7 @@ TALER_DONAU_batch_withdraw2 ( if (NULL == wh->url) { GNUNET_break (0); - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); return NULL; } jc = json_array (); @@ -449,11 +449,11 @@ TALER_DONAU_batch_withdraw2 ( struct TALER_Amount coin_total; json_t *withdraw_obj; - dk = TALER_DONAU_get_denomination_key_by_hash (keys, + dk = DONAU_get_denomination_key_by_hash (keys, &pd->denom_pub_hash); if (NULL == dk) { - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); json_decref (jc); GNUNET_break (0); return NULL; @@ -466,7 +466,7 @@ TALER_DONAU_batch_withdraw2 ( { /* Overflow here? Very strange, our CPU must be fried... */ GNUNET_break (0); - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); json_decref (jc); return NULL; } @@ -477,7 +477,7 @@ TALER_DONAU_batch_withdraw2 ( { /* Overflow here? Very strange, our CPU must be fried... */ GNUNET_break (0); - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); json_decref (jc); return NULL; } @@ -487,7 +487,7 @@ TALER_DONAU_batch_withdraw2 ( &bch)) { GNUNET_break (0); - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); json_decref (jc); return NULL; } @@ -515,7 +515,7 @@ TALER_DONAU_batch_withdraw2 ( req = GNUNET_JSON_PACK ( GNUNET_JSON_pack_array_steal ("planchets", jc)); - eh = TALER_DONAU_curl_easy_get_ (wh->url); + eh = DONAU_curl_easy_get_ (wh->url); if ( (NULL == eh) || (GNUNET_OK != TALER_curl_easy_post (&wh->post_ctx, @@ -526,7 +526,7 @@ TALER_DONAU_batch_withdraw2 ( if (NULL != eh) curl_easy_cleanup (eh); json_decref (req); - TALER_DONAU_batch_withdraw2_cancel (wh); + DONAU_batch_withdraw2_cancel (wh); return NULL; } json_decref (req); @@ -541,8 +541,8 @@ TALER_DONAU_batch_withdraw2 ( void -TALER_DONAU_batch_withdraw2_cancel ( - struct TALER_DONAU_BatchWithdraw2Handle *wh) +DONAU_batch_withdraw2_cancel ( + struct DONAU_BatchWithdraw2Handle *wh) { if (NULL != wh->job) { diff --git a/src/lib/donau_api_batch_submit_receipts.c b/src/lib/donau_api_batch_submit_receipts.c @@ -73,20 +73,20 @@ struct TEAH_AuditorInteractionEntry /** * Batch deposit this is for. */ - struct TALER_DONAU_BatchDepositHandle *dh; + struct DONAU_BatchDepositHandle *dh; }; /** * @brief A Deposit Handle */ -struct TALER_DONAU_BatchDepositHandle +struct DONAU_BatchDepositHandle { /** * The keys of the donau. */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * Context for our curl request(s). @@ -112,7 +112,7 @@ struct TALER_DONAU_BatchDepositHandle /** * Function to call with the result. */ - TALER_DONAU_BatchDepositResultCallback cb; + DONAU_BatchDepositResultCallback cb; /** * Closure for @a cb. @@ -122,12 +122,12 @@ struct TALER_DONAU_BatchDepositHandle /** * Details about the contract. */ - struct TALER_DONAU_DepositContractDetail dcd; + struct DONAU_DepositContractDetail dcd; /** * Array with details about the coins. */ - struct TALER_DONAU_CoinDepositDetail *cdds; + struct DONAU_CoinDepositDetail *cdds; /** * Hash of the charity's wire details. @@ -163,12 +163,12 @@ struct TALER_DONAU_BatchDepositHandle /** * Result to return to the application once @e ai_head is empty. */ - struct TALER_DONAU_BatchDepositResult dr; + struct DONAU_BatchDepositResult dr; /** * Donau signing public key, set for #auditor_cb. */ - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; /** * Response object to free at the end. @@ -195,11 +195,11 @@ struct TALER_DONAU_BatchDepositHandle * @param[in] dh handle to finished batch deposit operation */ static void -finish_dh (struct TALER_DONAU_BatchDepositHandle *dh) +finish_dh (struct DONAU_BatchDepositHandle *dh) { dh->cb (dh->cb_cls, &dh->dr); - TALER_DONAU_batch_deposit_cancel (dh); + DONAU_batch_deposit_cancel (dh); } @@ -216,7 +216,7 @@ acc_confirmation_cb ( const struct TALER_AUDITOR_DepositConfirmationResponse *dcr) { struct TEAH_AuditorInteractionEntry *aie = cls; - struct TALER_DONAU_BatchDepositHandle *dh = aie->dh; + struct DONAU_BatchDepositHandle *dh = aie->dh; if (MHD_HTTP_OK != dcr->hr.http_status) { @@ -248,11 +248,11 @@ auditor_cb (void *cls, const char *auditor_url, const struct TALER_AuditorPublicKeyP *auditor_pub) { - struct TALER_DONAU_BatchDepositHandle *dh = cls; - const struct TALER_DONAU_SigningPublicKey *spk; + struct DONAU_BatchDepositHandle *dh = cls; + const struct DONAU_SigningPublicKey *spk; struct TEAH_AuditorInteractionEntry *aie; struct TALER_Amount amount_without_fee; - const struct TALER_DONAU_DenomPublicKey *dki; + const struct DONAU_DenomPublicKey *dki; unsigned int coin; if (0 != @@ -268,10 +268,10 @@ auditor_cb (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Will provide deposit confirmation to auditor `%s'\n", TALER_B2S (auditor_pub)); - dki = TALER_DONAU_get_denomination_key_by_hash (dh->keys, + dki = DONAU_get_denomination_key_by_hash (dh->keys, &dh->cdds[coin].h_denom_pub); GNUNET_assert (NULL != dki); - spk = TALER_DONAU_get_signing_key_info (dh->keys, + spk = DONAU_get_signing_key_info (dh->keys, &dh->donau_pub); if (NULL == spk) { @@ -316,7 +316,7 @@ auditor_cb (void *cls, * Function called when we're done processing the * HTTP /deposit request. * - * @param cls the `struct TALER_DONAU_BatchDepositHandle` + * @param cls the `struct DONAU_BatchDepositHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -325,9 +325,9 @@ handle_deposit_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_BatchDepositHandle *dh = cls; + struct DONAU_BatchDepositHandle *dh = cls; const json_t *j = response; - struct TALER_DONAU_BatchDepositResult *dr = &dh->dr; + struct DONAU_BatchDepositResult *dr = &dh->dr; dh->job = NULL; dh->response = json_incref ((json_t*) j); @@ -377,7 +377,7 @@ handle_deposit_finished (void *cls, dh->donau_sigs = GNUNET_new_array (dh->num_cdds, struct TALER_DonauSignatureP); if (GNUNET_OK != - TALER_DONAU_test_signing_key (dh->keys, + DONAU_test_signing_key (dh->keys, &dh->donau_pub)) { GNUNET_break_op (0); @@ -393,7 +393,7 @@ handle_deposit_finished (void *cls, GNUNET_JSON_spec_end () }; struct TALER_Amount amount_without_fee; - const struct TALER_DONAU_DenomPublicKey *dki; + const struct DONAU_DenomPublicKey *dki; if (GNUNET_OK != GNUNET_JSON_parse (sig, @@ -405,7 +405,7 @@ handle_deposit_finished (void *cls, dr->hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; break; } - dki = TALER_DONAU_get_denomination_key_by_hash (dh->keys, + dki = DONAU_get_denomination_key_by_hash (dh->keys, &dh->cdds[idx]. h_denom_pub); GNUNET_assert (NULL != dki); @@ -470,7 +470,7 @@ handle_deposit_finished (void *cls, &coin_pub), GNUNET_JSON_spec_end () }; - const struct TALER_DONAU_DenomPublicKey *dki; + const struct DONAU_DenomPublicKey *dki; bool found = false; if (GNUNET_OK != @@ -489,12 +489,12 @@ handle_deposit_finished (void *cls, GNUNET_memcmp (&coin_pub, &dh->cdds[i].coin_pub)) continue; - dki = TALER_DONAU_get_denomination_key_by_hash (dh->keys, + dki = DONAU_get_denomination_key_by_hash (dh->keys, &dh->cdds[i]. h_denom_pub); GNUNET_assert (NULL != dki); if (GNUNET_OK != - TALER_DONAU_check_coin_conflict_ ( + DONAU_check_coin_conflict_ ( dh->keys, j, dki, @@ -552,19 +552,19 @@ handle_deposit_finished (void *cls, } -struct TALER_DONAU_BatchDepositHandle * -TALER_DONAU_batch_deposit ( +struct DONAU_BatchDepositHandle * +DONAU_batch_deposit ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *keys, - const struct TALER_DONAU_DepositContractDetail *dcd, + struct DONAU_Keys *keys, + const struct DONAU_DepositContractDetail *dcd, unsigned int num_cdds, - const struct TALER_DONAU_CoinDepositDetail cdds[static num_cdds], - TALER_DONAU_BatchDepositResultCallback cb, + const struct DONAU_CoinDepositDetail cdds[static num_cdds], + DONAU_BatchDepositResultCallback cb, void *cb_cls, enum TALER_ErrorCode *ec) { - struct TALER_DONAU_BatchDepositHandle *dh; + struct DONAU_BatchDepositHandle *dh; json_t *deposit_obj; json_t *deposits; CURL *eh; @@ -579,7 +579,7 @@ TALER_DONAU_batch_deposit ( *ec = TALER_EC_DONAU_DEPOSIT_REFUND_DEADLINE_AFTER_WIRE_DEADLINE; return NULL; } - dh = GNUNET_new (struct TALER_DONAU_BatchDepositHandle); + dh = GNUNET_new (struct DONAU_BatchDepositHandle); dh->auditor_chance = AUDITOR_CHANCE; dh->cb = cb; dh->cb_cls = cb_cls; @@ -598,11 +598,11 @@ TALER_DONAU_batch_deposit ( GNUNET_assert (NULL != deposits); for (unsigned int i = 0; i<num_cdds; i++) { - const struct TALER_DONAU_CoinDepositDetail *cdd = &cdds[i]; - const struct TALER_DONAU_DenomPublicKey *dki; + const struct DONAU_CoinDepositDetail *cdd = &cdds[i]; + const struct DONAU_DenomPublicKey *dki; const struct TALER_AgeCommitmentHash *h_age_commitmentp; - dki = TALER_DONAU_get_denomination_key_by_hash (keys, + dki = DONAU_get_denomination_key_by_hash (keys, &cdd->h_denom_pub); if (NULL == dki) { @@ -629,7 +629,7 @@ TALER_DONAU_batch_deposit ( } if (GNUNET_OK != - TALER_DONAU_verify_deposit_signature_ (dcd, + DONAU_verify_deposit_signature_ (dcd, &dh->h_policy, &dh->h_wire, cdd, @@ -708,7 +708,7 @@ TALER_DONAU_batch_deposit ( GNUNET_JSON_pack_timestamp ("wire_transfer_deadline", dcd->wire_deadline)); GNUNET_assert (NULL != deposit_obj); - eh = TALER_DONAU_curl_easy_get_ (dh->url); + eh = DONAU_curl_easy_get_ (dh->url); if ( (NULL == eh) || (GNUNET_OK != TALER_curl_easy_post (&dh->post_ctx, @@ -730,7 +730,7 @@ TALER_DONAU_batch_deposit ( "URL for deposit: `%s'\n", dh->url); dh->ctx = ctx; - dh->keys = TALER_DONAU_keys_incref (keys); + dh->keys = DONAU_keys_incref (keys); dh->job = GNUNET_CURL_job_add2 (ctx, eh, dh->post_ctx.headers, @@ -741,16 +741,16 @@ TALER_DONAU_batch_deposit ( void -TALER_DONAU_batch_deposit_force_dc ( - struct TALER_DONAU_BatchDepositHandle *deposit) +DONAU_batch_deposit_force_dc ( + struct DONAU_BatchDepositHandle *deposit) { deposit->auditor_chance = 1; } void -TALER_DONAU_batch_deposit_cancel ( - struct TALER_DONAU_BatchDepositHandle *deposit) +DONAU_batch_deposit_cancel ( + struct DONAU_BatchDepositHandle *deposit) { struct TEAH_AuditorInteractionEntry *aie; @@ -771,7 +771,7 @@ TALER_DONAU_batch_deposit_cancel ( GNUNET_CURL_job_cancel (deposit->job); deposit->job = NULL; } - TALER_DONAU_keys_decref (deposit->keys); + DONAU_keys_decref (deposit->keys); GNUNET_free (deposit->url); GNUNET_free (deposit->cdds); GNUNET_free (deposit->donau_sigs); diff --git a/src/lib/donau_api_charities_close.c b/src/lib/donau_api_charities_close.c @@ -35,7 +35,7 @@ /** * @brief A /reserves/$RID/close Handle */ -struct TALER_DONAU_ReservesCloseHandle +struct DONAU_ReservesCloseHandle { /** @@ -57,7 +57,7 @@ struct TALER_DONAU_ReservesCloseHandle /** * Function to call with the result. */ - TALER_DONAU_ReservesCloseCallback cb; + DONAU_ReservesCloseCallback cb; /** * Closure for @a cb. @@ -91,10 +91,10 @@ struct TALER_DONAU_ReservesCloseHandle * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_close_ok (struct TALER_DONAU_ReservesCloseHandle *rch, +handle_reserves_close_ok (struct DONAU_ReservesCloseHandle *rch, const json_t *j) { - struct TALER_DONAU_ReserveCloseResult rs = { + struct DONAU_ReserveCloseResult rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_OK, }; @@ -130,10 +130,10 @@ handle_reserves_close_ok (struct TALER_DONAU_ReservesCloseHandle *rch, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_close_kyc (struct TALER_DONAU_ReservesCloseHandle *rch, +handle_reserves_close_kyc (struct DONAU_ReservesCloseHandle *rch, const json_t *j) { - struct TALER_DONAU_ReserveCloseResult rs = { + struct DONAU_ReserveCloseResult rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS, }; @@ -168,7 +168,7 @@ handle_reserves_close_kyc (struct TALER_DONAU_ReservesCloseHandle *rch, * Function called when we're done processing the * HTTP /reserves/$RID/close request. * - * @param cls the `struct TALER_DONAU_ReservesCloseHandle` + * @param cls the `struct DONAU_ReservesCloseHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -177,9 +177,9 @@ handle_reserves_close_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_ReservesCloseHandle *rch = cls; + struct DONAU_ReservesCloseHandle *rch = cls; const json_t *j = response; - struct TALER_DONAU_ReserveCloseResult rs = { + struct DONAU_ReserveCloseResult rs = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -258,25 +258,25 @@ handle_reserves_close_finished (void *cls, &rs); rch->cb = NULL; } - TALER_DONAU_reserves_close_cancel (rch); + DONAU_reserves_close_cancel (rch); } -struct TALER_DONAU_ReservesCloseHandle * -TALER_DONAU_reserves_close ( +struct DONAU_ReservesCloseHandle * +DONAU_reserves_close ( struct GNUNET_CURL_Context *ctx, const char *url, const struct TALER_ReservePrivateKeyP *reserve_priv, const char *target_payto_uri, - TALER_DONAU_ReservesCloseCallback cb, + DONAU_ReservesCloseCallback cb, void *cb_cls) { - struct TALER_DONAU_ReservesCloseHandle *rch; + struct DONAU_ReservesCloseHandle *rch; CURL *eh; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 32]; struct TALER_PaytoHashP h_payto; - rch = GNUNET_new (struct TALER_DONAU_ReservesCloseHandle); + rch = GNUNET_new (struct DONAU_ReservesCloseHandle); rch->cb = cb; rch->cb_cls = cb_cls; rch->ts = GNUNET_TIME_timestamp_get (); @@ -305,7 +305,7 @@ TALER_DONAU_reserves_close ( GNUNET_free (rch); return NULL; } - eh = TALER_DONAU_curl_easy_get_ (rch->url); + eh = DONAU_curl_easy_get_ (rch->url); if (NULL == eh) { GNUNET_break (0); @@ -356,8 +356,8 @@ TALER_DONAU_reserves_close ( void -TALER_DONAU_reserves_close_cancel ( - struct TALER_DONAU_ReservesCloseHandle *rch) +DONAU_reserves_close_cancel ( + struct DONAU_ReservesCloseHandle *rch) { if (NULL != rch->job) { diff --git a/src/lib/donau_api_charities_get.c b/src/lib/donau_api_charities_get.c @@ -35,7 +35,7 @@ /** * @brief A /reserves/ GET Handle */ -struct TALER_DONAU_ReservesGetHandle +struct DONAU_ReservesGetHandle { /** @@ -51,7 +51,7 @@ struct TALER_DONAU_ReservesGetHandle /** * Function to call with the result. */ - TALER_DONAU_ReservesGetCallback cb; + DONAU_ReservesGetCallback cb; /** * Public key of the reserve we are querying. @@ -75,10 +75,10 @@ struct TALER_DONAU_ReservesGetHandle * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_get_ok (struct TALER_DONAU_ReservesGetHandle *rgh, +handle_reserves_get_ok (struct DONAU_ReservesGetHandle *rgh, const json_t *j) { - struct TALER_DONAU_ReserveSummary rs = { + struct DONAU_ReserveSummary rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_OK }; @@ -108,7 +108,7 @@ handle_reserves_get_ok (struct TALER_DONAU_ReservesGetHandle *rgh, * Function called when we're done processing the * HTTP /reserves/ GET request. * - * @param cls the `struct TALER_DONAU_ReservesGetHandle` + * @param cls the `struct DONAU_ReservesGetHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -117,9 +117,9 @@ handle_reserves_get_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_ReservesGetHandle *rgh = cls; + struct DONAU_ReservesGetHandle *rgh = cls; const json_t *j = response; - struct TALER_DONAU_ReserveSummary rs = { + struct DONAU_ReserveSummary rs = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -175,20 +175,20 @@ handle_reserves_get_finished (void *cls, &rs); rgh->cb = NULL; } - TALER_DONAU_reserves_get_cancel (rgh); + DONAU_reserves_get_cancel (rgh); } -struct TALER_DONAU_ReservesGetHandle * -TALER_DONAU_reserves_get ( +struct DONAU_ReservesGetHandle * +DONAU_reserves_get ( struct GNUNET_CURL_Context *ctx, const char *url, const struct TALER_ReservePublicKeyP *reserve_pub, struct GNUNET_TIME_Relative timeout, - TALER_DONAU_ReservesGetCallback cb, + DONAU_ReservesGetCallback cb, void *cb_cls) { - struct TALER_DONAU_ReservesGetHandle *rgh; + struct DONAU_ReservesGetHandle *rgh; CURL *eh; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 16 + 32]; @@ -221,7 +221,7 @@ TALER_DONAU_reserves_get ( pub_str, timeout_str); } - rgh = GNUNET_new (struct TALER_DONAU_ReservesGetHandle); + rgh = GNUNET_new (struct DONAU_ReservesGetHandle); rgh->cb = cb; rgh->cb_cls = cb_cls; rgh->reserve_pub = *reserve_pub; @@ -233,7 +233,7 @@ TALER_DONAU_reserves_get ( GNUNET_free (rgh); return NULL; } - eh = TALER_DONAU_curl_easy_get_ (rgh->url); + eh = DONAU_curl_easy_get_ (rgh->url); if (NULL == eh) { GNUNET_break (0); @@ -250,8 +250,8 @@ TALER_DONAU_reserves_get ( void -TALER_DONAU_reserves_get_cancel ( - struct TALER_DONAU_ReservesGetHandle *rgh) +DONAU_reserves_get_cancel ( + struct DONAU_ReservesGetHandle *rgh) { if (NULL != rgh->job) { diff --git a/src/lib/donau_api_charities_history.c b/src/lib/donau_api_charities_history.c @@ -35,13 +35,13 @@ /** * @brief A /reserves/$RID/history Handle */ -struct TALER_DONAU_ReservesHistoryHandle +struct DONAU_ReservesHistoryHandle { /** * The keys of the donau this request handle will use */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * The url for this request. @@ -62,7 +62,7 @@ struct TALER_DONAU_ReservesHistoryHandle /** * Function to call with the result. */ - TALER_DONAU_ReservesHistoryCallback cb; + DONAU_ReservesHistoryCallback cb; /** * Closure for @a cb. @@ -96,12 +96,12 @@ struct TALER_DONAU_ReservesHistoryHandle * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_history_ok (struct TALER_DONAU_ReservesHistoryHandle *rsh, +handle_reserves_history_ok (struct DONAU_ReservesHistoryHandle *rsh, const json_t *j) { const json_t *history; unsigned int len; - struct TALER_DONAU_ReserveHistory rs = { + struct DONAU_ReserveHistory rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_OK, .ts = rsh->ts, @@ -126,12 +126,12 @@ handle_reserves_history_ok (struct TALER_DONAU_ReservesHistoryHandle *rsh, } len = json_array_size (history); { - struct TALER_DONAU_ReserveHistoryEntry *rhistory; + struct DONAU_ReserveHistoryEntry *rhistory; rhistory = GNUNET_new_array (len, - struct TALER_DONAU_ReserveHistoryEntry); + struct DONAU_ReserveHistoryEntry); if (GNUNET_OK != - TALER_DONAU_parse_reserve_history (rsh->keys, + DONAU_parse_reserve_history (rsh->keys, history, &rsh->reserve_pub, rs.details.ok.balance.currency, @@ -141,7 +141,7 @@ handle_reserves_history_ok (struct TALER_DONAU_ReservesHistoryHandle *rsh, rhistory)) { GNUNET_break_op (0); - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); return GNUNET_SYSERR; } @@ -153,7 +153,7 @@ handle_reserves_history_ok (struct TALER_DONAU_ReservesHistoryHandle *rsh, &rs); rsh->cb = NULL; } - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); } return GNUNET_OK; @@ -164,7 +164,7 @@ handle_reserves_history_ok (struct TALER_DONAU_ReservesHistoryHandle *rsh, * Function called when we're done processing the * HTTP /reserves/$RID/history request. * - * @param cls the `struct TALER_DONAU_ReservesHistoryHandle` + * @param cls the `struct DONAU_ReservesHistoryHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -173,9 +173,9 @@ handle_reserves_history_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_ReservesHistoryHandle *rsh = cls; + struct DONAU_ReservesHistoryHandle *rsh = cls; const json_t *j = response; - struct TALER_DONAU_ReserveHistory rs = { + struct DONAU_ReserveHistory rs = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -244,25 +244,25 @@ handle_reserves_history_finished (void *cls, &rs); rsh->cb = NULL; } - TALER_DONAU_reserves_history_cancel (rsh); + DONAU_reserves_history_cancel (rsh); } -struct TALER_DONAU_ReservesHistoryHandle * -TALER_DONAU_reserves_history ( +struct DONAU_ReservesHistoryHandle * +DONAU_reserves_history ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, - TALER_DONAU_ReservesHistoryCallback cb, + DONAU_ReservesHistoryCallback cb, void *cb_cls) { - struct TALER_DONAU_ReservesHistoryHandle *rsh; + struct DONAU_ReservesHistoryHandle *rsh; CURL *eh; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 32]; - const struct TALER_DONAU_GlobalFee *gf; + const struct DONAU_GlobalFee *gf; - rsh = GNUNET_new (struct TALER_DONAU_ReservesHistoryHandle); + rsh = GNUNET_new (struct DONAU_ReservesHistoryHandle); rsh->cb = cb; rsh->cb_cls = cb_cls; rsh->ts = GNUNET_TIME_timestamp_get (); @@ -291,7 +291,7 @@ TALER_DONAU_reserves_history ( GNUNET_free (rsh); return NULL; } - eh = TALER_DONAU_curl_easy_get_ (rsh->url); + eh = DONAU_curl_easy_get_ (rsh->url); if (NULL == eh) { GNUNET_break (0); @@ -299,7 +299,7 @@ TALER_DONAU_reserves_history ( GNUNET_free (rsh); return NULL; } - gf = TALER_DONAU_get_global_fee (keys, + gf = DONAU_get_global_fee (keys, rsh->ts); if (NULL == gf) { @@ -334,7 +334,7 @@ TALER_DONAU_reserves_history ( } json_decref (history_obj); } - rsh->keys = TALER_DONAU_keys_incref (keys); + rsh->keys = DONAU_keys_incref (keys); rsh->job = GNUNET_CURL_job_add2 (ctx, eh, rsh->post_ctx.headers, @@ -345,8 +345,8 @@ TALER_DONAU_reserves_history ( void -TALER_DONAU_reserves_history_cancel ( - struct TALER_DONAU_ReservesHistoryHandle *rsh) +DONAU_reserves_history_cancel ( + struct DONAU_ReservesHistoryHandle *rsh) { if (NULL != rsh->job) { @@ -355,7 +355,7 @@ TALER_DONAU_reserves_history_cancel ( } TALER_curl_easy_post_finished (&rsh->post_ctx); GNUNET_free (rsh->url); - TALER_DONAU_keys_decref (rsh->keys); + DONAU_keys_decref (rsh->keys); GNUNET_free (rsh); } diff --git a/src/lib/donau_api_charities_open.c b/src/lib/donau_api_charities_open.c @@ -63,13 +63,13 @@ struct CoinData /** * @brief A /reserves/$RID/open Handle */ -struct TALER_DONAU_ReservesOpenHandle +struct DONAU_ReservesOpenHandle { /** * The keys of the donau this request handle will use */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * The url for this request. @@ -90,7 +90,7 @@ struct TALER_DONAU_ReservesOpenHandle /** * Function to call with the result. */ - TALER_DONAU_ReservesOpenCallback cb; + DONAU_ReservesOpenCallback cb; /** * Closure for @a cb. @@ -134,10 +134,10 @@ struct TALER_DONAU_ReservesOpenHandle * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_open_ok (struct TALER_DONAU_ReservesOpenHandle *roh, +handle_reserves_open_ok (struct DONAU_ReservesOpenHandle *roh, const json_t *j) { - struct TALER_DONAU_ReserveOpenResult rs = { + struct DONAU_ReserveOpenResult rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_OK, }; @@ -175,10 +175,10 @@ handle_reserves_open_ok (struct TALER_DONAU_ReservesOpenHandle *roh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_open_pr (struct TALER_DONAU_ReservesOpenHandle *roh, +handle_reserves_open_pr (struct DONAU_ReservesOpenHandle *roh, const json_t *j) { - struct TALER_DONAU_ReserveOpenResult rs = { + struct DONAU_ReserveOpenResult rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_PAYMENT_REQUIRED, }; @@ -216,10 +216,10 @@ handle_reserves_open_pr (struct TALER_DONAU_ReservesOpenHandle *roh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_open_kyc (struct TALER_DONAU_ReservesOpenHandle *roh, +handle_reserves_open_kyc (struct DONAU_ReservesOpenHandle *roh, const json_t *j) { - struct TALER_DONAU_ReserveOpenResult rs = { + struct DONAU_ReserveOpenResult rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS, }; @@ -254,7 +254,7 @@ handle_reserves_open_kyc (struct TALER_DONAU_ReservesOpenHandle *roh, * Function called when we're done processing the * HTTP /reserves/$RID/open request. * - * @param cls the `struct TALER_DONAU_ReservesOpenHandle` + * @param cls the `struct DONAU_ReservesOpenHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -263,9 +263,9 @@ handle_reserves_open_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_ReservesOpenHandle *roh = cls; + struct DONAU_ReservesOpenHandle *roh = cls; const json_t *j = response; - struct TALER_DONAU_ReserveOpenResult rs = { + struct DONAU_ReserveOpenResult rs = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -323,7 +323,7 @@ handle_reserves_open_finished (void *cls, { const struct CoinData *cd = NULL; struct TALER_CoinSpendPublicKeyP coin_pub; - const struct TALER_DONAU_DenomPublicKey *dk; + const struct DONAU_DenomPublicKey *dk; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("coin_pub", &coin_pub), @@ -359,7 +359,7 @@ handle_reserves_open_finished (void *cls, rs.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; break; } - dk = TALER_DONAU_get_denomination_key_by_hash (roh->keys, + dk = DONAU_get_denomination_key_by_hash (roh->keys, &cd->h_denom_pub); if (NULL == dk) { @@ -369,7 +369,7 @@ handle_reserves_open_finished (void *cls, break; } if (GNUNET_OK != - TALER_DONAU_check_coin_conflict_ (roh->keys, + DONAU_check_coin_conflict_ (roh->keys, j, dk, &coin_pub, @@ -418,31 +418,31 @@ handle_reserves_open_finished (void *cls, &rs); roh->cb = NULL; } - TALER_DONAU_reserves_open_cancel (roh); + DONAU_reserves_open_cancel (roh); } -struct TALER_DONAU_ReservesOpenHandle * -TALER_DONAU_reserves_open ( +struct DONAU_ReservesOpenHandle * +DONAU_reserves_open ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_Amount *reserve_contribution, unsigned int coin_payments_length, - const struct TALER_DONAU_PurseDeposit coin_payments[ + const struct DONAU_PurseDeposit coin_payments[ static coin_payments_length], struct GNUNET_TIME_Timestamp expiration_time, uint32_t min_purses, - TALER_DONAU_ReservesOpenCallback cb, + DONAU_ReservesOpenCallback cb, void *cb_cls) { - struct TALER_DONAU_ReservesOpenHandle *roh; + struct DONAU_ReservesOpenHandle *roh; CURL *eh; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 32]; json_t *cpa; - roh = GNUNET_new (struct TALER_DONAU_ReservesOpenHandle); + roh = GNUNET_new (struct DONAU_ReservesOpenHandle); roh->cb = cb; roh->cb_cls = cb_cls; roh->ts = GNUNET_TIME_timestamp_get (); @@ -471,7 +471,7 @@ TALER_DONAU_reserves_open ( GNUNET_free (roh); return NULL; } - eh = TALER_DONAU_curl_easy_get_ (roh->url); + eh = DONAU_curl_easy_get_ (roh->url); if (NULL == eh) { GNUNET_break (0); @@ -491,7 +491,7 @@ TALER_DONAU_reserves_open ( GNUNET_assert (NULL != cpa); for (unsigned int i = 0; i<coin_payments_length; i++) { - const struct TALER_DONAU_PurseDeposit *pd = &coin_payments[i]; + const struct DONAU_PurseDeposit *pd = &coin_payments[i]; const struct TALER_AgeCommitmentProof *acp = pd->age_commitment_proof; struct TALER_AgeCommitmentHash ahac; struct TALER_AgeCommitmentHash *achp = NULL; @@ -561,7 +561,7 @@ TALER_DONAU_reserves_open ( } json_decref (open_obj); } - roh->keys = TALER_DONAU_keys_incref (keys); + roh->keys = DONAU_keys_incref (keys); roh->job = GNUNET_CURL_job_add2 (ctx, eh, roh->post_ctx.headers, @@ -572,8 +572,8 @@ TALER_DONAU_reserves_open ( void -TALER_DONAU_reserves_open_cancel ( - struct TALER_DONAU_ReservesOpenHandle *roh) +DONAU_reserves_open_cancel ( + struct DONAU_ReservesOpenHandle *roh) { if (NULL != roh->job) { @@ -583,7 +583,7 @@ TALER_DONAU_reserves_open_cancel ( TALER_curl_easy_post_finished (&roh->post_ctx); GNUNET_free (roh->coins); GNUNET_free (roh->url); - TALER_DONAU_keys_decref (roh->keys); + DONAU_keys_decref (roh->keys); GNUNET_free (roh); } diff --git a/src/lib/donau_api_charities_status.c b/src/lib/donau_api_charities_status.c @@ -35,13 +35,13 @@ /** * @brief A /reserves/$RID/status Handle */ -struct TALER_DONAU_ReservesStatusHandle +struct DONAU_ReservesStatusHandle { /** * The keys of the donau this request handle will use */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * The url for this request. @@ -62,7 +62,7 @@ struct TALER_DONAU_ReservesStatusHandle /** * Function to call with the result. */ - TALER_DONAU_ReservesStatusCallback cb; + DONAU_ReservesStatusCallback cb; /** * Public key of the reserve we are querying. @@ -86,12 +86,12 @@ struct TALER_DONAU_ReservesStatusHandle * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -handle_reserves_status_ok (struct TALER_DONAU_ReservesStatusHandle *rsh, +handle_reserves_status_ok (struct DONAU_ReservesStatusHandle *rsh, const json_t *j) { const json_t *history; unsigned int len; - struct TALER_DONAU_ReserveStatus rs = { + struct DONAU_ReserveStatus rs = { .hr.reply = j, .hr.http_status = MHD_HTTP_OK }; @@ -114,12 +114,12 @@ handle_reserves_status_ok (struct TALER_DONAU_ReservesStatusHandle *rsh, } len = json_array_size (history); { - struct TALER_DONAU_ReserveHistoryEntry *rhistory; + struct DONAU_ReserveHistoryEntry *rhistory; rhistory = GNUNET_new_array (len, - struct TALER_DONAU_ReserveHistoryEntry); + struct DONAU_ReserveHistoryEntry); if (GNUNET_OK != - TALER_DONAU_parse_reserve_history (rsh->keys, + DONAU_parse_reserve_history (rsh->keys, history, &rsh->reserve_pub, rs.details.ok.balance.currency, @@ -129,7 +129,7 @@ handle_reserves_status_ok (struct TALER_DONAU_ReservesStatusHandle *rsh, rhistory)) { GNUNET_break_op (0); - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; @@ -142,7 +142,7 @@ handle_reserves_status_ok (struct TALER_DONAU_ReservesStatusHandle *rsh, &rs); rsh->cb = NULL; } - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); } return GNUNET_OK; @@ -153,7 +153,7 @@ handle_reserves_status_ok (struct TALER_DONAU_ReservesStatusHandle *rsh, * Function called when we're done processing the * HTTP /reserves/$RID/status request. * - * @param cls the `struct TALER_DONAU_ReservesStatusHandle` + * @param cls the `struct DONAU_ReservesStatusHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -162,9 +162,9 @@ handle_reserves_status_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_ReservesStatusHandle *rsh = cls; + struct DONAU_ReservesStatusHandle *rsh = cls; const json_t *j = response; - struct TALER_DONAU_ReserveStatus rs = { + struct DONAU_ReserveStatus rs = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -227,27 +227,27 @@ handle_reserves_status_finished (void *cls, &rs); rsh->cb = NULL; } - TALER_DONAU_reserves_status_cancel (rsh); + DONAU_reserves_status_cancel (rsh); } -struct TALER_DONAU_ReservesStatusHandle * -TALER_DONAU_reserves_status ( +struct DONAU_ReservesStatusHandle * +DONAU_reserves_status ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, - TALER_DONAU_ReservesStatusCallback cb, + DONAU_ReservesStatusCallback cb, void *cb_cls) { - struct TALER_DONAU_ReservesStatusHandle *rsh; + struct DONAU_ReservesStatusHandle *rsh; CURL *eh; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 32]; struct TALER_ReserveSignatureP reserve_sig; struct GNUNET_TIME_Timestamp ts = GNUNET_TIME_timestamp_get (); - rsh = GNUNET_new (struct TALER_DONAU_ReservesStatusHandle); + rsh = GNUNET_new (struct DONAU_ReservesStatusHandle); rsh->cb = cb; rsh->cb_cls = cb_cls; GNUNET_CRYPTO_eddsa_key_get_public (&reserve_priv->eddsa_priv, @@ -275,7 +275,7 @@ TALER_DONAU_reserves_status ( GNUNET_free (rsh); return NULL; } - eh = TALER_DONAU_curl_easy_get_ (rsh->url); + eh = DONAU_curl_easy_get_ (rsh->url); if (NULL == eh) { GNUNET_break (0); @@ -307,7 +307,7 @@ TALER_DONAU_reserves_status ( } json_decref (status_obj); } - rsh->keys = TALER_DONAU_keys_incref (keys); + rsh->keys = DONAU_keys_incref (keys); rsh->job = GNUNET_CURL_job_add2 (ctx, eh, rsh->post_ctx.headers, @@ -318,8 +318,8 @@ TALER_DONAU_reserves_status ( void -TALER_DONAU_reserves_status_cancel ( - struct TALER_DONAU_ReservesStatusHandle *rsh) +DONAU_reserves_status_cancel ( + struct DONAU_ReservesStatusHandle *rsh) { if (NULL != rsh->job) { @@ -328,7 +328,7 @@ TALER_DONAU_reserves_status_cancel ( } TALER_curl_easy_post_finished (&rsh->post_ctx); GNUNET_free (rsh->url); - TALER_DONAU_keys_decref (rsh->keys); + DONAU_keys_decref (rsh->keys); GNUNET_free (rsh); } diff --git a/src/lib/donau_api_common.c b/src/lib/donau_api_common.c @@ -36,7 +36,7 @@ struct HistoryParseContext /** * Keys of the donau we use. */ - const struct TALER_DONAU_Keys *keys; + const struct DONAU_Keys *keys; /** * Our reserve public key. @@ -75,7 +75,7 @@ struct HistoryParseContext * @return #GNUNET_OK on success */ typedef enum GNUNET_GenericReturnValue -(*ParseHelper)(struct TALER_DONAU_ReserveHistoryEntry *rh, +(*ParseHelper)(struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction); @@ -89,7 +89,7 @@ typedef enum GNUNET_GenericReturnValue * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_credit (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_credit (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { @@ -106,7 +106,7 @@ parse_credit (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_CREDIT; + rh->type = DONAU_RTT_CREDIT; if (0 > TALER_amount_add (uc->total_in, uc->total_in, @@ -140,7 +140,7 @@ parse_credit (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_withdraw (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_withdraw (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { @@ -160,7 +160,7 @@ parse_withdraw (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_WITHDRAWAL; + rh->type = DONAU_RTT_WITHDRAWAL; if (GNUNET_OK != GNUNET_JSON_parse (transaction, withdraw_spec, @@ -184,11 +184,11 @@ parse_withdraw (struct TALER_DONAU_ReserveHistoryEntry *rh, } /* check that withdraw fee matches expectations! */ { - const struct TALER_DONAU_Keys *key_state; - const struct TALER_DONAU_DenomPublicKey *dki; + const struct DONAU_Keys *key_state; + const struct DONAU_DenomPublicKey *dki; key_state = uc->keys; - dki = TALER_DONAU_get_denomination_key_by_hash (key_state, + dki = DONAU_get_denomination_key_by_hash (key_state, &h_denom_pub); if ( (GNUNET_YES != TALER_amount_cmp_currency (&withdraw_fee, @@ -249,11 +249,11 @@ parse_withdraw (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_recoup (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_recoup (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { - const struct TALER_DONAU_Keys *key_state; + const struct DONAU_Keys *key_state; struct GNUNET_JSON_Specification recoup_spec[] = { GNUNET_JSON_spec_fixed_auto ("coin_pub", &rh->details.recoup_details.coin_pub), @@ -266,7 +266,7 @@ parse_recoup (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_RECOUP; + rh->type = DONAU_RTT_RECOUP; if (GNUNET_OK != GNUNET_JSON_parse (transaction, recoup_spec, @@ -277,7 +277,7 @@ parse_recoup (struct TALER_DONAU_ReserveHistoryEntry *rh, } key_state = uc->keys; if (GNUNET_OK != - TALER_DONAU_test_signing_key (key_state, + DONAU_test_signing_key (key_state, &rh->details. recoup_details.donau_pub)) { @@ -318,11 +318,11 @@ parse_recoup (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_closing (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_closing (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { - const struct TALER_DONAU_Keys *key_state; + const struct DONAU_Keys *key_state; struct GNUNET_JSON_Specification closing_spec[] = { GNUNET_JSON_spec_string ( "receiver_account_details", @@ -340,7 +340,7 @@ parse_closing (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_CLOSING; + rh->type = DONAU_RTT_CLOSING; if (GNUNET_OK != GNUNET_JSON_parse (transaction, closing_spec, @@ -351,7 +351,7 @@ parse_closing (struct TALER_DONAU_ReserveHistoryEntry *rh, } key_state = uc->keys; if (GNUNET_OK != - TALER_DONAU_test_signing_key ( + DONAU_test_signing_key ( key_state, &rh->details.close_details.donau_pub)) { @@ -394,7 +394,7 @@ parse_closing (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_merge (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_merge (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { @@ -423,7 +423,7 @@ parse_merge (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_MERGE; + rh->type = DONAU_RTT_MERGE; if (GNUNET_OK != GNUNET_JSON_parse (transaction, merge_spec, @@ -487,7 +487,7 @@ parse_merge (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_history (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_history (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { @@ -499,7 +499,7 @@ parse_history (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_HISTORY; + rh->type = DONAU_RTT_HISTORY; if (GNUNET_OK != GNUNET_JSON_parse (transaction, history_spec, @@ -540,7 +540,7 @@ parse_history (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_open (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_open (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { @@ -558,7 +558,7 @@ parse_open (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_OPEN; + rh->type = DONAU_RTT_OPEN; if (GNUNET_OK != GNUNET_JSON_parse (transaction, open_spec, @@ -601,7 +601,7 @@ parse_open (struct TALER_DONAU_ReserveHistoryEntry *rh, * @return #GNUNET_OK on success */ static enum GNUNET_GenericReturnValue -parse_close (struct TALER_DONAU_ReserveHistoryEntry *rh, +parse_close (struct DONAU_ReserveHistoryEntry *rh, struct HistoryParseContext *uc, const json_t *transaction) { @@ -618,7 +618,7 @@ parse_close (struct TALER_DONAU_ReserveHistoryEntry *rh, GNUNET_JSON_spec_end () }; - rh->type = TALER_DONAU_RTT_CLOSE; + rh->type = DONAU_RTT_CLOSE; if (GNUNET_OK != GNUNET_JSON_parse (transaction, close_spec, @@ -646,15 +646,15 @@ parse_close (struct TALER_DONAU_ReserveHistoryEntry *rh, enum GNUNET_GenericReturnValue -TALER_DONAU_parse_reserve_history ( - const struct TALER_DONAU_Keys *keys, +DONAU_parse_reserve_history ( + const struct DONAU_Keys *keys, const json_t *history, const struct TALER_ReservePublicKeyP *reserve_pub, const char *currency, struct TALER_Amount *total_in, struct TALER_Amount *total_out, unsigned int history_length, - struct TALER_DONAU_ReserveHistoryEntry rhistory[static history_length]) + struct DONAU_ReserveHistoryEntry rhistory[static history_length]) { const struct { @@ -688,7 +688,7 @@ TALER_DONAU_parse_reserve_history ( total_out)); for (unsigned int off = 0; off<history_length; off++) { - struct TALER_DONAU_ReserveHistoryEntry *rh = &rhistory[off]; + struct DONAU_ReserveHistoryEntry *rh = &rhistory[off]; json_t *transaction; struct TALER_Amount amount; const char *type; @@ -752,32 +752,32 @@ TALER_DONAU_parse_reserve_history ( void -TALER_DONAU_free_reserve_history ( +DONAU_free_reserve_history ( unsigned int len, - struct TALER_DONAU_ReserveHistoryEntry rhistory[static len]) + struct DONAU_ReserveHistoryEntry rhistory[static len]) { for (unsigned int i = 0; i<len; i++) { switch (rhistory[i].type) { - case TALER_DONAU_RTT_CREDIT: + case DONAU_RTT_CREDIT: GNUNET_free (rhistory[i].details.in_details.sender_url); break; - case TALER_DONAU_RTT_WITHDRAWAL: + case DONAU_RTT_WITHDRAWAL: break; - case TALER_DONAU_RTT_AGEWITHDRAWAL: + case DONAU_RTT_AGEWITHDRAWAL: break; - case TALER_DONAU_RTT_RECOUP: + case DONAU_RTT_RECOUP: break; - case TALER_DONAU_RTT_CLOSING: + case DONAU_RTT_CLOSING: break; - case TALER_DONAU_RTT_HISTORY: + case DONAU_RTT_HISTORY: break; - case TALER_DONAU_RTT_MERGE: + case DONAU_RTT_MERGE: break; - case TALER_DONAU_RTT_OPEN: + case DONAU_RTT_OPEN: break; - case TALER_DONAU_RTT_CLOSE: + case DONAU_RTT_CLOSE: break; } } @@ -794,7 +794,7 @@ struct CoinHistoryParseContext /** * Denomination of the coin. */ - const struct TALER_DONAU_DenomPublicKey *dk; + const struct DONAU_DenomPublicKey *dk; /** * Our coin public key. @@ -851,7 +851,7 @@ help_deposit (struct CoinHistoryParseContext *pc, struct GNUNET_HashCode wallet_data_hash; bool no_wallet_data_hash; struct GNUNET_TIME_Timestamp wallet_timestamp; - struct TALER_CharityPublicKeyP charity_pub; + struct DONAU_CharityPublicKeyP charity_pub; struct GNUNET_TIME_Timestamp refund_deadline = {0}; struct TALER_CoinSpendSignatureP sig; struct TALER_AgeCommitmentHash hac; @@ -1018,8 +1018,8 @@ help_refund (struct CoinHistoryParseContext *pc, json_t *transaction) { struct TALER_PrivateContractHashP h_contract_terms; - struct TALER_CharityPublicKeyP charity_pub; - struct TALER_CharitySignatureP sig; + struct DONAU_CharityPublicKeyP charity_pub; + struct DONAU_CharitySignatureP sig; struct TALER_Amount refund_fee; struct TALER_Amount sig_amount; uint64_t rtransaction_id; @@ -1104,7 +1104,7 @@ help_recoup (struct CoinHistoryParseContext *pc, struct TALER_ReservePublicKeyP reserve_pub; struct GNUNET_TIME_Timestamp timestamp; union TALER_DenominationBlindingKeyP coin_bks; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_DonauSignatureP donau_sig; struct TALER_CoinSpendSignatureP coin_sig; struct GNUNET_JSON_Specification spec[] = { @@ -1175,7 +1175,7 @@ help_recoup_refresh (struct CoinHistoryParseContext *pc, struct TALER_CoinSpendPublicKeyP old_coin_pub; union TALER_DenominationBlindingKeyP coin_bks; struct GNUNET_TIME_Timestamp timestamp; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_DonauSignatureP donau_sig; struct TALER_CoinSpendSignatureP coin_sig; struct GNUNET_JSON_Specification spec[] = { @@ -1243,7 +1243,7 @@ help_old_coin_recoup (struct CoinHistoryParseContext *pc, { /* This is the coin that was credited in a recoup, the value being credited to the this coin. */ - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_DonauSignatureP donau_sig; struct TALER_CoinSpendPublicKeyP new_coin_pub; struct GNUNET_TIME_Timestamp timestamp; @@ -1376,7 +1376,7 @@ help_purse_refund (struct CoinHistoryParseContext *pc, { struct TALER_PurseContractPublicKeyP purse_pub; struct TALER_Amount refund_fee; - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; struct TALER_DonauSignatureP donau_sig; struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_amount_any ("refund_fee", @@ -1471,8 +1471,8 @@ help_reserve_open_deposit (struct CoinHistoryParseContext *pc, enum GNUNET_GenericReturnValue -TALER_DONAU_verify_coin_history ( - const struct TALER_DONAU_DenomPublicKey *dk, +DONAU_verify_coin_history ( + const struct DONAU_DenomPublicKey *dk, const struct TALER_CoinSpendPublicKeyP *coin_pub, const json_t *history, struct TALER_Amount *total) @@ -1619,14 +1619,14 @@ TALER_DONAU_verify_coin_history ( } -const struct TALER_DONAU_SigningPublicKey * -TALER_DONAU_get_signing_key_info ( - const struct TALER_DONAU_Keys *keys, - const struct TALER_DonauPublicKeyP *donau_pub) +const struct DONAU_SigningPublicKey * +DONAU_get_signing_key_info ( + const struct DONAU_Keys *keys, + const struct DONAU_DonauPublicKeyP *donau_pub) { for (unsigned int i = 0; i<keys->num_sign_keys; i++) { - const struct TALER_DONAU_SigningPublicKey *spk + const struct DONAU_SigningPublicKey *spk = &keys->sign_keys[i]; if (0 == GNUNET_memcmp (donau_pub, @@ -1638,7 +1638,7 @@ TALER_DONAU_get_signing_key_info ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_create_conflict_ ( +DONAU_check_purse_create_conflict_ ( const struct TALER_PurseContractSignatureP *cpurse_sig, const struct TALER_PurseContractPublicKeyP *purse_pub, const json_t *proof) @@ -1698,7 +1698,7 @@ TALER_DONAU_check_purse_create_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_merge_conflict_ ( +DONAU_check_purse_merge_conflict_ ( const struct TALER_PurseMergeSignatureP *cmerge_sig, const struct TALER_PurseMergePublicKeyP *merge_pub, const struct TALER_PurseContractPublicKeyP *purse_pub, @@ -1762,7 +1762,7 @@ TALER_DONAU_check_purse_merge_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_coin_conflict_ ( +DONAU_check_purse_coin_conflict_ ( const struct TALER_PurseContractPublicKeyP *purse_pub, const char *donau_url, const json_t *proof, @@ -1819,7 +1819,7 @@ TALER_DONAU_check_purse_coin_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_econtract_conflict_ ( +DONAU_check_purse_econtract_conflict_ ( const struct TALER_PurseContractSignatureP *ccontract_sig, const struct TALER_PurseContractPublicKeyP *purse_pub, const json_t *proof) @@ -1868,8 +1868,8 @@ TALER_DONAU_check_purse_econtract_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_amount_conflict_ ( - const struct TALER_DONAU_Keys *keys, +DONAU_check_coin_amount_conflict_ ( + const struct DONAU_Keys *keys, const json_t *proof, struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_Amount *remaining) @@ -1877,7 +1877,7 @@ TALER_DONAU_check_coin_amount_conflict_ ( const json_t *history; struct TALER_Amount total; struct TALER_DenominationHashP h_denom_pub; - const struct TALER_DONAU_DenomPublicKey *dki; + const struct DONAU_DenomPublicKey *dki; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ("coin_pub", coin_pub), @@ -1896,7 +1896,7 @@ TALER_DONAU_check_coin_amount_conflict_ ( GNUNET_break_op (0); return GNUNET_SYSERR; } - dki = TALER_DONAU_get_denomination_key_by_hash ( + dki = DONAU_get_denomination_key_by_hash ( keys, &h_denom_pub); if (NULL == dki) @@ -1905,7 +1905,7 @@ TALER_DONAU_check_coin_amount_conflict_ ( return GNUNET_SYSERR; } if (GNUNET_OK != - TALER_DONAU_verify_coin_history (dki, + DONAU_verify_coin_history (dki, coin_pub, history, &total)) @@ -1938,7 +1938,7 @@ TALER_DONAU_check_coin_amount_conflict_ ( * @return #GNUNET_OK if @a coin_sig is not in @a proof */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_signature_conflict_ ( +DONAU_check_coin_signature_conflict_ ( const json_t *proof, const struct TALER_CoinSpendSignatureP *coin_sig) { @@ -1980,7 +1980,7 @@ TALER_DONAU_check_coin_signature_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_denomination_conflict_ ( +DONAU_check_coin_denomination_conflict_ ( const json_t *proof, const struct TALER_DenominationHashP *ch_denom_pub) { @@ -2012,10 +2012,10 @@ TALER_DONAU_check_coin_denomination_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_conflict_ ( - const struct TALER_DONAU_Keys *keys, +DONAU_check_coin_conflict_ ( + const struct DONAU_Keys *keys, const json_t *proof, - const struct TALER_DONAU_DenomPublicKey *dk, + const struct DONAU_DenomPublicKey *dk, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendSignatureP *coin_sig, const struct TALER_Amount *required) @@ -2031,7 +2031,7 @@ TALER_DONAU_check_coin_conflict_ ( struct TALER_CoinSpendPublicKeyP pcoin_pub; if (GNUNET_OK != - TALER_DONAU_check_coin_amount_conflict_ ( + DONAU_check_coin_amount_conflict_ ( keys, proof, &pcoin_pub, @@ -2057,7 +2057,7 @@ TALER_DONAU_check_coin_conflict_ ( return GNUNET_SYSERR; } if (GNUNET_OK != - TALER_DONAU_check_coin_signature_conflict_ ( + DONAU_check_coin_signature_conflict_ ( proof, coin_sig)) { @@ -2073,7 +2073,7 @@ TALER_DONAU_check_coin_conflict_ ( struct TALER_CoinSpendPublicKeyP pcoin_pub; if (GNUNET_OK != - TALER_DONAU_check_coin_amount_conflict_ ( + DONAU_check_coin_amount_conflict_ ( keys, proof, &pcoin_pub, @@ -2091,7 +2091,7 @@ TALER_DONAU_check_coin_conflict_ ( return GNUNET_SYSERR; } if (GNUNET_OK != - TALER_DONAU_check_coin_denomination_conflict_ ( + DONAU_check_coin_denomination_conflict_ ( proof, &dk->h_key)) { @@ -2110,14 +2110,14 @@ TALER_DONAU_check_coin_conflict_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_get_min_denomination_ ( - const struct TALER_DONAU_Keys *keys, +DONAU_get_min_denomination_ ( + const struct DONAU_Keys *keys, struct TALER_Amount *min) { bool have_min = false; for (unsigned int i = 0; i<keys->num_denom_keys; i++) { - const struct TALER_DONAU_DenomPublicKey *dk = &keys->denom_keys[i]; + const struct DONAU_DenomPublicKey *dk = &keys->denom_keys[i]; if (! have_min) { @@ -2140,12 +2140,12 @@ TALER_DONAU_get_min_denomination_ ( enum GNUNET_GenericReturnValue -TALER_DONAU_verify_deposit_signature_ ( - const struct TALER_DONAU_DepositContractDetail *dcd, +DONAU_verify_deposit_signature_ ( + const struct DONAU_DepositContractDetail *dcd, const struct TALER_ExtensionPolicyHashP *ech, const struct TALER_CharityWireHashP *h_wire, - const struct TALER_DONAU_CoinDepositDetail *cdd, - const struct TALER_DONAU_DenomPublicKey *dki) + const struct DONAU_CoinDepositDetail *cdd, + const struct DONAU_DenomPublicKey *dki) { if (GNUNET_OK != TALER_wallet_deposit_verify (&cdd->amount, @@ -2213,7 +2213,7 @@ TALER_DONAU_verify_deposit_signature_ ( static enum GNUNET_GenericReturnValue parse_restrictions (const json_t *jresta, unsigned int *resta_len, - struct TALER_DONAU_AccountRestriction **resta) + struct DONAU_AccountRestriction **resta) { if (! json_is_array (jresta)) { @@ -2228,12 +2228,12 @@ parse_restrictions (const json_t *jresta, return GNUNET_OK; } *resta = GNUNET_new_array (*resta_len, - struct TALER_DONAU_AccountRestriction); + struct DONAU_AccountRestriction); for (unsigned int i = 0; i<*resta_len; i++) { const json_t *jr = json_array_get (jresta, i); - struct TALER_DONAU_AccountRestriction *ar = &(*resta)[i]; + struct DONAU_AccountRestriction *ar = &(*resta)[i]; const char *type = json_string_value (json_object_get (jr, "type")); @@ -2245,7 +2245,7 @@ parse_restrictions (const json_t *jresta, if (0 == strcmp (type, "deny")) { - ar->type = TALER_DONAU_AR_DENY; + ar->type = DONAU_AR_DENY; continue; } if (0 == strcmp (type, @@ -2277,7 +2277,7 @@ parse_restrictions (const json_t *jresta, GNUNET_break_op (0); goto fail; } - ar->type = TALER_DONAU_AR_REGEX; + ar->type = DONAU_AR_REGEX; ar->details.regex.posix_egrep = GNUNET_strdup (regex); ar->details.regex.human_hint = GNUNET_strdup (hint); continue; @@ -2295,22 +2295,22 @@ fail: enum GNUNET_GenericReturnValue -TALER_DONAU_parse_accounts ( +DONAU_parse_accounts ( const struct TALER_MasterPublicKeyP *master_pub, const json_t *accounts, unsigned int was_length, - struct TALER_DONAU_WireAccount was[static was_length]) + struct DONAU_WireAccount was[static was_length]) { memset (was, 0, - sizeof (struct TALER_DONAU_WireAccount) * was_length); + sizeof (struct DONAU_WireAccount) * was_length); GNUNET_assert (was_length == json_array_size (accounts)); for (unsigned int i = 0; i<was_length; i++) { - struct TALER_DONAU_WireAccount *wa = &was[i]; + struct DONAU_WireAccount *wa = &was[i]; const char *payto_uri; const char *conversion_url; const json_t *credit_restrictions; @@ -2398,19 +2398,19 @@ TALER_DONAU_parse_accounts ( */ static void free_restrictions (unsigned int ar_len, - struct TALER_DONAU_AccountRestriction ar[static ar_len]) + struct DONAU_AccountRestriction ar[static ar_len]) { for (unsigned int i = 0; i<ar_len; i++) { - struct TALER_DONAU_AccountRestriction *a = &ar[i]; + struct DONAU_AccountRestriction *a = &ar[i]; switch (a->type) { - case TALER_DONAU_AR_INVALID: + case DONAU_AR_INVALID: GNUNET_break (0); break; - case TALER_DONAU_AR_DENY: + case DONAU_AR_DENY: break; - case TALER_DONAU_AR_REGEX: + case DONAU_AR_REGEX: GNUNET_free (ar->details.regex.posix_egrep); GNUNET_free (ar->details.regex.human_hint); json_decref (ar->details.regex.human_hint_i18n); @@ -2421,13 +2421,13 @@ free_restrictions (unsigned int ar_len, void -TALER_DONAU_free_accounts ( +DONAU_free_accounts ( unsigned int was_len, - struct TALER_DONAU_WireAccount was[static was_len]) + struct DONAU_WireAccount was[static was_len]) { for (unsigned int i = 0; i<was_len; i++) { - struct TALER_DONAU_WireAccount *wa = &was[i]; + struct DONAU_WireAccount *wa = &was[i]; GNUNET_free (wa->payto_uri); GNUNET_free (wa->conversion_url); diff --git a/src/lib/donau_api_common.h b/src/lib/donau_api_common.h @@ -37,7 +37,7 @@ * @return #GNUNET_OK if the @a proof is OK for @a purse_pub and conflicts with @a cpurse_sig */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_create_conflict_ ( +DONAU_check_purse_create_conflict_ ( const struct TALER_PurseContractSignatureP *cpurse_sig, const struct TALER_PurseContractPublicKeyP *purse_pub, const json_t *proof); @@ -56,7 +56,7 @@ TALER_DONAU_check_purse_create_conflict_ ( * @return #GNUNET_OK if the @a proof is OK for @a purse_pub and @a merge_pub and conflicts with @a cmerge_sig */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_merge_conflict_ ( +DONAU_check_purse_merge_conflict_ ( const struct TALER_PurseMergeSignatureP *cmerge_sig, const struct TALER_PurseMergePublicKeyP *merge_pub, const struct TALER_PurseContractPublicKeyP *purse_pub, @@ -82,7 +82,7 @@ TALER_DONAU_check_purse_merge_conflict_ ( * @return #GNUNET_OK if the @a proof is OK for @a purse_pub and showing that @a coin_pub was spent using @a coin_sig. */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_coin_conflict_ ( +DONAU_check_purse_coin_conflict_ ( const struct TALER_PurseContractPublicKeyP *purse_pub, const char *donau_url, const json_t *proof, @@ -102,7 +102,7 @@ TALER_DONAU_check_purse_coin_conflict_ ( * @return #GNUNET_OK if the @a proof is OK for @a purse_pub and conflicts with @a ccontract_sig */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_purse_econtract_conflict_ ( +DONAU_check_purse_econtract_conflict_ ( const struct TALER_PurseContractSignatureP *ccontract_sig, const struct TALER_PurseContractPublicKeyP *purse_pub, const json_t *proof); @@ -121,8 +121,8 @@ TALER_DONAU_check_purse_econtract_conflict_ ( * @return #GNUNET_OK if the @a proof is OK for @a purse_pub demonstrating that @a coin_pub has only @a remaining balance. */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_amount_conflict_ ( - const struct TALER_DONAU_Keys *keys, +DONAU_check_coin_amount_conflict_ ( + const struct DONAU_Keys *keys, const json_t *proof, struct TALER_CoinSpendPublicKeyP *coin_pub, struct TALER_Amount *remaining); @@ -132,7 +132,7 @@ TALER_DONAU_check_coin_amount_conflict_ ( * Verify that @a proof contains a coin history that demonstrates that @a * coin_pub was previously used with a denomination key that is different from * @a ch_denom_pub. Note that the coin history MUST have been checked before - * using #TALER_DONAU_check_coin_amount_conflict_(). + * using #DONAU_check_coin_amount_conflict_(). * * @param proof a proof to check * @param ch_denom_pub hash of the conflicting denomination @@ -140,7 +140,7 @@ TALER_DONAU_check_coin_amount_conflict_ ( * denomination hash given by the history of the coin */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_denomination_conflict_ ( +DONAU_check_coin_denomination_conflict_ ( const json_t *proof, const struct TALER_DenominationHashP *ch_denom_pub); @@ -156,7 +156,7 @@ TALER_DONAU_check_coin_denomination_conflict_ ( * @return #GNUNET_OK if @a coin_sig is not in @a proof */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_signature_conflict_ ( +DONAU_check_coin_signature_conflict_ ( const json_t *proof, const struct TALER_CoinSpendSignatureP *coin_sig); @@ -175,10 +175,10 @@ TALER_DONAU_check_coin_signature_conflict_ ( * @return #GNUNET_OK if @a proof holds */ enum GNUNET_GenericReturnValue -TALER_DONAU_check_coin_conflict_ ( - const struct TALER_DONAU_Keys *keys, +DONAU_check_coin_conflict_ ( + const struct DONAU_Keys *keys, const json_t *proof, - const struct TALER_DONAU_DenomPublicKey *dk, + const struct DONAU_DenomPublicKey *dk, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendSignatureP *coin_sig, const struct TALER_Amount *required); @@ -192,8 +192,8 @@ TALER_DONAU_check_coin_conflict_ ( * @return #GNUNET_SYSERR if there are no denominations in @a keys enum GNUNET_GenericReturnValue -TALER_DONAU_get_min_denomination_ ( - const struct TALER_DONAU_Keys *keys, +DONAU_get_min_denomination_ ( + const struct DONAU_Keys *keys, struct TALER_Amount *min); @@ -208,12 +208,12 @@ TALER_DONAU_get_min_denomination_ ( * @return #GNUNET_OK if signatures are OK, #GNUNET_SYSERR if not */ enum GNUNET_GenericReturnValue -TALER_DONAU_verify_deposit_signature_ ( - const struct TALER_DONAU_DepositContractDetail *dcd, +DONAU_verify_deposit_signature_ ( + const struct DONAU_DepositContractDetail *dcd, const struct TALER_ExtensionPolicyHashP *ech, const struct TALER_CharityWireHashP *h_wire, - const struct TALER_DONAU_CoinDepositDetail *cdd, - const struct TALER_DONAU_DenomPublicKey *dki); + const struct DONAU_CoinDepositDetail *cdd, + const struct DONAU_DenomPublicKey *dki); #endif diff --git a/src/lib/donau_api_csr_issue_receipts.c b/src/lib/donau_api_csr_issue_receipts.c @@ -36,12 +36,12 @@ /** * @brief A Clause Schnorr R Handle */ -struct TALER_DONAU_CsRWithdrawHandle +struct DONAU_CsRWithdrawHandle { /** * Function to call with the result. */ - TALER_DONAU_CsRWithdrawCallback cb; + DONAU_CsRWithdrawCallback cb; /** * Closure for @a cb. @@ -81,11 +81,11 @@ struct TALER_DONAU_CsRWithdrawHandle * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static enum GNUNET_GenericReturnValue -csr_ok (struct TALER_DONAU_CsRWithdrawHandle *csrh, +csr_ok (struct DONAU_CsRWithdrawHandle *csrh, const json_t *av, - struct TALER_DONAU_HttpResponse *hr) + struct DONAU_HttpResponse *hr) { - struct TALER_DONAU_CsRWithdrawResponse csrr = { + struct DONAU_CsRWithdrawResponse csrr = { .hr = *hr, }; struct GNUNET_JSON_Specification spec[] = { @@ -112,7 +112,7 @@ csr_ok (struct TALER_DONAU_CsRWithdrawHandle *csrh, /** * Function called when we're done processing the HTTP /csr request. * - * @param cls the `struct TALER_DONAU_CsRWithdrawHandle` + * @param cls the `struct DONAU_CsRWithdrawHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -121,13 +121,13 @@ handle_csr_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_CsRWithdrawHandle *csrh = cls; + struct DONAU_CsRWithdrawHandle *csrh = cls; const json_t *j = response; - struct TALER_DONAU_HttpResponse hr = { + struct DONAU_HttpResponse hr = { .reply = j, .http_status = (unsigned int) response_code }; - struct TALER_DONAU_CsRWithdrawResponse csrr = { + struct DONAU_CsRWithdrawResponse csrr = { .hr = hr }; @@ -150,7 +150,7 @@ handle_csr_finished (void *cls, break; } } - TALER_DONAU_csr_withdraw_cancel (csrh); + DONAU_csr_withdraw_cancel (csrh); return; case MHD_HTTP_BAD_REQUEST: /* This should never happen, either us or the donau is buggy @@ -194,27 +194,27 @@ handle_csr_finished (void *cls, csrh->cb (csrh->cb_cls, &csrr); csrh->cb = NULL; - TALER_DONAU_csr_withdraw_cancel (csrh); + DONAU_csr_withdraw_cancel (csrh); } -struct TALER_DONAU_CsRWithdrawHandle * -TALER_DONAU_csr_withdraw ( +struct DONAU_CsRWithdrawHandle * +DONAU_csr_withdraw ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - const struct TALER_DONAU_DenomPublicKey *pk, + const struct DONAU_DenomPublicKey *pk, const struct TALER_CsNonce *nonce, - TALER_DONAU_CsRWithdrawCallback res_cb, + DONAU_CsRWithdrawCallback res_cb, void *res_cb_cls) { - struct TALER_DONAU_CsRWithdrawHandle *csrh; + struct DONAU_CsRWithdrawHandle *csrh; if (TALER_DENOMINATION_CS != pk->key.cipher) { GNUNET_break (0); return NULL; } - csrh = GNUNET_new (struct TALER_DONAU_CsRWithdrawHandle); + csrh = GNUNET_new (struct DONAU_CsRWithdrawHandle); csrh->cb = res_cb; csrh->cb_cls = res_cb_cls; csrh->url = TALER_url_join (donau_url, @@ -238,7 +238,7 @@ TALER_DONAU_csr_withdraw ( &pk->h_key, sizeof(struct TALER_DenominationHashP))); GNUNET_assert (NULL != req); - eh = TALER_DONAU_curl_easy_get_ (csrh->url); + eh = DONAU_curl_easy_get_ (csrh->url); if ( (NULL == eh) || (GNUNET_OK != TALER_curl_easy_post (&csrh->post_ctx, @@ -265,8 +265,8 @@ TALER_DONAU_csr_withdraw ( void -TALER_DONAU_csr_withdraw_cancel (struct - TALER_DONAU_CsRWithdrawHandle *csrh) +DONAU_csr_withdraw_cancel (struct + DONAU_CsRWithdrawHandle *csrh) { if (NULL != csrh->job) { diff --git a/src/lib/donau_api_curl_defaults.c b/src/lib/donau_api_curl_defaults.c @@ -24,7 +24,7 @@ CURL * -TALER_DONAU_curl_easy_get_ (const char *url) +DONAU_curl_easy_get_ (const char *url) { CURL *eh; diff --git a/src/lib/donau_api_curl_defaults.h b/src/lib/donau_api_curl_defaults.h @@ -35,6 +35,6 @@ * @param url URL to query */ CURL * -TALER_DONAU_curl_easy_get_ (const char *url); +DONAU_curl_easy_get_ (const char *url); #endif /* _TALER_CURL_DEFAULTS_H */ diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c @@ -80,7 +80,7 @@ /** * Handle for a GET /keys request. */ -struct TALER_DONAU_GetKeysHandle +struct DONAU_GetKeysHandle { /** @@ -96,7 +96,7 @@ struct TALER_DONAU_GetKeysHandle /** * Previous /keys response, NULL for none. */ - struct TALER_DONAU_Keys *prev_keys; + struct DONAU_Keys *prev_keys; /** * Entry for this request with the `struct GNUNET_CURL_Context`. @@ -113,7 +113,7 @@ struct TALER_DONAU_GetKeysHandle * Function to call with the donau's certification data, * NULL if this has already been done. */ - TALER_DONAU_GetKeysCallback cert_cb; + DONAU_GetKeysCallback cert_cb; /** * Closure to pass to @e cert_cb. @@ -138,7 +138,7 @@ struct TALER_DONAU_GetKeysHandle * invalid or the @a sign_key_obj is malformed. */ static enum GNUNET_GenericReturnValue -parse_json_signkey (struct TALER_DONAU_SigningPublicKeyAndValidity *sign_key, +parse_json_signkey (struct DONAU_SigningPublicKeyAndValidity *sign_key, const json_t *sign_key_obj) { struct GNUNET_JSON_Specification spec[] = { @@ -200,7 +200,7 @@ parse_json_signkey (struct TALER_DONAU_SigningPublicKeyAndValidity *sign_key, */ static enum GNUNET_GenericReturnValue parse_json_denomkey_partially ( - struct TALER_DONAU_DenomPublicKey *denom_key, + struct DONAU_DenomPublicKey *denom_key, enum TALER_DenominationCipher cipher, bool check_sigs, const json_t *denom_key_obj, @@ -280,12 +280,12 @@ EXITIF_exit: static enum GNUNET_GenericReturnValue decode_keys_json (const json_t *resp_obj, bool check_sig, - struct TALER_DONAU_Keys *key_data, - enum TALER_DONAU_VersionCompatibility *vc) + struct DONAU_Keys *key_data, + enum DONAU_VersionCompatibility *vc) { struct TALER_DonauSignatureP denominations_sig; struct GNUNET_HashCode hash_xor = {0}; - struct TALER_DonauPublicKeyP pub; + struct DONAU_DonauPublicKeyP pub; const json_t *wblwk = NULL; const json_t *global_fees; const json_t *sign_keys_array; @@ -340,18 +340,18 @@ decode_keys_json (const json_t *resp_obj, GNUNET_break_op (0); return GNUNET_SYSERR; } - *vc = TALER_DONAU_VC_MATCH; + *vc = DONAU_VC_MATCH; if (DONAU_PROTOCOL_CURRENT < current) { - *vc |= TALER_DONAU_VC_NEWER; + *vc |= DONAU_VC_NEWER; if (DONAU_PROTOCOL_CURRENT < current - age) - *vc |= TALER_DONAU_VC_INCOMPATIBLE; + *vc |= DONAU_VC_INCOMPATIBLE; } if (DONAU_PROTOCOL_CURRENT > current) { - *vc |= TALER_DONAU_VC_OLDER; + *vc |= DONAU_VC_OLDER; if (DONAU_PROTOCOL_CURRENT - DONAU_PROTOCOL_AGE > current) - *vc |= TALER_DONAU_VC_INCOMPATIBLE; + *vc |= DONAU_VC_INCOMPATIBLE; } key_data->version = GNUNET_strdup (ver); } @@ -482,7 +482,7 @@ decode_keys_json (const json_t *resp_obj, key_data->global_fees = GNUNET_new_array (key_data->num_global_fees, - struct TALER_DONAU_GlobalFee); + struct DONAU_GlobalFee); json_array_foreach (global_fees, index, global_fee) { EXITIF (GNUNET_SYSERR == @@ -503,7 +503,7 @@ decode_keys_json (const json_t *resp_obj, key_data->sign_keys = GNUNET_new_array (key_data->num_sign_keys, - struct TALER_DONAU_SigningPublicKey); + struct DONAU_SigningPublicKey); json_array_foreach (sign_keys_array, index, sign_key_obj) { EXITIF (GNUNET_SYSERR == parse_json_signkey (&key_data->sign_keys[index], @@ -550,7 +550,7 @@ decode_keys_json (const json_t *resp_obj, key_data->accounts_len, json_array_size (accounts)); EXITIF (GNUNET_OK != - TALER_DONAU_parse_accounts (&key_data->master_pub, + DONAU_parse_accounts (&key_data->master_pub, accounts, key_data->accounts_len, key_data->accounts)); @@ -632,7 +632,7 @@ decode_keys_json (const json_t *resp_obj, /* Set the common fields from the group for this particular denomination. Required to make the validity check inside parse_json_denomkey_partially pass */ - struct TALER_DONAU_DenomPublicKey dk = { + struct DONAU_DenomPublicKey dk = { .key.cipher = group.cipher, .value = group.value, .fees = group.fees, @@ -703,7 +703,7 @@ decode_keys_json (const json_t *resp_obj, /* Merge with the existing auditor information we have (/keys cherry picking) */ json_array_foreach (auditors_array, index, auditor_info) { - struct TALER_DONAU_AuditorInformation ai; + struct DONAU_AuditorInformation ai; bool found = false; memset (&ai, @@ -716,7 +716,7 @@ decode_keys_json (const json_t *resp_obj, key_data)); for (unsigned int j = 0; j<key_data->num_auditors; j++) { - struct TALER_DONAU_AuditorInformation *aix = &key_data->auditors[j]; + struct DONAU_AuditorInformation *aix = &key_data->auditors[j]; if (0 == GNUNET_memcmp (&ai.auditor_pub, &aix->auditor_pub)) @@ -802,7 +802,7 @@ decode_keys_json (const json_t *resp_obj, if (check_sig) { EXITIF (GNUNET_OK != - TALER_DONAU_test_signing_key (key_data, + DONAU_test_signing_key (key_data, &pub)); EXITIF (GNUNET_OK != TALER_donau_online_key_set_verify ( @@ -814,7 +814,7 @@ decode_keys_json (const json_t *resp_obj, return GNUNET_OK; EXITIF_exit: - *vc = TALER_DONAU_VC_PROTOCOL_ERROR; + *vc = DONAU_VC_PROTOCOL_ERROR; return GNUNET_SYSERR; } @@ -832,13 +832,13 @@ keys_completed_cb (void *cls, long response_code, const void *resp_obj) { - struct TALER_DONAU_GetKeysHandle *gkh = cls; + struct DONAU_GetKeysHandle *gkh = cls; const json_t *j = resp_obj; - struct TALER_DONAU_Keys *kd = NULL; - struct TALER_DONAU_KeysResponse kresp = { + struct DONAU_Keys *kd = NULL; + struct DONAU_KeysResponse kresp = { .hr.reply = j, .hr.http_status = (unsigned int) response_code, - .details.ok.compat = TALER_DONAU_VC_PROTOCOL_ERROR, + .details.ok.compat = DONAU_VC_PROTOCOL_ERROR, }; gkh->job = NULL; @@ -871,11 +871,11 @@ keys_completed_cb (void *cls, response_code = 0; break; } - kd = GNUNET_new (struct TALER_DONAU_Keys); + kd = GNUNET_new (struct DONAU_Keys); kd->donau_url = GNUNET_strdup (gkh->donau_url); if (NULL != gkh->prev_keys) { - const struct TALER_DONAU_Keys *kd_old = gkh->prev_keys; + const struct DONAU_Keys *kd_old = gkh->prev_keys; /* We keep the denomination keys and auditor signatures from the previous iteration (/keys cherry picking) */ @@ -890,19 +890,19 @@ keys_completed_cb (void *cls, GNUNET_memcpy (kd->denom_keys, kd_old->denom_keys, kd_old->num_denom_keys - * sizeof (struct TALER_DONAU_DenomPublicKey)); + * sizeof (struct DONAU_DenomPublicKey)); for (unsigned int i = 0; i<kd_old->num_denom_keys; i++) TALER_denom_pub_deep_copy (&kd->denom_keys[i].key, &kd_old->denom_keys[i].key); kd->num_auditors = kd_old->num_auditors; kd->auditors = GNUNET_new_array (kd->num_auditors, - struct TALER_DONAU_AuditorInformation); + struct DONAU_AuditorInformation); /* Now the necessary deep copy... */ for (unsigned int i = 0; i<kd_old->num_auditors; i++) { - const struct TALER_DONAU_AuditorInformation *aold = + const struct DONAU_AuditorInformation *aold = &kd_old->auditors[i]; - struct TALER_DONAU_AuditorInformation *anew = &kd->auditors[i]; + struct DONAU_AuditorInformation *anew = &kd->auditors[i]; anew->auditor_pub = aold->auditor_pub; anew->auditor_url = GNUNET_strdup (aold->auditor_url); @@ -913,7 +913,7 @@ keys_completed_cb (void *cls, anew->denom_keys, aold->denom_keys, aold->num_denom_keys - * sizeof (struct TALER_DONAU_AuditorDenominationInfo)); + * sizeof (struct DONAU_AuditorDenominationInfo)); } } /* Now decode fresh /keys response */ @@ -925,7 +925,7 @@ keys_completed_cb (void *cls, { TALER_LOG_ERROR ("Could not decode /keys response\n"); kd->rc = 1; - TALER_DONAU_keys_decref (kd); + DONAU_keys_decref (kd); kd = NULL; kresp.hr.http_status = 0; kresp.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; @@ -983,7 +983,7 @@ keys_completed_cb (void *cls, gkh->cert_cb (gkh->cert_cb_cls, &kresp, kd); - TALER_DONAU_get_keys_cancel (gkh); + DONAU_get_keys_cancel (gkh); } @@ -1097,7 +1097,7 @@ parse_date_string (const char *dateline, * @param buffer header data received * @param size size of an item in @a buffer * @param nitems number of items in @a buffer - * @param userdata the `struct TALER_DONAU_GetKeysHandle` + * @param userdata the `struct DONAU_GetKeysHandle` * @return `size * nitems` on success (everything else aborts) */ static size_t @@ -1106,7 +1106,7 @@ header_cb (char *buffer, size_t nitems, void *userdata) { - struct TALER_DONAU_GetKeysHandle *kr = userdata; + struct DONAU_GetKeysHandle *kr = userdata; size_t total = size * nitems; char *val; @@ -1137,20 +1137,20 @@ header_cb (char *buffer, } -struct TALER_DONAU_GetKeysHandle * -TALER_DONAU_get_keys ( +struct DONAU_GetKeysHandle * +DONAU_get_keys ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *last_keys, - TALER_DONAU_GetKeysCallback cert_cb, + struct DONAU_Keys *last_keys, + DONAU_GetKeysCallback cert_cb, void *cert_cb_cls) { - struct TALER_DONAU_GetKeysHandle *gkh; + struct DONAU_GetKeysHandle *gkh; CURL *eh; TALER_LOG_DEBUG ("Connecting to the donau (%s)\n", url); - gkh = GNUNET_new (struct TALER_DONAU_GetKeysHandle); + gkh = GNUNET_new (struct DONAU_GetKeysHandle); gkh->donau_url = GNUNET_strdup (url); gkh->cert_cb = cert_cb; gkh->cert_cb_cls = cert_cb_cls; @@ -1159,7 +1159,7 @@ TALER_DONAU_get_keys ( GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Requesting keys with URL `%s'.\n", gkh->url); - eh = TALER_DONAU_curl_easy_get_ (gkh->url); + eh = DONAU_curl_easy_get_ (gkh->url); if (NULL == eh) { GNUNET_break (0); @@ -1193,15 +1193,15 @@ TALER_DONAU_get_keys ( void -TALER_DONAU_get_keys_cancel ( - struct TALER_DONAU_GetKeysHandle *gkh) +DONAU_get_keys_cancel ( + struct DONAU_GetKeysHandle *gkh) { if (NULL != gkh->job) { GNUNET_CURL_job_cancel (gkh->job); gkh->job = NULL; } - TALER_DONAU_keys_decref (gkh->prev_keys); + DONAU_keys_decref (gkh->prev_keys); GNUNET_free (gkh->donau_url); GNUNET_free (gkh->url); GNUNET_free (gkh); @@ -1209,9 +1209,9 @@ TALER_DONAU_get_keys_cancel ( enum GNUNET_GenericReturnValue -TALER_DONAU_test_signing_key ( - const struct TALER_DONAU_Keys *keys, - const struct TALER_DonauPublicKeyP *pub) +DONAU_test_signing_key ( + const struct DONAU_Keys *keys, + const struct DONAU_DonauPublicKeyP *pub) { struct GNUNET_TIME_Absolute now; @@ -1238,9 +1238,9 @@ TALER_DONAU_test_signing_key ( } -const struct TALER_DONAU_DenomPublicKey * -TALER_DONAU_get_denomination_key ( - const struct TALER_DONAU_Keys *keys, +const struct DONAU_DenomPublicKey * +DONAU_get_denomination_key ( + const struct DONAU_Keys *keys, const struct TALER_DenominationPublicKey *pk) { for (unsigned int i = 0; i<keys->num_denom_keys; i++) @@ -1252,13 +1252,13 @@ TALER_DONAU_get_denomination_key ( } -struct TALER_DONAU_DenomPublicKey * -TALER_DONAU_copy_denomination_key ( - const struct TALER_DONAU_DenomPublicKey *key) +struct DONAU_DenomPublicKey * +DONAU_copy_denomination_key ( + const struct DONAU_DenomPublicKey *key) { - struct TALER_DONAU_DenomPublicKey *copy; + struct DONAU_DenomPublicKey *copy; - copy = GNUNET_new (struct TALER_DONAU_DenomPublicKey); + copy = GNUNET_new (struct DONAU_DenomPublicKey); *copy = *key; TALER_denom_pub_deep_copy (&copy->key, &key->key); @@ -1267,17 +1267,17 @@ TALER_DONAU_copy_denomination_key ( void -TALER_DONAU_destroy_denomination_key ( - struct TALER_DONAU_DenomPublicKey *key) +DONAU_destroy_denomination_key ( + struct DONAU_DenomPublicKey *key) { TALER_denom_pub_free (&key->key); GNUNET_free (key); } -const struct TALER_DONAU_DenomPublicKey * -TALER_DONAU_get_denomination_key_by_hash ( - const struct TALER_DONAU_Keys *keys, +const struct DONAU_DenomPublicKey * +DONAU_get_denomination_key_by_hash ( + const struct DONAU_Keys *keys, const struct TALER_DenominationHashP *hc) { for (unsigned int i = 0; i<keys->num_denom_keys; i++) @@ -1288,8 +1288,8 @@ TALER_DONAU_get_denomination_key_by_hash ( } -struct TALER_DONAU_Keys * -TALER_DONAU_keys_incref (struct TALER_DONAU_Keys *keys) +struct DONAU_Keys * +DONAU_keys_incref (struct DONAU_Keys *keys) { GNUNET_assert (keys->rc < UINT_MAX); keys->rc++; @@ -1298,7 +1298,7 @@ TALER_DONAU_keys_incref (struct TALER_DONAU_Keys *keys) void -TALER_DONAU_keys_decref (struct TALER_DONAU_Keys *keys) +DONAU_keys_decref (struct DONAU_Keys *keys) { if (NULL == keys) return; @@ -1325,7 +1325,7 @@ TALER_DONAU_keys_decref (struct TALER_DONAU_Keys *keys) GNUNET_array_grow (keys->auditors, keys->auditors_size, 0); - TALER_DONAU_free_accounts (keys->accounts_len, + DONAU_free_accounts (keys->accounts_len, keys->accounts); GNUNET_array_grow (keys->accounts, keys->accounts_len, @@ -1343,8 +1343,8 @@ TALER_DONAU_keys_decref (struct TALER_DONAU_Keys *keys) } -struct TALER_DONAU_Keys * -TALER_DONAU_keys_from_json (const json_t *j) +struct DONAU_Keys * +DONAU_keys_from_json (const json_t *j) { const json_t *jkeys; const char *url; @@ -1364,8 +1364,8 @@ TALER_DONAU_keys_from_json (const json_t *j) NULL), GNUNET_JSON_spec_end () }; - struct TALER_DONAU_Keys *keys; - enum TALER_DONAU_VersionCompatibility compat; + struct DONAU_Keys *keys; + enum DONAU_VersionCompatibility compat; if (NULL == j) return NULL; @@ -1381,7 +1381,7 @@ TALER_DONAU_keys_from_json (const json_t *j) { return NULL; /* unsupported version */ } - keys = GNUNET_new (struct TALER_DONAU_Keys); + keys = GNUNET_new (struct DONAU_Keys); if (GNUNET_OK != decode_keys_json (jkeys, false, @@ -1483,7 +1483,7 @@ add_grp (void *cls, */ static json_t * ar_to_json (unsigned int ar_len, - const struct TALER_DONAU_AccountRestriction ars[static ar_len]) + const struct DONAU_AccountRestriction ars[static ar_len]) { json_t *rval; @@ -1491,15 +1491,15 @@ ar_to_json (unsigned int ar_len, GNUNET_assert (NULL != rval); for (unsigned int i = 0; i<ar_len; i++) { - const struct TALER_DONAU_AccountRestriction *ar = &ars[i]; + const struct DONAU_AccountRestriction *ar = &ars[i]; switch (ar->type) { - case TALER_DONAU_AR_INVALID: + case DONAU_AR_INVALID: GNUNET_break (0); json_decref (rval); return NULL; - case TALER_DONAU_AR_DENY: + case DONAU_AR_DENY: GNUNET_assert ( 0 == json_array_append_new ( @@ -1508,7 +1508,7 @@ ar_to_json (unsigned int ar_len, GNUNET_JSON_pack_string ("type", "deny")))); break; - case TALER_DONAU_AR_REGEX: + case DONAU_AR_REGEX: GNUNET_assert ( 0 == json_array_append_new ( @@ -1535,7 +1535,7 @@ ar_to_json (unsigned int ar_len, json_t * -TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) +DONAU_keys_to_json (const struct DONAU_Keys *kd) { struct GNUNET_TIME_Timestamp now; json_t *keys; @@ -1553,7 +1553,7 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != signkeys); for (unsigned int i = 0; i<kd->num_sign_keys; i++) { - const struct TALER_DONAU_SigningPublicKey *sk = &kd->sign_keys[i]; + const struct DONAU_SigningPublicKey *sk = &kd->sign_keys[i]; json_t *signkey; if (GNUNET_TIME_timestamp_cmp (now, @@ -1586,7 +1586,7 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) false); for (unsigned int i = 0; i<kd->num_denom_keys; i++) { - const struct TALER_DONAU_DenomPublicKey *dk = &kd->denom_keys[i]; + const struct DONAU_DenomPublicKey *dk = &kd->denom_keys[i]; struct TALER_DenominationGroup meta = { .cipher = dk->key.cipher, .value = dk->value, @@ -1669,7 +1669,7 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != auditors); for (unsigned int i = 0; i<kd->num_auditors; i++) { - const struct TALER_DONAU_AuditorInformation *ai = &kd->auditors[i]; + const struct DONAU_AuditorInformation *ai = &kd->auditors[i]; json_t *a; json_t *adenoms; @@ -1677,9 +1677,9 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != adenoms); for (unsigned int j = 0; j<ai->num_denom_keys; j++) { - const struct TALER_DONAU_AuditorDenominationInfo *adi = + const struct DONAU_AuditorDenominationInfo *adi = &ai->denom_keys[j]; - const struct TALER_DONAU_DenomPublicKey *dk = + const struct DONAU_DenomPublicKey *dk = &kd->denom_keys[adi->denom_key_offset]; json_t *k; @@ -1715,7 +1715,7 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != global_fees); for (unsigned int i = 0; i<kd->num_global_fees; i++) { - const struct TALER_DONAU_GlobalFee *gf + const struct DONAU_GlobalFee *gf = &kd->global_fees[i]; if (GNUNET_TIME_absolute_is_past (gf->end_date.abs_time)) @@ -1744,7 +1744,7 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != accounts); for (unsigned int i = 0; i<kd->accounts_len; i++) { - const struct TALER_DONAU_WireAccount *acc + const struct DONAU_WireAccount *acc = &kd->accounts[i]; json_t *credit_restrictions; json_t *debit_restrictions; @@ -1783,13 +1783,13 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != wire_fees); for (unsigned int i = 0; i<kd->fees_len; i++) { - const struct TALER_DONAU_WireFeesByMethod *fbw + const struct DONAU_WireFeesByMethod *fbw = &kd->fees[i]; json_t *wf; wf = json_array (); GNUNET_assert (NULL != wf); - for (struct TALER_DONAU_WireAggregateFees *p = fbw->fees_head; + for (struct DONAU_WireAggregateFees *p = fbw->fees_head; NULL != p; p = p->next) { @@ -1819,7 +1819,7 @@ TALER_DONAU_keys_to_json (const struct TALER_DONAU_Keys *kd) GNUNET_assert (NULL != recoup); for (unsigned int i = 0; i<kd->num_denom_keys; i++) { - const struct TALER_DONAU_DenomPublicKey *dk + const struct DONAU_DenomPublicKey *dk = &kd->denom_keys[i]; if (! dk->revoked) continue; diff --git a/src/lib/donau_api_handle.h b/src/lib/donau_api_handle.h @@ -55,7 +55,7 @@ typedef void */ void TEAH_get_auditors_for_dc ( - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, TEAH_AuditorCallback ac, void *ac_cls); diff --git a/src/lib/donau_api_issue_receipts.c b/src/lib/donau_api_issue_receipts.c @@ -35,7 +35,7 @@ /** * @brief A Withdraw Handle */ -struct TALER_DONAU_WithdrawHandle +struct DONAU_WithdrawHandle { /** @@ -51,17 +51,17 @@ struct TALER_DONAU_WithdrawHandle /** * The /keys material from the donau */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * Handle for the actual (internal) withdraw operation. */ - struct TALER_DONAU_Withdraw2Handle *wh2; + struct DONAU_Withdraw2Handle *wh2; /** * Function to call with the result. */ - TALER_DONAU_WithdrawCallback cb; + DONAU_WithdrawCallback cb; /** * Closure for @a cb. @@ -106,7 +106,7 @@ struct TALER_DONAU_WithdrawHandle /** * Denomination key we are withdrawing. */ - struct TALER_DONAU_DenomPublicKey pk; + struct DONAU_DenomPublicKey pk; /** * Hash of the public key of the coin we are signing. @@ -116,7 +116,7 @@ struct TALER_DONAU_WithdrawHandle /** * Handler for the CS R request (only used for TALER_DENOMINATION_CS denominations) */ - struct TALER_DONAU_CsRWithdrawHandle *csrh; + struct DONAU_CsRWithdrawHandle *csrh; }; @@ -125,16 +125,16 @@ struct TALER_DONAU_WithdrawHandle * Function called when we're done processing the * HTTP /reserves/$RESERVE_PUB/withdraw request. * - * @param cls the `struct TALER_DONAU_WithdrawHandle` + * @param cls the `struct DONAU_WithdrawHandle` * @param w2r response data */ static void handle_reserve_withdraw_finished ( void *cls, - const struct TALER_DONAU_Withdraw2Response *w2r) + const struct DONAU_Withdraw2Response *w2r) { - struct TALER_DONAU_WithdrawHandle *wh = cls; - struct TALER_DONAU_WithdrawResponse wr = { + struct DONAU_WithdrawHandle *wh = cls; + struct DONAU_WithdrawResponse wr = { .hr = w2r->hr }; @@ -196,23 +196,23 @@ handle_reserve_withdraw_finished ( &wr); if (MHD_HTTP_OK == w2r->hr.http_status) TALER_denom_sig_free (&wr.details.ok.sig); - TALER_DONAU_withdraw_cancel (wh); + DONAU_withdraw_cancel (wh); } /** * Function called when stage 1 of CS withdraw is finished (request r_pub's) * - * @param cls the `struct TALER_DONAU_WithdrawHandle` + * @param cls the `struct DONAU_WithdrawHandle` * @param csrr replies from the /csr-withdraw request */ static void withdraw_cs_stage_two_callback ( void *cls, - const struct TALER_DONAU_CsRWithdrawResponse *csrr) + const struct DONAU_CsRWithdrawResponse *csrr) { - struct TALER_DONAU_WithdrawHandle *wh = cls; - struct TALER_DONAU_WithdrawResponse wr = { + struct DONAU_WithdrawHandle *wh = cls; + struct DONAU_WithdrawResponse wr = { .hr = csrr->hr }; @@ -242,7 +242,7 @@ withdraw_cs_stage_two_callback ( GNUNET_break (0); break; } - wh->wh2 = TALER_DONAU_withdraw2 (wh->curl_ctx, + wh->wh2 = DONAU_withdraw2 (wh->curl_ctx, wh->donau_url, wh->keys, &wh->pd, @@ -255,24 +255,24 @@ withdraw_cs_stage_two_callback ( } wh->cb (wh->cb_cls, &wr); - TALER_DONAU_withdraw_cancel (wh); + DONAU_withdraw_cancel (wh); } -struct TALER_DONAU_WithdrawHandle * -TALER_DONAU_withdraw ( +struct DONAU_WithdrawHandle * +DONAU_withdraw ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_ReservePrivateKeyP *reserve_priv, - const struct TALER_DONAU_WithdrawCoinInput *wci, - TALER_DONAU_WithdrawCallback res_cb, + const struct DONAU_WithdrawCoinInput *wci, + DONAU_WithdrawCallback res_cb, void *res_cb_cls) { - struct TALER_DONAU_WithdrawHandle *wh; + struct DONAU_WithdrawHandle *wh; - wh = GNUNET_new (struct TALER_DONAU_WithdrawHandle); - wh->keys = TALER_DONAU_keys_incref (keys); + wh = GNUNET_new (struct DONAU_WithdrawHandle); + wh->keys = DONAU_keys_incref (keys); wh->donau_url = donau_url; wh->curl_ctx = curl_ctx; wh->cb = res_cb; @@ -308,7 +308,7 @@ TALER_DONAU_withdraw ( GNUNET_free (wh); return NULL; } - wh->wh2 = TALER_DONAU_withdraw2 (curl_ctx, + wh->wh2 = DONAU_withdraw2 (curl_ctx, donau_url, keys, &wh->pd, @@ -326,7 +326,7 @@ TALER_DONAU_withdraw ( of the blinded_planchet here; the other part will be done after the /csr-withdraw request! */ wh->pd.blinded_planchet.cipher = TALER_DENOMINATION_CS; - wh->csrh = TALER_DONAU_csr_withdraw ( + wh->csrh = DONAU_csr_withdraw ( curl_ctx, donau_url, &wh->pk, @@ -345,20 +345,20 @@ TALER_DONAU_withdraw ( void -TALER_DONAU_withdraw_cancel (struct TALER_DONAU_WithdrawHandle *wh) +DONAU_withdraw_cancel (struct DONAU_WithdrawHandle *wh) { TALER_blinded_planchet_free (&wh->pd.blinded_planchet); if (NULL != wh->csrh) { - TALER_DONAU_csr_withdraw_cancel (wh->csrh); + DONAU_csr_withdraw_cancel (wh->csrh); wh->csrh = NULL; } if (NULL != wh->wh2) { - TALER_DONAU_withdraw2_cancel (wh->wh2); + DONAU_withdraw2_cancel (wh->wh2); wh->wh2 = NULL; } - TALER_DONAU_keys_decref (wh->keys); + DONAU_keys_decref (wh->keys); TALER_denom_pub_free (&wh->pk.key); GNUNET_free (wh); } diff --git a/src/lib/donau_api_issue_receipts2.c b/src/lib/donau_api_issue_receipts2.c @@ -35,13 +35,13 @@ /** * @brief A Withdraw Handle */ -struct TALER_DONAU_Withdraw2Handle +struct DONAU_Withdraw2Handle { /** * The /keys material from the donau */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * The url for this request. @@ -56,7 +56,7 @@ struct TALER_DONAU_Withdraw2Handle /** * Function to call with the result. */ - TALER_DONAU_Withdraw2Callback cb; + DONAU_Withdraw2Callback cb; /** * Closure for @a cb. @@ -96,10 +96,10 @@ struct TALER_DONAU_Withdraw2Handle * @return #GNUNET_OK on success, #GNUNET_SYSERR on errors */ static enum GNUNET_GenericReturnValue -reserve_withdraw_ok (struct TALER_DONAU_Withdraw2Handle *wh, +reserve_withdraw_ok (struct DONAU_Withdraw2Handle *wh, const json_t *json) { - struct TALER_DONAU_Withdraw2Response w2r = { + struct DONAU_Withdraw2Response w2r = { .hr.reply = json, .hr.http_status = MHD_HTTP_OK }; @@ -142,7 +142,7 @@ reserve_withdraw_ok (struct TALER_DONAU_Withdraw2Handle *wh, */ static enum GNUNET_GenericReturnValue reserve_withdraw_payment_required ( - struct TALER_DONAU_Withdraw2Handle *wh, + struct DONAU_Withdraw2Handle *wh, const json_t *json) { struct TALER_Amount balance; @@ -176,14 +176,14 @@ reserve_withdraw_payment_required ( total incoming and outgoing amounts */ len = json_array_size (history); { - struct TALER_DONAU_ReserveHistoryEntry *rhistory; + struct DONAU_ReserveHistoryEntry *rhistory; /* Use heap allocation as "len" may be very big and thus this may not fit on the stack. Use "GNUNET_malloc_large" as a malicious donau may theoretically try to crash us by giving a history that does not fit into our memory. */ rhistory = GNUNET_malloc_large ( - sizeof (struct TALER_DONAU_ReserveHistoryEntry) + sizeof (struct DONAU_ReserveHistoryEntry) * len); if (NULL == rhistory) { @@ -192,7 +192,7 @@ reserve_withdraw_payment_required ( } if (GNUNET_OK != - TALER_DONAU_parse_reserve_history (wh->keys, + DONAU_parse_reserve_history (wh->keys, history, &wh->reserve_pub, balance.currency, @@ -202,11 +202,11 @@ reserve_withdraw_payment_required ( rhistory)) { GNUNET_break_op (0); - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); return GNUNET_SYSERR; } - TALER_DONAU_free_reserve_history (len, + DONAU_free_reserve_history (len, rhistory); } @@ -227,7 +227,7 @@ reserve_withdraw_payment_required ( * Function called when we're done processing the * HTTP /reserves/$RESERVE_PUB/withdraw request. * - * @param cls the `struct TALER_DONAU_WithdrawHandle` + * @param cls the `struct DONAU_WithdrawHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -236,9 +236,9 @@ handle_reserve_withdraw_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_Withdraw2Handle *wh = cls; + struct DONAU_Withdraw2Handle *wh = cls; const json_t *j = response; - struct TALER_DONAU_Withdraw2Response w2r = { + struct DONAU_Withdraw2Response w2r = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -260,7 +260,7 @@ handle_reserve_withdraw_finished (void *cls, break; } GNUNET_assert (NULL == wh->cb); - TALER_DONAU_withdraw2_cancel (wh); + DONAU_withdraw2_cancel (wh); return; case MHD_HTTP_BAD_REQUEST: /* This should never happen, either us or the donau is buggy @@ -355,36 +355,36 @@ handle_reserve_withdraw_finished (void *cls, &w2r); wh->cb = NULL; } - TALER_DONAU_withdraw2_cancel (wh); + DONAU_withdraw2_cancel (wh); } -struct TALER_DONAU_Withdraw2Handle * -TALER_DONAU_withdraw2 ( +struct DONAU_Withdraw2Handle * +DONAU_withdraw2 ( struct GNUNET_CURL_Context *curl_ctx, const char *donau_url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_PlanchetDetail *pd, const struct TALER_ReservePrivateKeyP *reserve_priv, - TALER_DONAU_Withdraw2Callback res_cb, + DONAU_Withdraw2Callback res_cb, void *res_cb_cls) { - struct TALER_DONAU_Withdraw2Handle *wh; - const struct TALER_DONAU_DenomPublicKey *dk; + struct DONAU_Withdraw2Handle *wh; + const struct DONAU_DenomPublicKey *dk; struct TALER_ReserveSignatureP reserve_sig; char arg_str[sizeof (struct TALER_ReservePublicKeyP) * 2 + 32]; struct TALER_BlindedCoinHashP bch; GNUNET_assert (NULL != keys); - dk = TALER_DONAU_get_denomination_key_by_hash (keys, + dk = DONAU_get_denomination_key_by_hash (keys, &pd->denom_pub_hash); if (NULL == dk) { GNUNET_break (0); return NULL; } - wh = GNUNET_new (struct TALER_DONAU_Withdraw2Handle); - wh->keys = TALER_DONAU_keys_incref (keys); + wh = GNUNET_new (struct DONAU_Withdraw2Handle); + wh->keys = DONAU_keys_incref (keys); wh->cb = res_cb; wh->cb_cls = res_cb_cls; /* Compute how much we expected to charge to the reserve */ @@ -456,7 +456,7 @@ TALER_DONAU_withdraw2 ( { CURL *eh; - eh = TALER_DONAU_curl_easy_get_ (wh->url); + eh = DONAU_curl_easy_get_ (wh->url); if ( (NULL == eh) || (GNUNET_OK != TALER_curl_easy_post (&wh->post_ctx, @@ -484,7 +484,7 @@ TALER_DONAU_withdraw2 ( void -TALER_DONAU_withdraw2_cancel (struct TALER_DONAU_Withdraw2Handle *wh) +DONAU_withdraw2_cancel (struct DONAU_Withdraw2Handle *wh) { if (NULL != wh->job) { @@ -493,6 +493,6 @@ TALER_DONAU_withdraw2_cancel (struct TALER_DONAU_Withdraw2Handle *wh) } GNUNET_free (wh->url); TALER_curl_easy_post_finished (&wh->post_ctx); - TALER_DONAU_keys_decref (wh->keys); + DONAU_keys_decref (wh->keys); GNUNET_free (wh); } diff --git a/src/lib/donau_api_submit_receipts_get.c b/src/lib/donau_api_submit_receipts_get.c @@ -35,13 +35,13 @@ /** * @brief A Deposit Get Handle */ -struct TALER_DONAU_DepositGetHandle +struct DONAU_DepositGetHandle { /** * The keys of the this request handle will use */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * The url for this request. @@ -62,7 +62,7 @@ struct TALER_DONAU_DepositGetHandle /** * Function to call with the result. */ - TALER_DONAU_DepositGetCallback cb; + DONAU_DepositGetCallback cb; /** * Closure for @a cb. @@ -92,7 +92,7 @@ struct TALER_DONAU_DepositGetHandle * Function called when we're done processing the * HTTP /track/transaction request. * - * @param cls the `struct TALER_DONAU_DepositGetHandle` + * @param cls the `struct DONAU_DepositGetHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -101,9 +101,9 @@ handle_deposit_wtid_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_DepositGetHandle *dwh = cls; + struct DONAU_DepositGetHandle *dwh = cls; const json_t *j = response; - struct TALER_DONAU_GetDepositResponse dr = { + struct DONAU_GetDepositResponse dr = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -129,7 +129,7 @@ handle_deposit_wtid_finished (void *cls, &dr.details.ok.donau_pub), GNUNET_JSON_spec_end () }; - const struct TALER_DONAU_Keys *key_state; + const struct DONAU_Keys *key_state; key_state = dwh->keys; GNUNET_assert (NULL != key_state); @@ -144,7 +144,7 @@ handle_deposit_wtid_finished (void *cls, break; } if (GNUNET_OK != - TALER_DONAU_test_signing_key (key_state, + DONAU_test_signing_key (key_state, &dr.details.ok.donau_pub)) { GNUNET_break_op (0); @@ -170,7 +170,7 @@ handle_deposit_wtid_finished (void *cls, } dwh->cb (dwh->cb_cls, &dr); - TALER_DONAU_deposits_get_cancel (dwh); + DONAU_deposits_get_cancel (dwh); return; } case MHD_HTTP_ACCEPTED: @@ -208,7 +208,7 @@ handle_deposit_wtid_finished (void *cls, dr.details.accepted.requirement_row = 0; dwh->cb (dwh->cb_cls, &dr); - TALER_DONAU_deposits_get_cancel (dwh); + DONAU_deposits_get_cancel (dwh); return; } case MHD_HTTP_BAD_REQUEST: @@ -249,32 +249,32 @@ handle_deposit_wtid_finished (void *cls, } dwh->cb (dwh->cb_cls, &dr); - TALER_DONAU_deposits_get_cancel (dwh); + DONAU_deposits_get_cancel (dwh); } -struct TALER_DONAU_DepositGetHandle * -TALER_DONAU_deposits_get ( +struct DONAU_DepositGetHandle * +DONAU_deposits_get ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_CharityPrivateKeyP *charity_priv, const struct TALER_CharityWireHashP *h_wire, const struct TALER_PrivateContractHashP *h_contract_terms, const struct TALER_CoinSpendPublicKeyP *coin_pub, struct GNUNET_TIME_Relative timeout, - TALER_DONAU_DepositGetCallback cb, + DONAU_DepositGetCallback cb, void *cb_cls) { - struct TALER_CharityPublicKeyP charity; - struct TALER_CharitySignatureP charity_sig; - struct TALER_DONAU_DepositGetHandle *dwh; + struct DONAU_CharityPublicKeyP charity; + struct DONAU_CharitySignatureP charity_sig; + struct DONAU_DepositGetHandle *dwh; CURL *eh; char arg_str[(sizeof (struct TALER_CoinSpendPublicKeyP) + sizeof (struct TALER_CharityWireHashP) - + sizeof (struct TALER_CharityPublicKeyP) + + sizeof (struct DONAU_CharityPublicKeyP) + sizeof (struct TALER_PrivateContractHashP) - + sizeof (struct TALER_CharitySignatureP)) * 2 + 48]; + + sizeof (struct DONAU_CharitySignatureP)) * 2 + 48]; GNUNET_CRYPTO_eddsa_key_get_public (&charity_priv->eddsa_priv, &charity.eddsa_pub); @@ -285,8 +285,8 @@ TALER_DONAU_deposits_get ( &charity_sig); { char cpub_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2]; - char mpub_str[sizeof (struct TALER_CharityPublicKeyP) * 2]; - char msig_str[sizeof (struct TALER_CharitySignatureP) * 2]; + char mpub_str[sizeof (struct DONAU_CharityPublicKeyP) * 2]; + char msig_str[sizeof (struct DONAU_CharitySignatureP) * 2]; char chash_str[sizeof (struct TALER_PrivateContractHashP) * 2]; char whash_str[sizeof (struct TALER_CharityWireHashP) * 2]; char timeout_str[24]; @@ -346,7 +346,7 @@ TALER_DONAU_deposits_get ( timeout_str); } - dwh = GNUNET_new (struct TALER_DONAU_DepositGetHandle); + dwh = GNUNET_new (struct DONAU_DepositGetHandle); dwh->cb = cb; dwh->cb_cls = cb_cls; dwh->url = TALER_url_join (url, @@ -360,7 +360,7 @@ TALER_DONAU_deposits_get ( dwh->h_wire = *h_wire; dwh->h_contract_terms = *h_contract_terms; dwh->coin_pub = *coin_pub; - eh = TALER_DONAU_curl_easy_get_ (dwh->url); + eh = DONAU_curl_easy_get_ (dwh->url); if (NULL == eh) { GNUNET_break (0); @@ -372,13 +372,13 @@ TALER_DONAU_deposits_get ( eh, &handle_deposit_wtid_finished, dwh); - dwh->keys = TALER_DONAU_keys_incref (keys); + dwh->keys = DONAU_keys_incref (keys); return dwh; } void -TALER_DONAU_deposits_get_cancel (struct TALER_DONAU_DepositGetHandle *dwh) +DONAU_deposits_get_cancel (struct DONAU_DepositGetHandle *dwh) { if (NULL != dwh->job) { @@ -387,7 +387,7 @@ TALER_DONAU_deposits_get_cancel (struct TALER_DONAU_DepositGetHandle *dwh) } GNUNET_free (dwh->url); TALER_curl_easy_post_finished (&dwh->ctx); - TALER_DONAU_keys_decref (dwh->keys); + DONAU_keys_decref (dwh->keys); GNUNET_free (dwh); } diff --git a/src/lib/donau_api_transfers_get.c b/src/lib/donau_api_transfers_get.c @@ -34,13 +34,13 @@ /** * @brief A /transfers/ GET Handle */ -struct TALER_DONAU_TransfersGetHandle +struct DONAU_TransfersGetHandle { /** * The keys of the donau this request handle will use */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * The url for this request. @@ -55,7 +55,7 @@ struct TALER_DONAU_TransfersGetHandle /** * Function to call with the result. */ - TALER_DONAU_TransfersGetCallback cb; + DONAU_TransfersGetCallback cb; /** * Closure for @a cb. @@ -81,17 +81,17 @@ struct TALER_DONAU_TransfersGetHandle */ static enum GNUNET_GenericReturnValue check_transfers_get_response_ok ( - struct TALER_DONAU_TransfersGetHandle *wdh, + struct DONAU_TransfersGetHandle *wdh, const json_t *json) { const json_t *details_j; struct TALER_Amount total_expected; - struct TALER_CharityPublicKeyP charity_pub; - struct TALER_DONAU_TransfersGetResponse tgr = { + struct DONAU_CharityPublicKeyP charity_pub; + struct DONAU_TransfersGetResponse tgr = { .hr.reply = json, .hr.http_status = MHD_HTTP_OK }; - struct TALER_DONAU_TransferData *td + struct DONAU_TransferData *td = &tgr.details.ok.td; struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_amount_any ("total", @@ -129,7 +129,7 @@ check_transfers_get_response_ok ( return GNUNET_SYSERR; } if (GNUNET_OK != - TALER_DONAU_test_signing_key ( + DONAU_test_signing_key ( wdh->keys, &td->donau_pub)) { @@ -242,7 +242,7 @@ check_transfers_get_response_ok ( * Function called when we're done processing the * HTTP /transfers/ request. * - * @param cls the `struct TALER_DONAU_TransfersGetHandle` + * @param cls the `struct DONAU_TransfersGetHandle` * @param response_code HTTP response code, 0 on error * @param response parsed JSON result, NULL on error */ @@ -251,9 +251,9 @@ handle_transfers_get_finished (void *cls, long response_code, const void *response) { - struct TALER_DONAU_TransfersGetHandle *wdh = cls; + struct DONAU_TransfersGetHandle *wdh = cls; const json_t *j = response; - struct TALER_DONAU_TransfersGetResponse tgr = { + struct DONAU_TransfersGetResponse tgr = { .hr.reply = j, .hr.http_status = (unsigned int) response_code }; @@ -269,7 +269,7 @@ handle_transfers_get_finished (void *cls, check_transfers_get_response_ok (wdh, j)) { - TALER_DONAU_transfers_get_cancel (wdh); + DONAU_transfers_get_cancel (wdh); return; } GNUNET_break_op (0); @@ -314,24 +314,24 @@ handle_transfers_get_finished (void *cls, } wdh->cb (wdh->cb_cls, &tgr); - TALER_DONAU_transfers_get_cancel (wdh); + DONAU_transfers_get_cancel (wdh); } -struct TALER_DONAU_TransfersGetHandle * -TALER_DONAU_transfers_get ( +struct DONAU_TransfersGetHandle * +DONAU_transfers_get ( struct GNUNET_CURL_Context *ctx, const char *url, - struct TALER_DONAU_Keys *keys, + struct DONAU_Keys *keys, const struct TALER_WireTransferIdentifierRawP *wtid, - TALER_DONAU_TransfersGetCallback cb, + DONAU_TransfersGetCallback cb, void *cb_cls) { - struct TALER_DONAU_TransfersGetHandle *wdh; + struct DONAU_TransfersGetHandle *wdh; CURL *eh; char arg_str[sizeof (struct TALER_WireTransferIdentifierRawP) * 2 + 32]; - wdh = GNUNET_new (struct TALER_DONAU_TransfersGetHandle); + wdh = GNUNET_new (struct DONAU_TransfersGetHandle); wdh->cb = cb; wdh->cb_cls = cb_cls; @@ -358,7 +358,7 @@ TALER_DONAU_transfers_get ( GNUNET_free (wdh); return NULL; } - eh = TALER_DONAU_curl_easy_get_ (wdh->url); + eh = DONAU_curl_easy_get_ (wdh->url); if (NULL == eh) { GNUNET_break (0); @@ -366,7 +366,7 @@ TALER_DONAU_transfers_get ( GNUNET_free (wdh); return NULL; } - wdh->keys = TALER_DONAU_keys_incref (keys); + wdh->keys = DONAU_keys_incref (keys); wdh->job = GNUNET_CURL_job_add_with_ct_json (ctx, eh, &handle_transfers_get_finished, @@ -382,8 +382,8 @@ TALER_DONAU_transfers_get ( * @param wdh the wire deposits request handle */ void -TALER_DONAU_transfers_get_cancel ( - struct TALER_DONAU_TransfersGetHandle *wdh) +DONAU_transfers_get_cancel ( + struct DONAU_TransfersGetHandle *wdh) { if (NULL != wdh->job) { @@ -391,7 +391,7 @@ TALER_DONAU_transfers_get_cancel ( wdh->job = NULL; } GNUNET_free (wdh->url); - TALER_DONAU_keys_decref (wdh->keys); + DONAU_keys_decref (wdh->keys); GNUNET_free (wdh); } diff --git a/src/pq/pq_query_helper.c b/src/pq/pq_query_helper.c @@ -37,20 +37,21 @@ * @param[out] scratch buffer for dynamic allocations (to be done via #GNUNET_malloc() * @param scratch_length number of entries left in @a scratch * @return -1 on error, number of offsets used in @a scratch otherwise - */ + * static int qconv_donation_unit_pub (void *cls, - const void *data, - size_t data_len, - void *param_values[], - int param_lengths[], - int param_formats[], - unsigned int param_length, - void *scratch[], - unsigned int scratch_length) + const void *data, + size_t data_len, + void *param_values[], + int param_lengths[], + int param_formats[], + unsigned int param_length, + void *scratch[], + unsigned int scratch_length) { const struct DONAU_DonationUnitPublicKey *donation_unit_pub = data; - const struct GNUNET_CRYPTO_BlindSignPublicKey *bsp = donation_unit_pub->bsign_pub_key; + const struct GNUNET_CRYPTO_BlindSignPublicKey *bsp = donation_unit_pub-> + bsign_pub_key; size_t tlen; size_t len; uint32_t be[2]; @@ -119,5 +120,6 @@ TALER_PQ_query_param_donation_unit_pub ( return res; } +*/ /* end of pq/pq_query_helper.c */ diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c @@ -111,7 +111,7 @@ struct BatchDepositState * Signing key used by the donau to sign the * deposit confirmation. */ - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; /** * Set (by the interpreter) to a fresh private key. This @@ -122,7 +122,7 @@ struct BatchDepositState /** * Deposit handle while operation is running. */ - struct TALER_DONAU_BatchDepositHandle *dh; + struct DONAU_BatchDepositHandle *dh; /** * Array of coins to batch-deposit. @@ -191,7 +191,7 @@ struct BatchDepositState */ static void batch_deposit_cb (void *cls, - const struct TALER_DONAU_BatchDepositResult *dr) + const struct DONAU_BatchDepositResult *dr) { struct BatchDepositState *ds = cls; @@ -236,15 +236,15 @@ batch_deposit_run (void *cls, struct TALER_TESTING_Interpreter *is) { struct BatchDepositState *ds = cls; - const struct TALER_DONAU_DenomPublicKey *denom_pub; + const struct DONAU_DenomPublicKey *denom_pub; const struct TALER_DenominationSignature *denom_pub_sig; - struct TALER_CharityPublicKeyP charity_pub; + struct DONAU_CharityPublicKeyP charity_pub; struct TALER_PrivateContractHashP h_contract_terms; enum TALER_ErrorCode ec; struct TALER_WireSaltP wire_salt; struct TALER_CharityWireHashP h_wire; const char *payto_uri; - struct TALER_DONAU_CoinDepositDetail cdds[ds->num_coins]; + struct DONAU_CoinDepositDetail cdds[ds->num_coins]; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("payto_uri", &payto_uri), @@ -312,7 +312,7 @@ batch_deposit_run (void *cls, for (unsigned int i = 0; i<ds->num_coins; i++) { struct Coin *coin = &ds->coins[i]; - struct TALER_DONAU_CoinDepositDetail *cdd = &cdds[i]; + struct DONAU_CoinDepositDetail *cdd = &cdds[i]; const struct TALER_CoinSpendPrivateKeyP *coin_priv; const struct TALER_AgeCommitmentProof *age_commitment_proof = NULL; @@ -377,7 +377,7 @@ batch_deposit_run (void *cls, GNUNET_assert (NULL == ds->dh); { - struct TALER_DONAU_DepositContractDetail dcd = { + struct DONAU_DepositContractDetail dcd = { .wire_deadline = ds->wire_deadline, .charity_payto_uri = payto_uri, .wire_salt = wire_salt, @@ -388,7 +388,7 @@ batch_deposit_run (void *cls, .refund_deadline = ds->refund_deadline }; - ds->dh = TALER_DONAU_batch_deposit ( + ds->dh = DONAU_batch_deposit ( TALER_TESTING_interpreter_get_context (is), donau_url, TALER_TESTING_get_keys (is), @@ -428,7 +428,7 @@ batch_deposit_cleanup (void *cls, { TALER_TESTING_command_incomplete (ds->is, cmd->label); - TALER_DONAU_batch_deposit_cancel (ds->dh); + DONAU_batch_deposit_cancel (ds->dh); ds->dh = NULL; } if (NULL != ds->retry_task) diff --git a/src/testing/testing_api_cmd_batch_withdraw.c b/src/testing/testing_api_cmd_batch_withdraw.c @@ -49,7 +49,7 @@ struct CoinState * use. Otherwise, this will be set (by the interpreter) to the * denomination PK matching @e amount. */ - struct TALER_DONAU_DenomPublicKey *pk; + struct DONAU_DenomPublicKey *pk; /** * Private key of the coin. @@ -87,9 +87,9 @@ struct CoinState /** * Reserve history entry that corresponds to this coin. - * Will be of type #TALER_DONAU_RTT_WITHDRAWAL. + * Will be of type #DONAU_RTT_WITHDRAWAL. */ - struct TALER_DONAU_ReserveHistoryEntry reserve_history; + struct DONAU_ReserveHistoryEntry reserve_history; }; @@ -134,7 +134,7 @@ struct BatchWithdrawState /** * Withdraw handle (while operation is running). */ - struct TALER_DONAU_BatchWithdrawHandle *wsh; + struct DONAU_BatchWithdrawHandle *wsh; /** * Array of coin states. @@ -182,7 +182,7 @@ struct BatchWithdrawState static void reserve_batch_withdraw_cb (void *cls, const struct - TALER_DONAU_BatchWithdrawResponse *wr) + DONAU_BatchWithdrawResponse *wr) { struct BatchWithdrawState *ws = cls; struct TALER_TESTING_Interpreter *is = ws->is; @@ -201,7 +201,7 @@ reserve_batch_withdraw_cb (void *cls, for (unsigned int i = 0; i<ws->num_coins; i++) { struct CoinState *cs = &ws->coins[i]; - const struct TALER_DONAU_PrivateCoinDetails *pcd + const struct DONAU_PrivateCoinDetails *pcd = &wr->details.ok.coins[i]; TALER_denom_sig_deep_copy (&cs->sig, @@ -251,11 +251,11 @@ batch_withdraw_run (void *cls, struct TALER_TESTING_Interpreter *is) { struct BatchWithdrawState *ws = cls; - const struct TALER_DONAU_Keys *keys = TALER_TESTING_get_keys (is); + const struct DONAU_Keys *keys = TALER_TESTING_get_keys (is); const struct TALER_ReservePrivateKeyP *rp; const struct TALER_TESTING_Command *create_reserve; - const struct TALER_DONAU_DenomPublicKey *dpk; - struct TALER_DONAU_WithdrawCoinInput wcis[ws->num_coins]; + const struct DONAU_DenomPublicKey *dpk; + struct DONAU_WithdrawCoinInput wcis[ws->num_coins]; (void) cmd; ws->is = is; @@ -291,7 +291,7 @@ batch_withdraw_run (void *cls, for (unsigned int i = 0; i<ws->num_coins; i++) { struct CoinState *cs = &ws->coins[i]; - struct TALER_DONAU_WithdrawCoinInput *wci = &wcis[i]; + struct DONAU_WithdrawCoinInput *wci = &wcis[i]; TALER_planchet_master_setup_random (&cs->ps); dpk = TALER_TESTING_find_pk (keys, @@ -308,8 +308,8 @@ batch_withdraw_run (void *cls, } /* We copy the denomination key, as re-querying /keys * would free the old one. */ - cs->pk = TALER_DONAU_copy_denomination_key (dpk); - cs->reserve_history.type = TALER_DONAU_RTT_WITHDRAWAL; + cs->pk = DONAU_copy_denomination_key (dpk); + cs->reserve_history.type = DONAU_RTT_WITHDRAWAL; GNUNET_assert (0 <= TALER_amount_add (&cs->reserve_history.amount, &cs->amount, @@ -320,7 +320,7 @@ batch_withdraw_run (void *cls, wci->ps = &cs->ps; wci->ach = &cs->h_age_commitment; } - ws->wsh = TALER_DONAU_batch_withdraw ( + ws->wsh = DONAU_batch_withdraw ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), keys, @@ -355,7 +355,7 @@ batch_withdraw_cleanup (void *cls, { TALER_TESTING_command_incomplete (ws->is, cmd->label); - TALER_DONAU_batch_withdraw_cancel (ws->wsh); + DONAU_batch_withdraw_cancel (ws->wsh); ws->wsh = NULL; } for (unsigned int i = 0; i<ws->num_coins; i++) @@ -365,7 +365,7 @@ batch_withdraw_cleanup (void *cls, TALER_denom_sig_free (&cs->sig); if (NULL != cs->pk) { - TALER_DONAU_destroy_denomination_key (cs->pk); + DONAU_destroy_denomination_key (cs->pk); cs->pk = NULL; } if (0 < ws->age) diff --git a/src/testing/testing_api_cmd_common.c b/src/testing/testing_api_cmd_common.c @@ -27,14 +27,14 @@ int TALER_TESTING_history_entry_cmp ( - const struct TALER_DONAU_ReserveHistoryEntry *h1, - const struct TALER_DONAU_ReserveHistoryEntry *h2) + const struct DONAU_ReserveHistoryEntry *h1, + const struct DONAU_ReserveHistoryEntry *h2) { if (h1->type != h2->type) return 1; switch (h1->type) { - case TALER_DONAU_RTT_CREDIT: + case DONAU_RTT_CREDIT: if ( (0 == TALER_amount_cmp (&h1->amount, &h2->amount)) && @@ -47,7 +47,7 @@ TALER_TESTING_history_entry_cmp ( h2->details.in_details.timestamp)) ) return 0; return 1; - case TALER_DONAU_RTT_WITHDRAWAL: + case DONAU_RTT_WITHDRAWAL: if ( (0 == TALER_amount_cmp (&h1->amount, &h2->amount)) && @@ -59,7 +59,7 @@ TALER_TESTING_history_entry_cmp ( that should be good enough. */ return 0; return 1; - case TALER_DONAU_RTT_AGEWITHDRAWAL: + case DONAU_RTT_AGEWITHDRAWAL: /* testing_api_cmd_age_withdraw doesn't set the out_authorization_sig, so we cannot test for it here. but if the amount matches, that should be good enough. */ @@ -73,7 +73,7 @@ TALER_TESTING_history_entry_cmp ( h2->details.age_withdraw.max_age)) return 0; return 1; - case TALER_DONAU_RTT_RECOUP: + case DONAU_RTT_RECOUP: /* donau_sig, donau_pub and timestamp are NOT available from the original recoup response, hence here NOT check(able/ed) */ if ( (0 == @@ -84,7 +84,7 @@ TALER_TESTING_history_entry_cmp ( &h2->details.recoup_details.coin_pub)) ) return 0; return 1; - case TALER_DONAU_RTT_CLOSING: + case DONAU_RTT_CLOSING: /* testing_api_cmd_exec_closer doesn't set the receiver_account_details, donau_sig, donau_pub or wtid or timestamp so we cannot test for it here. but if the amount matches, @@ -97,7 +97,7 @@ TALER_TESTING_history_entry_cmp ( &h2->details.close_details.fee)) ) return 0; return 1; - case TALER_DONAU_RTT_HISTORY: + case DONAU_RTT_HISTORY: if ( (0 == TALER_amount_cmp (&h1->amount, &h2->amount)) && @@ -110,7 +110,7 @@ TALER_TESTING_history_entry_cmp ( &h2->details.history_details.reserve_sig)) ) return 0; return 1; - case TALER_DONAU_RTT_MERGE: + case DONAU_RTT_MERGE: if ( (0 == TALER_amount_cmp (&h1->amount, &h2->amount)) && @@ -143,7 +143,7 @@ TALER_TESTING_history_entry_cmp ( h2->details.merge_details.flags) ) return 0; return 1; - case TALER_DONAU_RTT_OPEN: + case DONAU_RTT_OPEN: if ( (0 == TALER_amount_cmp (&h1->amount, &h2->amount)) && @@ -165,7 +165,7 @@ TALER_TESTING_history_entry_cmp ( &h2->details.open_request.reserve_sig)) ) return 0; return 1; - case TALER_DONAU_RTT_CLOSE: + case DONAU_RTT_CLOSE: if ( (0 == TALER_amount_cmp (&h1->amount, &h2->amount)) && diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c @@ -98,7 +98,7 @@ struct DepositState /** * Deposit handle while operation is running. */ - struct TALER_DONAU_BatchDepositHandle *dh; + struct DONAU_BatchDepositHandle *dh; /** * Timestamp of the /deposit operation in the wallet (contract signing time). @@ -145,7 +145,7 @@ struct DepositState * Signing key used by the donau to sign the * deposit confirmation. */ - struct TALER_DonauPublicKeyP donau_pub; + struct DONAU_DonauPublicKeyP donau_pub; /** * Signature from the donau on the @@ -215,7 +215,7 @@ do_retry (void *cls) */ static void deposit_cb (void *cls, - const struct TALER_DONAU_BatchDepositResult *dr) + const struct DONAU_BatchDepositResult *dr) { struct DepositState *ds = cls; @@ -285,10 +285,10 @@ deposit_run (void *cls, const struct TALER_CoinSpendPrivateKeyP *coin_priv; struct TALER_CoinSpendPublicKeyP coin_pub; const struct TALER_AgeCommitmentHash *phac; - const struct TALER_DONAU_DenomPublicKey *denom_pub; + const struct DONAU_DenomPublicKey *denom_pub; const struct TALER_DenominationSignature *denom_pub_sig; struct TALER_CoinSpendSignatureP coin_sig; - struct TALER_CharityPublicKeyP charity_pub; + struct DONAU_CharityPublicKeyP charity_pub; struct TALER_PrivateContractHashP h_contract_terms; enum TALER_ErrorCode ec; struct TALER_WireSaltP wire_salt; @@ -453,7 +453,7 @@ deposit_run (void *cls, } GNUNET_assert (NULL == ds->dh); { - struct TALER_DONAU_CoinDepositDetail cdd = { + struct DONAU_CoinDepositDetail cdd = { .amount = ds->amount, .coin_pub = coin_pub, .coin_sig = coin_sig, @@ -461,7 +461,7 @@ deposit_run (void *cls, .h_denom_pub = denom_pub->h_key, .h_age_commitment = {{{0}}}, }; - struct TALER_DONAU_DepositContractDetail dcd = { + struct DONAU_DepositContractDetail dcd = { .wire_deadline = ds->wire_deadline, .charity_payto_uri = payto_uri, .wire_salt = wire_salt, @@ -474,7 +474,7 @@ deposit_run (void *cls, if (NULL != phac) cdd.h_age_commitment = *phac; - ds->dh = TALER_DONAU_batch_deposit ( + ds->dh = DONAU_batch_deposit ( TALER_TESTING_interpreter_get_context (is), donau_url, TALER_TESTING_get_keys (is), @@ -514,7 +514,7 @@ deposit_cleanup (void *cls, { TALER_TESTING_command_incomplete (ds->is, cmd->label); - TALER_DONAU_batch_deposit_cancel (ds->dh); + DONAU_batch_deposit_cancel (ds->dh); ds->dh = NULL; } if (NULL != ds->retry_task) diff --git a/src/testing/testing_api_cmd_deposits_get.c b/src/testing/testing_api_cmd_deposits_get.c @@ -88,7 +88,7 @@ struct TrackTransactionState /** * Handle to the "track transaction" pending operation. */ - struct TALER_DONAU_DepositGetHandle *tth; + struct DONAU_DepositGetHandle *tth; /** * Interpreter state. @@ -108,7 +108,7 @@ struct TrackTransactionState */ static void deposit_wtid_cb (void *cls, - const struct TALER_DONAU_GetDepositResponse *dr) + const struct DONAU_GetDepositResponse *dr) { struct TrackTransactionState *tts = cls; struct TALER_TESTING_Interpreter *is = tts->is; @@ -272,7 +272,7 @@ track_transaction_run (void *cls, return; } - tts->tth = TALER_DONAU_deposits_get ( + tts->tth = DONAU_deposits_get ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), TALER_TESTING_get_keys (is), @@ -304,7 +304,7 @@ track_transaction_cleanup (void *cls, { TALER_TESTING_command_incomplete (tts->is, cmd->label); - TALER_DONAU_deposits_get_cancel (tts->tth); + DONAU_deposits_get_cancel (tts->tth); tts->tth = NULL; } GNUNET_free (tts->charity_payto_uri); diff --git a/src/testing/testing_api_cmd_get_donau.c b/src/testing/testing_api_cmd_get_donau.c @@ -46,12 +46,12 @@ struct GetDonauState /** * Donau handle we produced. */ - struct TALER_DONAU_GetKeysHandle *donau; + struct DONAU_GetKeysHandle *donau; /** * Keys of the donau. */ - struct TALER_DONAU_Keys *keys; + struct DONAU_Keys *keys; /** * URL of the donau. @@ -91,11 +91,11 @@ struct GetDonauState */ static void cert_cb (void *cls, - const struct TALER_DONAU_KeysResponse *kr, - struct TALER_DONAU_Keys *keys) + const struct DONAU_KeysResponse *kr, + struct DONAU_Keys *keys) { struct GetDonauState *ges = cls; - const struct TALER_DONAU_HttpResponse *hr = &kr->hr; + const struct DONAU_HttpResponse *hr = &kr->hr; struct TALER_TESTING_Interpreter *is = ges->is; ges->donau = NULL; @@ -140,7 +140,7 @@ get_donau_run (void *cls, struct TALER_TESTING_Interpreter *is) { struct GetDonauState *ges = cls; - struct TALER_DONAU_Keys *xkeys = NULL; + struct DONAU_Keys *xkeys = NULL; (void) cmd; if (NULL == ges->donau_url) @@ -152,7 +152,7 @@ get_donau_run (void *cls, if (NULL != ges->last_keys_ref) { const struct TALER_TESTING_Command *state_cmd; - struct TALER_DONAU_Keys *old_keys; + struct DONAU_Keys *old_keys; const char *donau_url; json_t *s_keys; @@ -195,14 +195,14 @@ get_donau_run (void *cls, TALER_TESTING_interpreter_fail (is); return; } - s_keys = TALER_DONAU_keys_to_json (old_keys); + s_keys = DONAU_keys_to_json (old_keys); if (NULL == s_keys) { GNUNET_break (0); TALER_TESTING_interpreter_fail (is); return; } - xkeys = TALER_DONAU_keys_from_json (s_keys); + xkeys = DONAU_keys_from_json (s_keys); if (NULL == xkeys) { GNUNET_break (0); @@ -223,19 +223,19 @@ get_donau_run (void *cls, &ges->master_priv.eddsa_priv)) { GNUNET_break (0); - TALER_DONAU_keys_decref (xkeys); + DONAU_keys_decref (xkeys); TALER_TESTING_interpreter_fail (is); return; } } ges->is = is; ges->donau - = TALER_DONAU_get_keys (TALER_TESTING_interpreter_get_context (is), + = DONAU_get_keys (TALER_TESTING_interpreter_get_context (is), ges->donau_url, xkeys, &cert_cb, ges); - TALER_DONAU_keys_decref (xkeys); + DONAU_keys_decref (xkeys); if (NULL == ges->donau) { GNUNET_break (0); @@ -261,10 +261,10 @@ get_donau_cleanup (void *cls, if (NULL != ges->donau) { - TALER_DONAU_get_keys_cancel (ges->donau); + DONAU_get_keys_cancel (ges->donau); ges->donau = NULL; } - TALER_DONAU_keys_decref (ges->keys); + DONAU_keys_decref (ges->keys); ges->keys = NULL; GNUNET_free (ges->master_priv_file); GNUNET_free (ges->donau_url); diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c @@ -40,7 +40,7 @@ struct InsertDepositState /** * Database connection we use. */ - struct TALER_DONAUDB_Plugin *plugin; + struct DONAUDB_Plugin *plugin; /** * Human-readable name of the shop. @@ -85,7 +85,7 @@ struct InsertDepositState * @param[out] issue information to initialize with "valid" data */ static void -fake_issue (struct TALER_DONAUDB_DenominationKeyInformation *issue) +fake_issue (struct DONAUDB_DenominationKeyInformation *issue) { struct GNUNET_TIME_Timestamp now; @@ -132,10 +132,10 @@ insert_deposit_run (void *cls, struct TALER_TESTING_Interpreter *is) { struct InsertDepositState *ids = cls; - struct TALER_DONAUDB_CoinDepositInformation deposit; - struct TALER_DONAUDB_BatchDeposit bd; + struct DONAUDB_CoinDepositInformation deposit; + struct DONAUDB_BatchDeposit bd; struct TALER_CharityPrivateKeyP charity_priv; - struct TALER_DONAUDB_DenominationKeyInformation issue; + struct DONAUDB_DenominationKeyInformation issue; struct TALER_DenominationPublicKey dpk; struct TALER_DenominationPrivateKey denom_priv; char *receiver_wire_account; @@ -331,7 +331,7 @@ insert_deposit_cleanup (void *cls, { // FIXME: historically, we also did: // ids->plugin->drop_tables (ids->plugin->cls); - TALER_DONAUDB_plugin_unload (ids->plugin); + DONAUDB_plugin_unload (ids->plugin); ids->plugin = NULL; } GNUNET_free (ids); @@ -349,7 +349,7 @@ TALER_TESTING_cmd_insert_deposit ( const char *amount_with_fee, const char *deposit_fee) { - static struct TALER_DONAUDB_Plugin *pluginc; + static struct DONAUDB_Plugin *pluginc; static const struct GNUNET_CONFIGURATION_Handle *db_cfgc; struct InsertDepositState *ids; @@ -361,7 +361,7 @@ TALER_TESTING_cmd_insert_deposit ( } else { - ids->plugin = TALER_DONAUDB_plugin_load (db_cfg); + ids->plugin = DONAUDB_plugin_load (db_cfg); pluginc = ids->plugin; db_cfgc = db_cfg; } diff --git a/src/testing/testing_api_cmd_reserve_close.c b/src/testing/testing_api_cmd_reserve_close.c @@ -41,7 +41,7 @@ struct CloseState /** * Handle to the "reserve close" operation. */ - struct TALER_DONAU_ReservesCloseHandle *rsh; + struct DONAU_ReservesCloseHandle *rsh; /** * payto://-URI where to wire the funds. @@ -91,7 +91,7 @@ struct CloseState */ static void reserve_close_cb (void *cls, - const struct TALER_DONAU_ReserveCloseResult *rs) + const struct DONAU_ReserveCloseResult *rs) { struct CloseState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; @@ -165,7 +165,7 @@ close_run (void *cls, } GNUNET_CRYPTO_eddsa_key_get_public (&ss->reserve_priv->eddsa_priv, &ss->reserve_pub.eddsa_pub); - ss->rsh = TALER_DONAU_reserves_close ( + ss->rsh = DONAU_reserves_close ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), ss->reserve_priv, @@ -192,7 +192,7 @@ close_cleanup (void *cls, { TALER_TESTING_command_incomplete (ss->is, cmd->label); - TALER_DONAU_reserves_close_cancel (ss->rsh); + DONAU_reserves_close_cancel (ss->rsh); ss->rsh = NULL; } GNUNET_free (ss); diff --git a/src/testing/testing_api_cmd_reserve_get.c b/src/testing/testing_api_cmd_reserve_get.c @@ -81,7 +81,7 @@ struct StatusState /** * Handle to the "reserve status" operation. */ - struct TALER_DONAU_ReservesGetHandle *rsh; + struct DONAU_ReservesGetHandle *rsh; /** * Expected reserve balance. @@ -115,7 +115,7 @@ struct StatusState */ static void reserve_status_cb (void *cls, - const struct TALER_DONAU_ReserveSummary *rs) + const struct DONAU_ReserveSummary *rs) { struct StatusState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; @@ -200,7 +200,7 @@ status_run (void *cls, TALER_TESTING_interpreter_fail (is); return; } - ss->rsh = TALER_DONAU_reserves_get ( + ss->rsh = DONAU_reserves_get ( TALER_TESTING_interpreter_get_context (is), donau_url, ss->reserve_pubp, @@ -232,7 +232,7 @@ status_cleanup (void *cls, { TALER_TESTING_command_incomplete (ss->is, cmd->label); - TALER_DONAU_reserves_get_cancel (ss->rsh); + DONAU_reserves_get_cancel (ss->rsh); ss->rsh = NULL; } GNUNET_free (ss); diff --git a/src/testing/testing_api_cmd_reserve_history.c b/src/testing/testing_api_cmd_reserve_history.c @@ -47,7 +47,7 @@ struct HistoryState /** * Handle to the "reserve history" operation. */ - struct TALER_DONAU_ReservesHistoryHandle *rsh; + struct DONAU_ReservesHistoryHandle *rsh; /** * Expected reserve balance. @@ -66,9 +66,9 @@ struct HistoryState /** * Reserve history entry that corresponds to this operation. - * Will be of type #TALER_DONAU_RTT_HISTORY. + * Will be of type #DONAU_RTT_HISTORY. */ - struct TALER_DONAU_ReserveHistoryEntry reserve_history; + struct DONAU_ReserveHistoryEntry reserve_history; /** * Expected HTTP response code. @@ -96,7 +96,7 @@ struct AnalysisContext /** * Array of history items to match. */ - const struct TALER_DONAU_ReserveHistoryEntry *history; + const struct DONAU_ReserveHistoryEntry *history; /** * Array of @e history_length of matched entries. @@ -124,7 +124,7 @@ analyze_command (void *cls, { struct AnalysisContext *ac = cls; const struct TALER_ReservePublicKeyP *reserve_pub = ac->reserve_pub; - const struct TALER_DONAU_ReserveHistoryEntry *history = ac->history; + const struct DONAU_ReserveHistoryEntry *history = ac->history; unsigned int history_length = ac->history_length; bool *found = ac->found; @@ -174,7 +174,7 @@ analyze_command (void *cls, return; /* command affects some _other_ reserve */ for (unsigned int j = 0; true; j++) { - const struct TALER_DONAU_ReserveHistoryEntry *he; + const struct DONAU_ReserveHistoryEntry *he; bool matched = false; if (GNUNET_OK != @@ -225,7 +225,7 @@ analyze_command (void *cls, */ static void reserve_history_cb (void *cls, - const struct TALER_DONAU_ReserveHistory *rs) + const struct DONAU_ReserveHistory *rs) { struct HistoryState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; @@ -234,13 +234,13 @@ reserve_history_cb (void *cls, ss->rsh = NULL; if (MHD_HTTP_OK == rs->hr.http_status) { - struct TALER_DONAU_Keys *keys; - const struct TALER_DONAU_GlobalFee *gf; + struct DONAU_Keys *keys; + const struct DONAU_GlobalFee *gf; - ss->reserve_history.type = TALER_DONAU_RTT_HISTORY; + ss->reserve_history.type = DONAU_RTT_HISTORY; keys = TALER_TESTING_get_keys (is); GNUNET_assert (NULL != keys); - gf = TALER_DONAU_get_global_fee (keys, + gf = DONAU_get_global_fee (keys, rs->ts); GNUNET_assert (NULL != gf); ss->reserve_history.amount = gf->fees.history; @@ -361,7 +361,7 @@ history_run (void *cls, } GNUNET_CRYPTO_eddsa_key_get_public (&ss->reserve_priv->eddsa_priv, &ss->reserve_pub.eddsa_pub); - ss->rsh = TALER_DONAU_reserves_history ( + ss->rsh = DONAU_reserves_history ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), TALER_TESTING_get_keys (is), @@ -421,7 +421,7 @@ history_cleanup (void *cls, { TALER_TESTING_command_incomplete (ss->is, cmd->label); - TALER_DONAU_reserves_history_cancel (ss->rsh); + DONAU_reserves_history_cancel (ss->rsh); ss->rsh = NULL; } GNUNET_free (ss); diff --git a/src/testing/testing_api_cmd_reserve_open.c b/src/testing/testing_api_cmd_reserve_open.c @@ -74,7 +74,7 @@ struct OpenState /** * Handle to the "reserve open" operation. */ - struct TALER_DONAU_ReservesOpenHandle *rsh; + struct DONAU_ReservesOpenHandle *rsh; /** * Expected reserve balance. @@ -122,7 +122,7 @@ struct OpenState */ static void reserve_open_cb (void *cls, - const struct TALER_DONAU_ReserveOpenResult *rs) + const struct DONAU_ReserveOpenResult *rs) { struct OpenState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; @@ -164,7 +164,7 @@ open_run (void *cls, { struct OpenState *ss = cls; const struct TALER_TESTING_Command *create_reserve; - struct TALER_DONAU_PurseDeposit cp[GNUNET_NZL (ss->cpl)]; + struct DONAU_PurseDeposit cp[GNUNET_NZL (ss->cpl)]; ss->is = is; create_reserve @@ -190,12 +190,12 @@ open_run (void *cls, &ss->reserve_pub.eddsa_pub); for (unsigned int i = 0; i<ss->cpl; i++) { - struct TALER_DONAU_PurseDeposit *cpi = &cp[i]; + struct DONAU_PurseDeposit *cpi = &cp[i]; const struct TALER_TESTING_Command *cmdi; const struct TALER_AgeCommitmentProof *age_commitment_proof; const struct TALER_CoinSpendPrivateKeyP *coin_priv; const struct TALER_DenominationSignature *denom_sig; - const struct TALER_DONAU_DenomPublicKey *denom_pub; + const struct DONAU_DenomPublicKey *denom_pub; char *cref; unsigned int cidx; @@ -251,7 +251,7 @@ open_run (void *cls, cpi->amount = ss->cd[i].amount; cpi->h_denom_pub = denom_pub->h_key; } - ss->rsh = TALER_DONAU_reserves_open ( + ss->rsh = DONAU_reserves_open ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), TALER_TESTING_get_keys (is), @@ -283,7 +283,7 @@ open_cleanup (void *cls, { TALER_TESTING_command_incomplete (ss->is, cmd->label); - TALER_DONAU_reserves_open_cancel (ss->rsh); + DONAU_reserves_open_cancel (ss->rsh); ss->rsh = NULL; } GNUNET_free (ss); diff --git a/src/testing/testing_api_cmd_reserve_status.c b/src/testing/testing_api_cmd_reserve_status.c @@ -41,7 +41,7 @@ struct StatusState /** * Handle to the "reserve status" operation. */ - struct TALER_DONAU_ReservesStatusHandle *rsh; + struct DONAU_ReservesStatusHandle *rsh; /** * Expected reserve balance. @@ -87,7 +87,7 @@ struct AnalysisContext /** * Array of history items to match. */ - const struct TALER_DONAU_ReserveHistoryEntry *history; + const struct DONAU_ReserveHistoryEntry *history; /** * Array of @e history_length of matched entries. @@ -115,7 +115,7 @@ analyze_command (void *cls, { struct AnalysisContext *ac = cls; const struct TALER_ReservePublicKeyP *reserve_pub = ac->reserve_pub; - const struct TALER_DONAU_ReserveHistoryEntry *history = ac->history; + const struct DONAU_ReserveHistoryEntry *history = ac->history; unsigned int history_length = ac->history_length; bool *found = ac->found; @@ -165,7 +165,7 @@ analyze_command (void *cls, return; /* command affects some _other_ reserve */ for (unsigned int j = 0; true; j++) { - const struct TALER_DONAU_ReserveHistoryEntry *he; + const struct DONAU_ReserveHistoryEntry *he; bool matched = false; if (GNUNET_OK != @@ -215,7 +215,7 @@ analyze_command (void *cls, */ static void reserve_status_cb (void *cls, - const struct TALER_DONAU_ReserveStatus *rs) + const struct DONAU_ReserveStatus *rs) { struct StatusState *ss = cls; struct TALER_TESTING_Interpreter *is = ss->is; @@ -337,7 +337,7 @@ status_run (void *cls, } GNUNET_CRYPTO_eddsa_key_get_public (&ss->reserve_priv->eddsa_priv, &ss->reserve_pub.eddsa_pub); - ss->rsh = TALER_DONAU_reserves_status ( + ss->rsh = DONAU_reserves_status ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), TALER_TESTING_get_keys (is), @@ -364,7 +364,7 @@ status_cleanup (void *cls, { TALER_TESTING_command_incomplete (ss->is, cmd->label); - TALER_DONAU_reserves_status_cancel (ss->rsh); + DONAU_reserves_status_cancel (ss->rsh); ss->rsh = NULL; } GNUNET_free (ss); diff --git a/src/testing/testing_api_cmd_revoke.c b/src/testing/testing_api_cmd_revoke.c @@ -135,7 +135,7 @@ revoke_run (void *cls, { struct RevokeState *rs = cls; const struct TALER_TESTING_Command *coin_cmd; - const struct TALER_DONAU_DenomPublicKey *denom_pub; + const struct DONAU_DenomPublicKey *denom_pub; rs->is = is; /* Get denom pub from trait */ diff --git a/src/testing/testing_api_cmd_revoke_denom_key.c b/src/testing/testing_api_cmd_revoke_denom_key.c @@ -51,7 +51,7 @@ struct RevokeState /** * Handle for the operation. */ - struct TALER_DONAU_ManagementRevokeDenominationKeyHandle *kh; + struct DONAU_ManagementRevokeDenominationKeyHandle *kh; /** * Should we use a bogus signature? @@ -70,10 +70,10 @@ struct RevokeState static void success_cb ( void *cls, - const struct TALER_DONAU_ManagementRevokeDenominationResponse *rdr) + const struct DONAU_ManagementRevokeDenominationResponse *rdr) { struct RevokeState *rs = cls; - const struct TALER_DONAU_HttpResponse *hr = &rdr->hr; + const struct DONAU_HttpResponse *hr = &rdr->hr; rs->kh = NULL; if (rs->expected_response_code != hr->http_status) @@ -101,7 +101,7 @@ revoke_cleanup (void *cls, if (NULL != rs->kh) { - TALER_DONAU_management_revoke_denomination_key_cancel (rs->kh); + DONAU_management_revoke_denomination_key_cancel (rs->kh); rs->kh = NULL; } GNUNET_free (rs); @@ -150,7 +150,7 @@ revoke_run (void *cls, { struct RevokeState *rs = cls; const struct TALER_TESTING_Command *coin_cmd; - const struct TALER_DONAU_DenomPublicKey *denom_pub; + const struct DONAU_DenomPublicKey *denom_pub; struct TALER_MasterSignatureP master_sig; const char *donau_url; @@ -213,7 +213,7 @@ revoke_run (void *cls, master_priv, &master_sig); } - rs->kh = TALER_DONAU_management_revoke_denomination_key ( + rs->kh = DONAU_management_revoke_denomination_key ( TALER_TESTING_interpreter_get_context (is), donau_url, &denom_pub->h_key, diff --git a/src/testing/testing_api_cmd_revoke_sign_key.c b/src/testing/testing_api_cmd_revoke_sign_key.c @@ -51,7 +51,7 @@ struct RevokeState /** * Handle for the operation. */ - struct TALER_DONAU_ManagementRevokeSigningKeyHandle *kh; + struct DONAU_ManagementRevokeSigningKeyHandle *kh; /** * Should we use a bogus signature? @@ -70,10 +70,10 @@ struct RevokeState static void success_cb ( void *cls, - const struct TALER_DONAU_ManagementRevokeSigningKeyResponse *rsr) + const struct DONAU_ManagementRevokeSigningKeyResponse *rsr) { struct RevokeState *rs = cls; - const struct TALER_DONAU_HttpResponse *hr = &rsr->hr; + const struct DONAU_HttpResponse *hr = &rsr->hr; rs->kh = NULL; if (rs->expected_response_code != hr->http_status) @@ -101,7 +101,7 @@ revoke_cleanup (void *cls, if (NULL != rs->kh) { - TALER_DONAU_management_revoke_signing_key_cancel (rs->kh); + DONAU_management_revoke_signing_key_cancel (rs->kh); rs->kh = NULL; } GNUNET_free (rs); @@ -150,7 +150,7 @@ revoke_run (void *cls, { struct RevokeState *rs = cls; const struct TALER_TESTING_Command *coin_cmd; - const struct TALER_DonauPublicKeyP *donau_pub; + const struct DONAU_DonauPublicKeyP *donau_pub; struct TALER_MasterSignatureP master_sig; const char *donau_url; @@ -213,7 +213,7 @@ revoke_run (void *cls, master_priv, &master_sig); } - rs->kh = TALER_DONAU_management_revoke_signing_key ( + rs->kh = DONAU_management_revoke_signing_key ( TALER_TESTING_interpreter_get_context (is), donau_url, donau_pub, diff --git a/src/testing/testing_api_cmd_transfer_get.c b/src/testing/testing_api_cmd_transfer_get.c @@ -72,7 +72,7 @@ struct TrackTransferState /** * Handle to a pending "track transfer" operation. */ - struct TALER_DONAU_TransfersGetHandle *tth; + struct DONAU_TransfersGetHandle *tth; /** * Interpreter state. @@ -105,7 +105,7 @@ track_transfer_cleanup (void *cls, { TALER_TESTING_command_incomplete (tts->is, cmd->label); - TALER_DONAU_transfers_get_cancel (tts->tth); + DONAU_transfers_get_cancel (tts->tth); tts->tth = NULL; } GNUNET_free (tts); @@ -122,10 +122,10 @@ track_transfer_cleanup (void *cls, */ static void track_transfer_cb (void *cls, - const struct TALER_DONAU_TransfersGetResponse *tgr) + const struct DONAU_TransfersGetResponse *tgr) { struct TrackTransferState *tts = cls; - const struct TALER_DONAU_HttpResponse *hr = &tgr->hr; + const struct DONAU_HttpResponse *hr = &tgr->hr; struct TALER_TESTING_Interpreter *is = tts->is; struct TALER_Amount expected_amount; @@ -142,7 +142,7 @@ track_transfer_cb (void *cls, { case MHD_HTTP_OK: { - const struct TALER_DONAU_TransferData *ta + const struct DONAU_TransferData *ta = &tgr->details.ok.td; if (NULL == tts->expected_total_amount) @@ -342,7 +342,7 @@ track_transfer_run (void *cls, } GNUNET_assert (NULL != wtid_ptr); } - tts->tth = TALER_DONAU_transfers_get ( + tts->tth = DONAU_transfers_get ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), TALER_TESTING_get_keys (is), diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c @@ -83,7 +83,7 @@ struct WithdrawState * use. Otherwise, this will be set (by the interpreter) to the * denomination PK matching @e amount. */ - struct TALER_DONAU_DenomPublicKey *pk; + struct DONAU_DenomPublicKey *pk; /** * Donau base URL. Only used as offered trait. @@ -151,14 +151,14 @@ struct WithdrawState /** * Reserve history entry that corresponds to this operation. - * Will be of type #TALER_DONAU_RTT_WITHDRAWAL. + * Will be of type #DONAU_RTT_WITHDRAWAL. */ - struct TALER_DONAU_ReserveHistoryEntry reserve_history; + struct DONAU_ReserveHistoryEntry reserve_history; /** * Withdraw handle (while operation is running). */ - struct TALER_DONAU_WithdrawHandle *wsh; + struct DONAU_WithdrawHandle *wsh; /** * Task scheduled to try later. @@ -242,7 +242,7 @@ do_retry (void *cls) */ static void reserve_withdraw_cb (void *cls, - const struct TALER_DONAU_WithdrawResponse *wr) + const struct DONAU_WithdrawResponse *wr) { struct WithdrawState *ws = cls; struct TALER_TESTING_Interpreter *is = ws->is; @@ -348,7 +348,7 @@ withdraw_run (void *cls, struct WithdrawState *ws = cls; const struct TALER_ReservePrivateKeyP *rp; const struct TALER_TESTING_Command *create_reserve; - const struct TALER_DONAU_DenomPublicKey *dpk; + const struct DONAU_DenomPublicKey *dpk; if (NULL != cmd) ws->cmd = cmd; @@ -423,26 +423,26 @@ withdraw_run (void *cls, } /* We copy the denomination key, as re-querying /keys * would free the old one. */ - ws->pk = TALER_DONAU_copy_denomination_key (dpk); + ws->pk = DONAU_copy_denomination_key (dpk); } else { ws->amount = ws->pk->value; } - ws->reserve_history.type = TALER_DONAU_RTT_WITHDRAWAL; + ws->reserve_history.type = DONAU_RTT_WITHDRAWAL; GNUNET_assert (0 <= TALER_amount_add (&ws->reserve_history.amount, &ws->amount, &ws->pk->fees.withdraw)); ws->reserve_history.details.withdraw.fee = ws->pk->fees.withdraw; { - struct TALER_DONAU_WithdrawCoinInput wci = { + struct DONAU_WithdrawCoinInput wci = { .pk = ws->pk, .ps = &ws->ps, .ach = 0 < ws->age ? &ws->h_age_commitment : NULL }; - ws->wsh = TALER_DONAU_withdraw ( + ws->wsh = DONAU_withdraw ( TALER_TESTING_interpreter_get_context (is), TALER_TESTING_get_donau_url (is), TALER_TESTING_get_keys (is), @@ -477,7 +477,7 @@ withdraw_cleanup (void *cls, { TALER_TESTING_command_incomplete (ws->is, cmd->label); - TALER_DONAU_withdraw_cancel (ws->wsh); + DONAU_withdraw_cancel (ws->wsh); ws->wsh = NULL; } if (NULL != ws->retry_task) @@ -488,7 +488,7 @@ withdraw_cleanup (void *cls, TALER_denom_sig_free (&ws->sig); if (NULL != ws->pk) { - TALER_DONAU_destroy_denomination_key (ws->pk); + DONAU_destroy_denomination_key (ws->pk); ws->pk = NULL; } if (ws->age > 0) @@ -651,7 +651,7 @@ struct TALER_TESTING_Command TALER_TESTING_cmd_withdraw_denomination ( const char *label, const char *reserve_reference, - const struct TALER_DONAU_DenomPublicKey *dk, + const struct DONAU_DenomPublicKey *dk, unsigned int expected_response_code) { struct WithdrawState *ws; @@ -665,7 +665,7 @@ TALER_TESTING_cmd_withdraw_denomination ( } ws = GNUNET_new (struct WithdrawState); ws->reserve_reference = reserve_reference; - ws->pk = TALER_DONAU_copy_denomination_key (dk); + ws->pk = DONAU_copy_denomination_key (dk); ws->expected_response_code = expected_response_code; { struct TALER_TESTING_Command cmd = { diff --git a/src/testing/testing_api_misc.c b/src/testing/testing_api_misc.c @@ -259,14 +259,14 @@ TALER_TESTING_cleanup_files_cfg ( } -const struct TALER_DONAU_DenomPublicKey * +const struct DONAU_DenomPublicKey * TALER_TESTING_find_pk ( - const struct TALER_DONAU_Keys *keys, + const struct DONAU_Keys *keys, const struct TALER_Amount *amount, bool age_restricted) { struct GNUNET_TIME_Timestamp now; - struct TALER_DONAU_DenomPublicKey *pk; + struct DONAU_DenomPublicKey *pk; char *str; now = GNUNET_TIME_timestamp_get (); diff --git a/src/util/donau_signatures.c b/src/util/donau_signatures.c @@ -35,7 +35,7 @@ struct DONAU_DonationStatementConfirmationPS { /** * Purpose must be #DONAU_SIGNATURE_DONAU_DONATION_STATEMENT. Signed - * by a `struct TALER_DONAU_EddsaPublicKeyP` using EdDSA. + * by a `struct DONAU_EddsaPublicKeyP` using EdDSA. */ struct GNUNET_CRYPTO_EccSignaturePurpose purpose;