exchange

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

commit 9a45742fe4b819c22b0b0d8832ff4a0a07096a90
parent 48c2edc28dc54c21ecb30b9aec31a3699c3f9bd0
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 27 Jan 2016 16:46:51 +0100

adding stubs for wire prepare data functions

Diffstat:
Msrc/include/taler_mintdb_plugin.h | 1-
Msrc/mintdb/plugin_mintdb_postgres.c | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+), 1 deletion(-)

diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h @@ -1376,7 +1376,6 @@ struct TALER_MINTDB_Plugin const struct TALER_Amount *transfer_value); - /** * Function called to insert wire transfer commit data into the DB. * diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c @@ -3988,6 +3988,75 @@ postgres_insert_aggregation_tracking (void *cls, /** + * Function called to insert wire transfer commit data into the DB. + * + * @param cls closure + * @param session database connection + * @param type type fo the wire transfer (i.e. "sepa") + * @param buf buffer with wire transfer preparation data + * @param buf_size number of bytes in @a buf + * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors + */ +static int +postgres_wire_prepare_data_insert (void *cls, + struct TALER_MINTDB_Session *session, + const char *type, + const char *buf, + size_t buf_size) +{ + GNUNET_break (0); // not implemented + return GNUNET_SYSERR; +} + + +/** + * Function called to mark wire transfer commit data as finished. + * + * @param cls closure + * @param session database connection + * @param type type fo the wire transfer (i.e. "sepa") + * @param buf buffer with wire transfer preparation data + * @param buf_size number of bytes in @a buf + * @return #GNUNET_OK on success, #GNUNET_SYSERR on DB errors + */ +static int +postgres_wire_prepare_data_mark_finished (void *cls, + struct TALER_MINTDB_Session *session, + const char *type, + const char *buf, + size_t buf_size) +{ + GNUNET_break (0); // not implemented + return GNUNET_SYSERR; +} + + +/** + * Function called to iterate over unfinished wire transfer + * preparation data. Fetches at most one item. + * + * @param cls closure + * @param session database connection + * @param type type fo the wire transfer (i.e. "sepa") + * @param cb function to call for ONE unfinished item + * @param cb_cls closure for @a cb + * @return #GNUNET_OK on success, + * #GNUNET_NO if there are no entries, + * #GNUNET_SYSERR on DB errors + */ +static int +postgres_wire_prepare_data_iterate (void *cls, + struct TALER_MINTDB_Session *session, + const char *type, + TALER_MINTDB_WirePreparationCallback cb, + void *cb_cls) +{ + GNUNET_break (0); // not implemented + return GNUNET_SYSERR; +} + + +/** * Initialize Postgres database subsystem. * * @param cls a configuration instance @@ -4064,6 +4133,9 @@ libtaler_plugin_mintdb_postgres_init (void *cls) plugin->lookup_wire_transfer = &postgres_lookup_wire_transfer; plugin->wire_lookup_deposit_wtid = &postgres_wire_lookup_deposit_wtid; plugin->insert_aggregation_tracking = &postgres_insert_aggregation_tracking; + plugin->wire_prepare_data_insert = &postgres_wire_prepare_data_insert; + plugin->wire_prepare_data_mark_finished = &postgres_wire_prepare_data_mark_finished; + plugin->wire_prepare_data_iterate = &postgres_wire_prepare_data_iterate; return plugin; }