diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-04 18:45:25 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-04 18:45:25 +0100 |
commit | 0e15a995048f1653e92f762d983bf47b4fc6b39f (patch) | |
tree | 48e075ff6eb17d895f849d5cd5263a8e18da1d3a /src/include | |
parent | 1c84b3d4af1a2484e60a9071556d4690dd7aac33 (diff) |
implement #4937: allow extraction of fees
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchange_service.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 3ac4069f3..3b9058433 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -341,6 +341,69 @@ TALER_EXCHANGE_get_denomination_key_by_hash (const struct TALER_EXCHANGE_Keys *k /** + * Sorted list of fees to be paid for aggregate wire transfers. + */ +struct TALER_EXCHANGE_WireAggregateFees +{ + /** + * This is a linked list. + */ + struct TALER_EXCHANGE_WireAggregateFees *next; + + /** + * Fee to be paid. + */ + struct TALER_Amount wire_fee; + + /** + * Time when this fee goes into effect (inclusive) + */ + struct GNUNET_TIME_Absolute start_date; + + /** + * Time when this fee stops being in effect (exclusive). + */ + struct GNUNET_TIME_Absolute end_date; + + /** + * Signature affirming the above fee structure. + */ + struct TALER_MasterSignatureP master_sig; +}; + + +/** + * Function called with information about the wire fees + * for each wire method. + * + * @param cls closure + * @param wire_method name of the wire method (i.e. "sepa") + * @param fees fee structure for this method + */ +typedef void +(*TALER_EXCHANGE_WireFeeCallback)(void *cls, + const char *wire_method, + const struct TALER_EXCHANGE_WireAggregateFees *fees); + + +/** + * Obtain information about wire fees encoded in @a obj + * by wire method. + * + * @param master_pub public key to use to verify signatures, NULL to not verify + * @param obj wire information as encoded in the #TALER_EXCHANGE_WireResultCallback + * @param cb callback to invoke for the fees + * @param cb_cls closure for @a cb + * @return #GNUNET_OK in success, #GNUNET_SYSERR if @a obj is ill-formed + */ +int +TALER_EXCHANGE_wire_get_fees (const struct TALER_MasterPublicKeyP *master_pub, + const json_t *obj, + TALER_EXCHANGE_WireFeeCallback cb, + void *cb_cls); + + +/** * @brief A Wire format inquiry handle */ struct TALER_EXCHANGE_WireHandle; |