diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-05 22:57:55 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-05 22:57:55 +0200 |
commit | 0c959e75d109fc914ab8891518f7963ade74cff8 (patch) | |
tree | 2f0bc9375e019a57d9787dddb5eed8fd6aadfc67 /src/include/taler_exchangedb_plugin.h | |
parent | 07d9978fb94b50345dfe0d52f48b1fe962417cfd (diff) | |
download | exchange-0c959e75d109fc914ab8891518f7963ade74cff8.tar.xz |
working on #3641: more on /refund implementation
Diffstat (limited to 'src/include/taler_exchangedb_plugin.h')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 8e00be751..7dcdb698f 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -499,7 +499,12 @@ enum TALER_EXCHANGEDB_TransactionType /** * /refresh/melt operation. */ - TALER_EXCHANGEDB_TT_REFRESH_MELT = 1 + TALER_EXCHANGEDB_TT_REFRESH_MELT = 1, + + /** + * /refund operation. + */ + TALER_EXCHANGEDB_TT_REFUND = 2 }; @@ -536,6 +541,11 @@ struct TALER_EXCHANGEDB_TransactionList */ struct TALER_EXCHANGEDB_RefreshMelt *melt; + /** + * Details if transaction was a /refund operation. + */ + struct TALER_EXCHANGEDB_Refund *refund; + } details; }; @@ -954,6 +964,20 @@ struct TALER_EXCHANGEDB_Plugin /** + * Insert information about refunded coin into the database. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param session connection to the database + * @param refund refund information to store + * @return #GNUNET_OK on success, #GNUNET_SYSERR on error + */ + int + (*insert_refund) (void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Refund *refund); + + + /** * Mark a deposit as tiny, thereby declaring that it cannot be * executed by itself and should no longer be returned by * @e iterate_ready_deposits() @@ -970,6 +994,22 @@ struct TALER_EXCHANGEDB_Plugin /** + * Test if a deposit was marked as done, thereby declaring that it cannot be + * refunded anymore. + * + * @param cls the @e cls of this struct with the plugin-specific state + * @param session connection to the database + * @param deposit the deposit to check + * @return #GNUNET_YES if is is marked done done, #GNUNET_NO if not, + * #GNUNET_SYSERR on error (deposit unknown) + */ + int + (*test_deposit_done) (void *cls, + struct TALER_EXCHANGEDB_Session *session, + const struct TALER_EXCHANGEDB_Deposit *deposit); + + + /** * Mark a deposit as done, thereby declaring that it cannot be * executed at all anymore, and should no longer be returned by * @e iterate_ready_deposits() or @e iterate_matching_deposits(). |