diff options
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r-- | src/include/taler_merchantdb_plugin.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 6f3db87c..29550c4b 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -581,6 +581,21 @@ typedef void /** + * Typically called by `lookup_tips`. + * + * @param cls closure + * @param row_id row of the tip in the database + * @param tip_id id of the tip + * @param amount amount of the tip + */ +typedef void +(*TALER_MERCHANTDB_TipsCallback)(void *cls, + uint64_t row_id, + struct GNUNET_HashCode tip_id, + struct TALER_Amount amount); + + +/** * Function called with information about a coin that was deposited. * * @param cls closure @@ -1848,6 +1863,29 @@ struct TALER_MERCHANTDB_Plugin /** + * Lookup tips + * + * @param cls closure, typically a connection to the db + * @param instance_id which instance should we lookup tips for + * @param expired should we include expired tips? + * @param limit maximum number of results to return, positive for + * ascending row id, negative for descending + * @param offset row id to start returning results from + * @param cb function to call with tip data + * @param cb_cls closure for @a cb + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*lookup_tips)(void *cls, + const char *instance_id, + enum TALER_MERCHANTDB_YesNoAll expired, + int64_t limit, + uint64_t offset, + TALER_MERCHANTDB_TipsCallback cb, + void *cb_cls); + + + /** * Lookup tip details for tip @a tip_id. * * @param cls closure, typically a connection to the db |