diff options
author | Sree Harsha Totakura <sreeharsha@totakura.in> | 2015-05-25 17:40:27 +0200 |
---|---|---|
committer | Sree Harsha Totakura <sreeharsha@totakura.in> | 2015-05-25 17:40:27 +0200 |
commit | d49a0d6567e35450fe227ab4ba335af6285b63eb (patch) | |
tree | 4bfc9bc9e96f6d0739495040e268130e7345aa2e /src/include | |
parent | b00bea0b44fff4169c1c629bc6908a7ddddfd74d (diff) |
mintdb postgres: add get_known_coin() and insert_known_coin()
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_mintdb_plugin.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h index 6cc8fd76c..0cbcb3c4e 100644 --- a/src/include/taler_mintdb_plugin.h +++ b/src/include/taler_mintdb_plugin.h @@ -843,6 +843,39 @@ struct TALER_MINTDB_Plugin /** + * 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. * * @param cls the @e cls of this struct with the plugin-specific state |