aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_extensions_policy.h
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2022-10-14 19:00:57 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2022-10-14 19:00:57 +0200
commit15e8697ece7d1b32e4f1d8377dfb6afc38898a21 (patch)
treecb094d8dd5d9f7602652f5cf5c06db834ad37a42 /src/include/taler_extensions_policy.h
parent054e157af8c768062dd0a8e66614da18407fca28 (diff)
-added missing files to last commit
Diffstat (limited to 'src/include/taler_extensions_policy.h')
-rw-r--r--src/include/taler_extensions_policy.h129
1 files changed, 64 insertions, 65 deletions
diff --git a/src/include/taler_extensions_policy.h b/src/include/taler_extensions_policy.h
index cd75f2d4..4e92d37d 100644
--- a/src/include/taler_extensions_policy.h
+++ b/src/include/taler_extensions_policy.h
@@ -61,57 +61,57 @@ TALER_policy_fulfillment_state_str (enum TALER_PolicyFulfillmentState state);
/* @brief Details of a policy for a deposit request */
struct TALER_PolicyDetails
{
- /* Hash code that should be used for the .policy_hash_code field when
- * this policy is saved in the policy_details table. */
- struct GNUNET_HashCode hash_code;
-
- /* Content of the policy in its original JSON form */
- const json_t *policy_json;
-
- /* When the deadline is meat and the policy is still in "Ready" state,
- * a timeout-handler will transfer the amount
- * (total_amount - policy_fee - refreshable_amount)
- * to the payto-URI from the corresponding deposit. The value
- * amount_refreshable will be refreshable by the owner of the
- * associated deposits's coins */
- struct GNUNET_TIME_Timestamp deadline;
-
- /* The amount to which this policy commits to. It must be at least as
- * large as @e policy_fee. */
- struct TALER_Amount commitment;
-
- /* The total sum of contributions from coins so far to fund this
- * policy. It must be at least as large as @commitment in order to be
- * sufficiently funded. */
- struct TALER_Amount accumulated_total;
-
- /* The fee from the exchange for handling the policy. It is due when
- * the state changes to Timeout or Success. */
- struct TALER_Amount policy_fee;
-
- /* The amount that will be transfered to the payto-URIs from the
- * corresponding deposits when the fulfillment state changes to Timeout
- * or Success. Note that a fulfillment handler can alter this upon
- * arrival of a proof of fulfillment. The remaining amount
- * (accumulated_amount - policy_amount - transferable_amount) */
- struct TALER_Amount transferable_amount;
-
- /* The state of fulfillment of a policy.
- * - If the state is Insufficient, the client is required to call
- * /deposit -maybe multiple times- with enough coins and the same
- * policy details in order to reach the required amount. The state is
- * then changed to Ready.
- * - If the state changes to Timeout or Success, a handler will transfer
- * the amount (total_amount - policy_fee - refreshable_amount) to the
- * payto-URI from the corresponding deposit. The value
- * amount_refreshable will be refreshable by the owner of the
- * associated deposits's coins. */
- enum TALER_PolicyFulfillmentState fulfillment_state;
-
- /* If there is a proof of fulfillment, the row ID from the
- * policy_fulfillment table */
- uint64_t policy_fulfillment_id;
- bool no_policy_fulfillment_id;
+ /* Hash code that should be used for the .policy_hash_code field when
+ * this policy is saved in the policy_details table. */
+ struct GNUNET_HashCode hash_code;
+
+ /* Content of the policy in its original JSON form */
+ const json_t *policy_json;
+
+ /* When the deadline is meat and the policy is still in "Ready" state,
+ * a timeout-handler will transfer the amount
+ * (total_amount - policy_fee - refreshable_amount)
+ * to the payto-URI from the corresponding deposit. The value
+ * amount_refreshable will be refreshable by the owner of the
+ * associated deposits's coins */
+ struct GNUNET_TIME_Timestamp deadline;
+
+ /* The amount to which this policy commits to. It must be at least as
+ * large as @e policy_fee. */
+ struct TALER_Amount commitment;
+
+ /* The total sum of contributions from coins so far to fund this
+ * policy. It must be at least as large as @commitment in order to be
+ * sufficiently funded. */
+ struct TALER_Amount accumulated_total;
+
+ /* The fee from the exchange for handling the policy. It is due when
+ * the state changes to Timeout or Success. */
+ struct TALER_Amount policy_fee;
+
+ /* The amount that will be transfered to the payto-URIs from the
+ * corresponding deposits when the fulfillment state changes to Timeout
+ * or Success. Note that a fulfillment handler can alter this upon
+ * arrival of a proof of fulfillment. The remaining amount
+ * (accumulated_amount - policy_amount - transferable_amount) */
+ struct TALER_Amount transferable_amount;
+
+ /* The state of fulfillment of a policy.
+ * - If the state is Insufficient, the client is required to call
+ * /deposit -maybe multiple times- with enough coins and the same
+ * policy details in order to reach the required amount. The state is
+ * then changed to Ready.
+ * - If the state changes to Timeout or Success, a handler will transfer
+ * the amount (total_amount - policy_fee - refreshable_amount) to the
+ * payto-URI from the corresponding deposit. The value
+ * amount_refreshable will be refreshable by the owner of the
+ * associated deposits's coins. */
+ enum TALER_PolicyFulfillmentState fulfillment_state;
+
+ /* If there is a proof of fulfillment, the row ID from the
+ * policy_fulfillment table */
+ uint64_t policy_fulfillment_id;
+ bool no_policy_fulfillment_id;
};
/*
@@ -120,27 +120,26 @@ struct TALER_PolicyDetails
*/
struct TALER_PolicyFulfillmentTransactionData
{
- /* The incoming proof, provided by a client */
- const json_t *proof;
+ /* The incoming proof, provided by a client */
+ const json_t *proof;
- /* The Hash of the proof */
- struct GNUNET_HashCode h_proof;
+ /* The Hash of the proof */
+ struct GNUNET_HashCode h_proof;
- /* The timestamp of retrieval of the proof */
- struct GNUNET_TIME_Timestamp timestamp;
+ /* The timestamp of retrieval of the proof */
+ struct GNUNET_TIME_Timestamp timestamp;
- /* The ID of the proof in the policy_fulfillment table. Will be set
- * during the transaction. Needed to fill the table
- * policy_details_fulfillments. */
- uint64_t fulfillment_id;
+ /* The ID of the proof in the policy_fulfillment table. Will be set
+ * during the transaction. Needed to fill the table
+ * policy_details_fulfillments. */
+ uint64_t fulfillment_id;
- /* The list of policy details. Will be updated by the policy handler */
- struct TALER_PolicyDetails *details;
- size_t details_count;
+ /* The list of policy details. Will be updated by the policy handler */
+ struct TALER_PolicyDetails *details;
+ size_t details_count;
};
-
/*
* @brief Extracts policy details from the deposit's policy options and the policy extensions
*