summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-07-09 21:15:47 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-07-09 21:15:47 +0200
commit5e25d7dbcfbfe1859862a719e4392f17cd356a9b (patch)
tree16cc3a13fcbda9cc122976f46c65ef7e9cb3a23a /src/include
parent01158a48171d6dbfddec1cf274b70d2e730a1a04 (diff)
downloadexchange-5e25d7dbcfbfe1859862a719e4392f17cd356a9b.tar.gz
exchange-5e25d7dbcfbfe1859862a719e4392f17cd356a9b.tar.bz2
exchange-5e25d7dbcfbfe1859862a719e4392f17cd356a9b.zip
Improve KYC status callback.
More parameters for this callback.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 80814efb1..3cecfb5fb 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -711,6 +711,24 @@ typedef int
int done);
+
+/**
+ * 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 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 instead of the payto URL.
+ */
+typedef void
+(*TALER_EXCHANGEDB_KycStatusCallback)(void *cls,
+ const char *payto_url,
+ 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.
@@ -2226,6 +2244,8 @@ struct TALER_EXCHANGEDB_Plugin
* 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 payto_url payto:// URL indentifying the merchant
* bank account.
* @return database transaction status.
@@ -2238,6 +2258,8 @@ struct TALER_EXCHANGEDB_Plugin
/**
* 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.
@@ -2252,6 +2274,8 @@ struct TALER_EXCHANGEDB_Plugin
/**
* 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.
@@ -2266,16 +2290,21 @@ struct TALER_EXCHANGEDB_Plugin
/**
* 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[out] status store the result.
+ * @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,
- uint8_t *status);
+ TALER_EXCHANGEDB_KycStatusCallback ksc,
+ void *ksc_cls);
};
#endif /* _TALER_EXCHANGE_DB_H */