From d49a0d6567e35450fe227ab4ba335af6285b63eb Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 25 May 2015 17:40:27 +0200 Subject: mintdb postgres: add get_known_coin() and insert_known_coin() --- src/include/taler_mintdb_plugin.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/include/taler_mintdb_plugin.h') diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index 6cc8fd76..0cbcb3c4 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -842,6 +842,39 @@ struct TALER_MINTDB_Plugin const struct TALER_MINTDB_RefreshSession *refresh_session); + /** + * Retrieve the record for a known coin. + * + * @param cls the plugin closure + * @param session the database session handle + * @param coin_pub the public key of the coin to search for + * @param ret_coin_info place holder for the returned coin information object + * @return #GNUNET_SYSERR upon error; #GNUNET_NO if no coin is found; #GNUNET_OK + * if upon succesfullying retrieving the record data info @a + * ret_coin_info + */ + int + (*get_known_coin) (void *cls, + struct TALER_MINTDB_Session *session, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + struct TALER_CoinPublicInfo **ret_coin_info); + + + /** + * Insert a coin we know of into the DB. The coin can then be referenced by + * tables for deposits, lock and refresh functionality. + * + * @param cls plugin closure + * @param session the shared database session + * @param coin_info the public coin info + * @return #GNUNET_SYSERR upon error; #GNUNET_OK upon success + */ + int + (*insert_known_coin) (void *cls, + struct TALER_MINTDB_Session *session, + const struct TALER_CoinPublicInfo *coin_info); + + /** * Store the given /refresh/melt request in the database. * -- cgit v1.2.3