summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-08-17 21:35:21 +0200
committerChristian Grothoff <christian@grothoff.org>2019-08-17 21:35:21 +0200
commit4bf425c902c2047e766e0333e54188ee67a673f5 (patch)
tree8a8e1311a22b8cfafd475eded311b103834451de /src/include
parentcbf6281ca2c4ee0fd77eda4a6d943e3a60a21e0e (diff)
downloadexchange-4bf425c902c2047e766e0333e54188ee67a673f5.tar.gz
exchange-4bf425c902c2047e766e0333e54188ee67a673f5.tar.bz2
exchange-4bf425c902c2047e766e0333e54188ee67a673f5.zip
remove currency field from databases
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h156
-rw-r--r--src/include/taler_pq_lib.h8
-rw-r--r--src/include/taler_util.h3
3 files changed, 8 insertions, 159 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index a065534b8..61ec53054 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -794,29 +794,6 @@ typedef int
/**
- * Callback used to process data of a merchant under KYC monitoring.
- *
- * @param cls closure
- * @param payto_url payto URL of this particular
- * merchant (bank account)
- * @param general_id general identificator valid
- * at the KYC-caring institution
- * @param kyc_checked status of KYC check:
- * if GNUNET_OK, the merchant was checked at least once,
- * never otherwise.
- * @param merchant_serial_id serial ID identifying
- * this merchant (bank account) into the database system;
- * it helps making more efficient queries than the payto
- * URL.
- */
-typedef void
-(*TALER_EXCHANGEDB_KycStatusCallback)(void *cls,
- const char *payto_url,
- const char *general_id,
- uint8_t kyc_checked,
- uint64_t merchant_serial_id);
-
-/**
* Function called with details about coins that were melted,
* with the goal of auditing the refresh's execution.
*
@@ -919,19 +896,6 @@ typedef void
/**
- * Callback for handling a KYC timestamped event associated with
- * a certain customer (= merchant).
- *
- * @param cls closure
- * @param url "payto" URL associated with the customer
- * @param timeout last time when the KYC was issued to the customer.
- */
-typedef void
-(*TALER_EXCHANGEDB_KycCallback)(void *cls,
- const char *url,
- struct GNUNET_TIME_Absolute timeout);
-
-/**
* Function called with details about coins that were refunding,
* with the goal of auditing the refund's execution.
*
@@ -2509,126 +2473,6 @@ struct TALER_EXCHANGEDB_Plugin
TALER_EXCHANGEDB_WireMissingCallback cb,
void *cb_cls);
- /**
- * Insert a merchant into the KYC monitor table, namely it
- * associates a flag to the merchant that indicates whether
- * a KYC check has been done or not on this merchant.
- *
- * @param cls closure
- * @param session db session
- * @param general_id identificator at the KYC-aware institution,
- * can be NULL if this is in-line wiht the rules.
- * @param payto_url payto:// URL indentifying the merchant
- * bank account.
- * @return database transaction status.
- */
- enum GNUNET_DB_QueryStatus
- (*insert_kyc_merchant)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const char *general_id,
- const char *payto_url);
-
- /**
- * Mark a merchant as KYC-checked.
- *
- * @param cls closure
- * @param session db session
- * @param payto_url payto:// URL indentifying the merchant
- * to check. Note, different banks may have different
- * policies to check their customers.
- * @return database transaction status.
- */
- enum GNUNET_DB_QueryStatus
- (*mark_kyc_merchant)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const char *payto_url);
-
-
- /**
- * Mark a merchant as NOT KYC-checked.
- *
- * @param cls closure
- * @param session db session
- * @param payto_url payto:// URL indentifying the merchant
- * to unmark. Note, different banks may have different
- * policies to check their customers.
- * @return database transaction status.
- */
- enum GNUNET_DB_QueryStatus
- (*unmark_kyc_merchant)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const char *payto_url);
-
-
- /**
- * Retrieve KYC-check status related to a particular merchant.
- *
- * @param cls closure
- * @param session db session
- * @param payto_url URL identifying a merchant bank account,
- * whose KYC is going to be retrieved.
- * @param ksc callback to process all the row's columns. As
- * expectable, it will only be called _if_ a row is found.
- * @param ksc_cls closure for above callback.
- * @return transaction status.
- */
- enum GNUNET_DB_QueryStatus
- (*get_kyc_status)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const char *payto_url,
- TALER_EXCHANGEDB_KycStatusCallback ksc,
- void *ksc_cls);
-
- /**
- * Record timestamp where a particular merchant performed
- * a wire transfer.
- *
- * @param cls closure.
- * @param session db session.
- * @param merchant_serial_id serial id of the merchant who
- * performed the wire transfer.
- * @param amount amount of the wire transfer being monitored.
- * @return database transaction status.
- */
- enum GNUNET_DB_QueryStatus
- (*insert_kyc_event)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- uint64_t merchant_serial_id,
- struct TALER_Amount *amount);
-
-
- /**
- * Calculate sum of money flow related to a particular merchant,
- * used for KYC monitoring.
- *
- * @param cls closure
- * @param session DB session
- * @param merchant_serial_id serial id identifying the merchant
- * into the KYC monitoring system.
- * @param amount[out] will store the amount of money received
- * by this merchant.
- */
- enum GNUNET_DB_QueryStatus
- (*get_kyc_events)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- uint64_t merchant_serial_id,
- struct TALER_Amount *amount);
-
- /**
- * Delete wire transfer records related to a particular merchant.
- * This method would be called by the logic once that merchant
- * gets successfully KYC checked.
- *
- * @param cls closure
- * @param session DB session
- * @param merchant_serial_id serial id of the merchant whose
- * KYC records have to be deleted.
- * @return DB transaction status.
- */
- enum GNUNET_DB_QueryStatus
- (*clean_kyc_events)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- uint64_t merchant_serial_id);
};
#endif /* _TALER_EXCHANGE_DB_H */
diff --git a/src/include/taler_pq_lib.h b/src/include/taler_pq_lib.h
index 4ac0a6df2..47040ea02 100644
--- a/src/include/taler_pq_lib.h
+++ b/src/include/taler_pq_lib.h
@@ -94,24 +94,28 @@ TALER_PQ_query_param_absolute_time_nbo (const struct GNUNET_TIME_AbsoluteNBO *x)
* Currency amount expected.
*
* @param name name of the field in the table
+ * @param currency expected currency for the @a amount
* @param[out] amount where to store the result
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
TALER_PQ_result_spec_amount_nbo (const char *name,
- struct TALER_AmountNBO *amount);
+ const char *currency,
+ struct TALER_AmountNBO *amount);
/**
* Currency amount expected.
*
* @param name name of the field in the table
+ * @param currency expected currency for the @a amount
* @param[out] amount where to store the result
* @return array entry for the result specification to use
*/
struct GNUNET_PQ_ResultSpec
TALER_PQ_result_spec_amount (const char *name,
- struct TALER_Amount *amount);
+ const char *currency,
+ struct TALER_Amount *amount);
/**
diff --git a/src/include/taler_util.h b/src/include/taler_util.h
index 2bdc888a6..479a45754 100644
--- a/src/include/taler_util.h
+++ b/src/include/taler_util.h
@@ -87,7 +87,8 @@ TALER_gcrypt_init (void);
*/
const char *
TALER_b2s (const void *buf,
- size_t buf_size);
+ size_t buf_size);
+
/**
* Convert a fixed-sized object to a string using