diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-11-04 14:20:50 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-11-04 14:20:50 +0100 |
commit | 7177c5c015102e3927976119c989a6a75e376bdc (patch) | |
tree | 3553f5a716a30efcd943eccc0d0965a50cebabb8 /src/include/taler_auditordb_plugin.h | |
parent | 1244bcf3a6329f8327e40b74e858da5890891130 (diff) | |
parent | f113c1ebd6f98d4aa4c8c5eb6ab7e08b11c17a27 (diff) |
Merge branch 'master' of taler.net:exchange
Diffstat (limited to 'src/include/taler_auditordb_plugin.h')
-rw-r--r-- | src/include/taler_auditordb_plugin.h | 92 |
1 files changed, 88 insertions, 4 deletions
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h index cc75fb014..6bfae25cc 100644 --- a/src/include/taler_auditordb_plugin.h +++ b/src/include/taler_auditordb_plugin.h @@ -29,6 +29,90 @@ /** + * Function called with the results of select_denomination_info() + * + * @param cls closure + * @param issue issuing information with value, fees and other info about the denomination. + * + * @return sets the return value of select_denomination_info(), + * #GNUNET_OK to continue, + * #GNUNET_NO to stop processing further rows + * #GNUNET_SYSERR or other values on error. + */ +typedef int +(*TALER_AUDITORDB_DenominationInfoDataCallback)(void *cls, + const struct TALER_DenominationKeyValidityPS *issue); + + +/** + * Function called with the results of select_historic_denom_revenue() + * + * @param cls closure + * @param denom_pub_hash hash of the denomination key + * @param revenue_timestamp when did this profit get realized + * @param revenue_balance what was the total profit made from + * deposit fees, melting fees, refresh fees + * and coins that were never returned? + * @param deposit_fee_balance total profits from deposit fees + * @param melt_fee_balance total profits from melting fees + * @param refund_fee_balance total profits from refund fees + * + * @return sets the return value of select_denomination_info(), + * #GNUNET_OK to continue, + * #GNUNET_NO to stop processing further rows + * #GNUNET_SYSERR or other values on error. + */ +typedef int +(*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)(void *cls, + const struct GNUNET_HashCode *denom_pub_hash, + struct GNUNET_TIME_Absolute revenue_timestamp, + const struct TALER_Amount *revenue_balance, + const struct TALER_Amount *deposit_fee_balance, + const struct TALER_Amount *melt_fee_balance, + const struct TALER_Amount *refund_fee_balance); + + +/** + * Function called with the results of select_historic_losses() + * + * @param cls closure + * @param denom_pub_hash hash of the denomination key + * @param loss_timestamp when did this profit get realized + * @param loss_balance what was the total loss + * + * @return sets the return value of select_denomination_info(), + * #GNUNET_OK to continue, + * #GNUNET_NO to stop processing further rows + * #GNUNET_SYSERR or other values on error. + */ +typedef int +(*TALER_AUDITORDB_HistoricLossesDataCallback)(void *cls, + const struct GNUNET_HashCode *denom_pub_hash, + struct GNUNET_TIME_Absolute loss_timestamp, + const struct TALER_Amount *loss_balance); + + +/** + * Function called with the results of select_historic_reserve_revenue() + * + * @param cls closure + * @param start_time beginning of aggregated time interval + * @param end_time end of aggregated time interval + * @param reserve_profits total profits made + * + * @return sets the return value of select_denomination_info(), + * #GNUNET_OK to continue, + * #GNUNET_NO to stop processing further rows + * #GNUNET_SYSERR or other values on error. + */ +typedef int +(*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)(void *cls, + struct GNUNET_TIME_Absolute start_time, + struct GNUNET_TIME_Absolute end_time, + const struct TALER_Amount *reserve_profits); + + +/** * Handle for one session with the database. */ struct TALER_AUDITORDB_Session; @@ -164,7 +248,7 @@ struct TALER_AUDITORDB_Plugin (*select_denomination_info)(void *cls, struct TALER_AUDITORDB_Session *session, const struct TALER_MasterPublicKeyP *master_pub, - void *cb, /* FIXME: type! */ + TALER_AUDITORDB_DenominationInfoDataCallback cb, void *cb_cls); @@ -586,7 +670,7 @@ struct TALER_AUDITORDB_Plugin (*select_historic_denom_revenue)(void *cls, struct TALER_AUDITORDB_Session *session, const struct TALER_MasterPublicKeyP *master_pub, - void *cb, /* FIXME: fix type */ + TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb, void *cb_cls); @@ -628,7 +712,7 @@ struct TALER_AUDITORDB_Plugin (*select_historic_losses)(void *cls, struct TALER_AUDITORDB_Session *session, const struct TALER_MasterPublicKeyP *master_pub, - void *cb, /* FIXME: fix type */ + TALER_AUDITORDB_HistoricLossesDataCallback cb, void *cb_cls); @@ -666,7 +750,7 @@ struct TALER_AUDITORDB_Plugin (*select_historic_reserve_revenue)(void *cls, struct TALER_AUDITORDB_Session *session, const struct TALER_MasterPublicKeyP *master_pub, - void *cb, /* FIXME: type */ + TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb, void *cb_cls); |