exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit c002f458ce3d532b633d345427e713a81239e108
parent b7000379ed2c7ca31aeb4561a0ffc1c4bf9405c7
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 30 Dec 2022 14:24:48 +0100

-C skeletions

Diffstat:
Msrc/exchangedb/pg_insert_aml_decision.c | 16++++++++++++++++
Msrc/exchangedb/pg_insert_aml_officer.c | 15+++++++++++++++
Msrc/exchangedb/pg_insert_kyc_attributes.c | 17+++++++++++++++++
Msrc/exchangedb/pg_lookup_aml_officer.c | 14++++++++++++++
Msrc/exchangedb/pg_select_aml_history.c | 11+++++++++++
Msrc/exchangedb/pg_select_aml_process.c | 14++++++++++++++
Msrc/exchangedb/pg_select_kyc_attributes.c | 12++++++++++++
Msrc/exchangedb/pg_select_similar_kyc_attributes.c | 12++++++++++++
Msrc/exchangedb/pg_select_similar_kyc_attributes.h | 8++++----
Msrc/exchangedb/pg_trigger_aml_process.c | 11+++++++++++
Msrc/exchangedb/pg_update_aml_officer.c | 15+++++++++++++++
Msrc/exchangedb/pg_update_kyc_attributes.c | 17+++++++++++++++++
Msrc/exchangedb/plugin_exchangedb_postgres.c | 2--
13 files changed, 158 insertions(+), 6 deletions(-)

