summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-07-06 15:24:03 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-07-06 15:24:03 +0200
commitedf3738b3f57e481bcb3d0d29cbd18c692465280 (patch)
treecc86349a4cadbe6ea30b64db142696331dbe4c73 /src/include
parent52fa78b448394f1fcd2faec648c0ed3d04d4c7de (diff)
downloadexchange-edf3738b3f57e481bcb3d0d29cbd18c692465280.tar.gz
exchange-edf3738b3f57e481bcb3d0d29cbd18c692465280.tar.bz2
exchange-edf3738b3f57e481bcb3d0d29cbd18c692465280.zip
Put KYC-related low-level DB methods.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchangedb_plugin.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index fb5b47d83..243ba4fde 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -807,6 +807,10 @@ typedef void
const struct TALER_TransferPublicKeyP *tp);
+typedef void
+(*TALER_EXCHANGEDB_KycCallback)(void *cls,
+ struct GNUNET_TIME_Absolute timeout);
+
/**
* Function called with details about coins that were refunding,
* with the goal of auditing the refund's execution.
@@ -2208,8 +2212,35 @@ struct TALER_EXCHANGEDB_Plugin
TALER_EXCHANGEDB_WireMissingCallback cb,
void *cb_cls);
+ /**
+ * Save a amount threshold for a KYC check that
+ * has been triggered for a certain merchant.
+ *
+ * @param cls plugins' closure
+ * @param url "payto" url identifying the merchant to be checked.
+ * @param amount the threshold amount associated with the check.
+ * @return transaction status code.
+ */
+ enum GNUNET_DB_QueryStatus
+ (*insert_kyc_event)(void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *url,
+ const struct TALER_Amount *amount);
+ /**
+ * Get the _last_ KYC event associated with a certain merchant.
+ *
+ * @param cls plugin closure
+ * @param url the payto URL associated with the merchant whose
+ * KYC has to be returned.
+ * @return transaction status.
+ */
+ enum GNUNET_DB_QueryStatus
+ (*kyc_event_get_last) (void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *url,
+ TALER_EXCHANGEDB_KycCallback kyc_cb,
+ void *kyc_cb_cls);
};
-
#endif /* _TALER_EXCHANGE_DB_H */