summaryrefslogtreecommitdiff
path: root/src/include/taler_mintdb_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_mintdb_plugin.h')
-rw-r--r--src/include/taler_mintdb_plugin.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/include/taler_mintdb_plugin.h b/src/include/taler_mintdb_plugin.h
index 6cc8fd76c..63dacf73b 100644
--- a/src/include/taler_mintdb_plugin.h
+++ b/src/include/taler_mintdb_plugin.h
@@ -332,7 +332,7 @@ struct TALER_MINTDB_RefreshMelt
*/
struct TALER_Amount amount_with_fee;
- /**
+ /** FIXME: This can be retrieved from the Denomination? Do we need this?
* Melting fee charged by the mint. This must match the Mint's
* denomination key's melting fee. If the client puts in an invalid
* melting fee (too high or too low) that does not match the Mint's
@@ -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 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 *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