diff options
Diffstat (limited to 'src/include/taler_extensions_policy.h')
-rw-r--r-- | src/include/taler_extensions_policy.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/include/taler_extensions_policy.h b/src/include/taler_extensions_policy.h index 97fc509b4..7750f58f1 100644 --- a/src/include/taler_extensions_policy.h +++ b/src/include/taler_extensions_policy.h @@ -31,21 +31,24 @@ */ enum TALER_PolicyFulfillmentState { + /* Initial state of an fulfillment, before any other state. */ + TALER_PolicyFulfillmentInitial = 0, + /* General error state of an fulfillment. */ - TALER_PolicyFulfillmentFailure = 0, + TALER_PolicyFulfillmentFailure = 1, /* The policy is not yet ready due to insufficient funding. More deposits are * necessary for it to become ready . */ - TALER_PolicyFulfillmentInsufficient = 1, + TALER_PolicyFulfillmentInsufficient = 2, /* The policy is funded and ready, pending */ - TALER_PolicyFulfillmentReady = 2, + TALER_PolicyFulfillmentReady = 3, /* Policy is provably fulfilled. */ - TALER_PolicyFulfillmentSuccess = 3, + TALER_PolicyFulfillmentSuccess = 4, /* Policy fulfillment has timed out */ - TALER_PolicyFulfillmentTimeout = 4, + TALER_PolicyFulfillmentTimeout = 5, TALER_PolicyFulfillmentStateCount = TALER_PolicyFulfillmentTimeout + 1 }; @@ -143,6 +146,7 @@ struct TALER_PolicyFulfillmentTransactionData /* * @brief Extracts policy details from the deposit's policy options and the policy extensions * + * @param[in] currency Currency used in the exchange * @param[in] policy_options JSON of the policy options from a deposit request * @param[out] details On GNUNET_OK, the parsed details * @param[out] error_hint On GNUNET_SYSERR, will contain a hint for the reason why it failed @@ -151,6 +155,7 @@ struct TALER_PolicyFulfillmentTransactionData */ enum GNUNET_GenericReturnValue TALER_extensions_create_policy_details ( + const char *currency, const json_t *policy_options, struct TALER_PolicyDetails *details, const char **error_hint); |