diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-05 15:08:21 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-05 15:08:21 +0200 |
commit | a6734b3ebe3a721742a9f91cf55f78578e2111c5 (patch) | |
tree | cedf4652fc15983ce0a287519e3fc4a4af14dbd7 /src/include/taler_merchantdb_plugin.h | |
parent | 148de70dd07591d40a5fa123dcbf4c3b1701cab2 (diff) | |
download | merchant-a6734b3ebe3a721742a9f91cf55f78578e2111c5.tar.gz merchant-a6734b3ebe3a721742a9f91cf55f78578e2111c5.tar.bz2 merchant-a6734b3ebe3a721742a9f91cf55f78578e2111c5.zip |
include exchange_uri with merchant_proofs
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r-- | src/include/taler_merchantdb_plugin.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 1b3013dd..8ce021a1 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -98,6 +98,17 @@ typedef void /** + * Function called with information about a wire transfer identifier. + * + * @param cls closure + * @param proof proof from exchange about what the wire transfer was for + */ +typedef void +(*TALER_MERCHANTDB_ProofCallback)(void *cls, + const json_t *proof); + + +/** * Handle to interact with the database. */ struct TALER_MERCHANTDB_Plugin @@ -199,12 +210,14 @@ struct TALER_MERCHANTDB_Plugin * Insert wire transfer confirmation from the exchange into the database. * * @param cls closure + * @param exchange_uri from which exchange did we get the @a exchange_proof * @param wtid identifier of the wire transfer * @param exchange_proof proof from exchange about what the deposit was for * @return #GNUNET_OK on success, #GNUNET_SYSERR upon error */ int (*store_transfer_to_proof) (void *cls, + const char *exchange_uri, const struct TALER_WireTransferIdentifierRawP *wtid, const json_t *exchange_proof); @@ -280,6 +293,24 @@ struct TALER_MERCHANTDB_Plugin TALER_MERCHANTDB_CoinDepositCallback cb, void *cb_cls); + + /** + * Lookup proof information about a wire transfer. + * + * @param cls closure + * @param exchange_uri from which exchange are we looking for proof + * @param wtid wire transfer identifier for the search + * @param cb function to call with proof data + * @param cb_cls closure for @a cb + * @return #GNUNET_OK on success, #GNUNET_NO if transaction Id is unknown, + * #GNUNET_SYSERR on hard errors + */ + int + (*find_proof_by_wtid) (void *cls, + const char *exchange_uri, + const struct TALER_WireTransferIdentifierRawP *wtid, + TALER_MERCHANTDB_ProofCallback cb, + void *cb_cls); }; |