diff --git a/src/exchangedb/pg_insert_aml_decision.c b/src/exchangedb/pg_insert_aml_decision.c @@ -24,3 +24,19 @@ #include "taler_pq_lib.h" #include "pg_insert_aml_decision.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_insert_aml_decision ( + void *cls, + const struct TALER_PaytoHashP *h_payto, + const struct TALER_Amount *new_threshold, + enum TALER_AmlDecisionState new_status, + struct GNUNET_TIME_Absolute decision_time, + const char *justification, + const struct TALER_AmlOfficerPublicKeyP *decider_pub, + const struct TALER_AmlOfficerSignatureP *decider_sig) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_insert_aml_officer.c b/src/exchangedb/pg_insert_aml_officer.c @@ -24,3 +24,18 @@ #include "taler_pq_lib.h" #include "pg_insert_aml_officer.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_insert_aml_officer ( + void *cls, + const struct TALER_AmlOfficerPublicKeyP *decider_pub, + const struct TALER_MasterSignatureP *master_sig, + const char *decider_name, + bool is_active, + bool read_only, + struct GNUNET_TIME_Absolute last_change) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_insert_kyc_attributes.c b/src/exchangedb/pg_insert_kyc_attributes.c @@ -24,3 +24,20 @@ #include "taler_pq_lib.h" #include "pg_insert_kyc_attributes.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_insert_kyc_attributes ( + void *cls, + const struct TALER_PaytoHashP *h_payto, + const struct GNUNET_ShortHashCode *kyc_prox, + const char *provider_section, + const char *birthdate, + struct GNUNET_TIME_Timestamp collection_time, + struct GNUNET_TIME_Timestamp expiration_time, + size_t enc_attributes_size, + const void *enc_attributes) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_lookup_aml_officer.c b/src/exchangedb/pg_lookup_aml_officer.c @@ -24,3 +24,17 @@ #include "taler_pq_lib.h" #include "pg_lookup_aml_officer.h" #include "pg_helper.h" + +enum GNUNET_DB_QueryStatus +TEH_PG_lookup_aml_officer ( + void *cls, + const struct TALER_AmlOfficerPublicKeyP *decider_pub, + struct TALER_MasterSignatureP *master_sig, + char **decider_name, + bool *is_active, + bool *read_only, + struct GNUNET_TIME_Absolute *last_change) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_select_aml_history.c b/src/exchangedb/pg_select_aml_history.c @@ -24,3 +24,14 @@ #include "taler_pq_lib.h" #include "pg_select_aml_history.h" #include "pg_helper.h" + +enum GNUNET_DB_QueryStatus +TEH_PG_select_aml_history ( + void *cls, + const struct TALER_PaytoHashP *h_payto, + TALER_EXCHANGEDB_AmlHistoryCallback cb, + void *cb_cls) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_select_aml_process.c b/src/exchangedb/pg_select_aml_process.c @@ -24,3 +24,17 @@ #include "taler_pq_lib.h" #include "pg_select_aml_process.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_select_aml_process ( + void *cls, + enum TALER_AmlDecisionState decision, + uint64_t row_off, + bool forward, + TALER_EXCHANGEDB_AmlStatusCallback cb, + void *cb_cls) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_select_kyc_attributes.c b/src/exchangedb/pg_select_kyc_attributes.c @@ -24,3 +24,15 @@ #include "taler_pq_lib.h" #include "pg_select_kyc_attributes.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_select_kyc_attributes ( + void *cls, + const struct TALER_PaytoHashP *h_payto, + TALER_EXCHANGEDB_AttributeCallback cb, + void *cb_cls) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_select_similar_kyc_attributes.c b/src/exchangedb/pg_select_similar_kyc_attributes.c @@ -24,3 +24,15 @@ #include "taler_pq_lib.h" #include "pg_select_similar_kyc_attributes.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_select_similar_kyc_attributes ( + void *cls, + const struct GNUNET_ShortHashCode *kyc_prox, + TALER_EXCHANGEDB_AttributeCallback cb, + void *cb_cls) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_select_similar_kyc_attributes.h b/src/exchangedb/pg_select_similar_kyc_attributes.h @@ -27,20 +27,20 @@ /** - * Lookup KYC attribute data for a specific account. + * Lookup similar KYC attribute data. * * @param cls closure * @param h_payto account for which the attribute data is stored + * @param kyc_prox key for similarity search * @param cb callback to invoke on each match * @param cb_cls closure for @a cb * @return database transaction status */ enum GNUNET_DB_QueryStatus -TEH_PG_select_kyc_attributes ( +TEH_PG_select_similar_kyc_attributes ( void *cls, - const struct TALER_PaytoHashP *h_payto, + const struct GNUNET_ShortHashCode *kyc_prox, TALER_EXCHANGEDB_AttributeCallback cb, void *cb_cls); - #endif diff --git a/src/exchangedb/pg_trigger_aml_process.c b/src/exchangedb/pg_trigger_aml_process.c @@ -24,3 +24,14 @@ #include "taler_pq_lib.h" #include "pg_trigger_aml_process.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_trigger_aml_process ( + void *cls, + const struct TALER_PaytoHashP *h_payto, + const struct TALER_Amount *threshold_crossed) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_update_aml_officer.c b/src/exchangedb/pg_update_aml_officer.c @@ -24,3 +24,18 @@ #include "taler_pq_lib.h" #include "pg_update_aml_officer.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_update_aml_officer ( + void *cls, + const struct TALER_AmlOfficerPublicKeyP *decider_pub, + const struct TALER_MasterSignatureP *master_sig, + const char *decider_name, + bool is_active, + bool read_only, + struct GNUNET_TIME_Absolute last_change) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/pg_update_kyc_attributes.c b/src/exchangedb/pg_update_kyc_attributes.c @@ -24,3 +24,20 @@ #include "taler_pq_lib.h" #include "pg_update_kyc_attributes.h" #include "pg_helper.h" + + +enum GNUNET_DB_QueryStatus +TEH_PG_update_kyc_attributes ( + void *cls, + const struct TALER_PaytoHashP *h_payto, + const struct GNUNET_ShortHashCode *kyc_prox, + const char *provider_section, + const char *birthdate, + struct GNUNET_TIME_Timestamp collection_time, + struct GNUNET_TIME_Timestamp expiration_time, + size_t enc_attributes_size, + const void *enc_attributes) +{ + GNUNET_break (0); // FIXME: not implemeted! + return GNUNET_DB_STATUS_HARD_ERROR; +} diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c @@ -751,7 +751,6 @@ libtaler_plugin_exchangedb_postgres_init (void *cls) = &TEH_PG_batch_reserves_in_insert; plugin->batch2_reserves_in_insert = &TEH_PG_batch2_reserves_in_insert; -#if 0 plugin->insert_kyc_attributes = &TEH_PG_insert_kyc_attributes; plugin->update_kyc_attributes @@ -774,7 +773,6 @@ libtaler_plugin_exchangedb_postgres_init (void *cls) = &TEH_PG_select_aml_history; plugin->insert_aml_decision = &TEH_PG_insert_aml_decision; -#endif return plugin; }