diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 23 | ||||
-rw-r--r-- | src/include/taler_extensions.h | 8 |
2 files changed, 21 insertions, 10 deletions
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 0766c091..10e1a815 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -223,6 +223,7 @@ enum TALER_EXCHANGEDB_ReplicatedTable TALER_EXCHANGEDB_RT_EXTENSIONS, TALER_EXCHANGEDB_RT_POLICY_DETAILS, TALER_EXCHANGEDB_RT_POLICY_FULFILMENTS, + TALER_EXCHANGEDB_RT_POLICY_DETAILS_FULFILMENTS, TALER_EXCHANGEDB_RT_PURSE_REQUESTS, TALER_EXCHANGEDB_RT_PURSE_REFUNDS, TALER_EXCHANGEDB_RT_PURSE_MERGES, @@ -530,11 +531,17 @@ struct TALER_EXCHANGEDB_TableData char *policy_options; struct GNUNET_HashCode serial_id; struct GNUNET_TIME_Timestamp deadline; - uint64_t fulfilment_serial_id; + uint64_t fulfilment_state; } policy_details; struct { + struct GNUNET_HashCode serial_id; + uint64_t fulfilment_id; + } policy_details_fulfilments; + + struct + { char *fulfilment_proof; struct GNUNET_TIME_Timestamp fulfilment_timestamp; } policy_fulfilments; @@ -1442,23 +1449,25 @@ struct TALER_EXCHANGEDB_Deposit * deposit operation, possibly NULL! */ json_t *policy_details; - bool no_policy_details; + bool has_policy_details; /** - * If policy_details are present, the corresponding policy extension calculates - * a serial id under which the policy_details shall be stored in the policy_details table. + * If policy_details are present, the corresponding policy extension + * calculates a serial id under which the policy_details shall be stored in + * the policy_details table. */ struct GNUNET_HashCode policy_serial_id; /** - * If policy_details are present, the corresponding policy extension can - * set a deadline for this policy. Can be "forever". + * If policy_details are present, the corresponding policy extension can set + * a deadline for this policy. Can be "forever". */ struct GNUNET_TIME_Timestamp policy_deadline; /** - * Hash over the @e policy_details. Only filled if no_policy_details is false. + * Hash over the @e policy_details. Only filled if has_policy_details is + * true. */ struct TALER_ExtensionPolicyHashP h_policy; diff --git a/src/include/taler_extensions.h b/src/include/taler_extensions.h index 4685464a..b2d25678 100644 --- a/src/include/taler_extensions.h +++ b/src/include/taler_extensions.h @@ -390,16 +390,18 @@ TALER_extensions_get_age_restriction_mask (); * @brief Finds the extension for a given policy * * @param[in] policy_details JSON of the policy detail from a deposit request - * @param[out] extension On GNUNET_OK, the exentions handling the given policy + * @param[out] serial On GNUNET_OK, the hash code that should be used to save the policy_details in the policy_details table + * @param[out] deadline On GNUNET_OK, the deadline that should be saved in the policy_details table * @param[out] error_hint On GNUNET_SYSERR, will contain a hint for the reason why it failed * @return GNUNET_OK on success, with *extension set to the correct extension. * GNUNET_NO, when no extension was found. GNUNET_SYSERR when the JSON was * invalid, with *error_hint maybe non-NULL. */ enum GNUNET_GenericReturnValue -TALER_extensions_from_policy_details ( +TALER_extensions_serial_from_policy_details ( const json_t *policy_details, - const struct TALER_Extension **extension, + struct GNUNET_HashCode *serial, + struct GNUNET_TIME_Timestamp *deadline, const char **error_hint); /* |