aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-14 16:10:40 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-14 16:10:40 +0100
commitad5d54f48534ac0ad5bfd7f048bd7782e674a89b (patch)
tree4443e41c1aec412d82642b194aa3d837c9eb5cfd /src/include
parent49e2e44b09dd845d0922c0acef5ff487b52bf26d (diff)
migration to protocol v11
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_merchant_service.h44
-rw-r--r--src/include/taler_merchant_testing_lib.h42
-rw-r--r--src/include/taler_merchantdb_plugin.h70
3 files changed, 77 insertions, 79 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 58148896..7520b553 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -997,7 +997,7 @@ typedef void
uint64_t total_sold,
uint64_t total_lost,
const json_t *location,
- struct GNUNET_TIME_Absolute next_restock);
+ struct GNUNET_TIME_Timestamp next_restock);
/**
@@ -1085,7 +1085,7 @@ TALER_MERCHANT_products_post (
const json_t *taxes,
int64_t total_stock,
const json_t *address,
- struct GNUNET_TIME_Absolute next_restock,
+ struct GNUNET_TIME_Timestamp next_restock,
TALER_MERCHANT_ProductsPostCallback cb,
void *cb_cls);
@@ -1161,7 +1161,7 @@ TALER_MERCHANT_product_patch (
int64_t total_stock,
uint64_t total_lost,
const json_t *address,
- struct GNUNET_TIME_Absolute next_restock,
+ struct GNUNET_TIME_Timestamp next_restock,
TALER_MERCHANT_ProductPatchCallback cb,
void *cb_cls);
@@ -1353,7 +1353,7 @@ struct TALER_MERCHANT_PostOrdersReply
* When does the backend expect the stock to be
* restocked? 0 for unknown.
*/
- struct GNUNET_TIME_Absolute restock_expected;
+ struct GNUNET_TIME_Timestamp restock_expected;
} gone;
@@ -1480,7 +1480,7 @@ struct TALER_MERCHANT_OrderEntry
* Time when the order was created. Useful for filtering by
* 'date' (in #TALER_MERCHANT_orders_get2()).
*/
- struct GNUNET_TIME_Absolute timestamp;
+ struct GNUNET_TIME_Timestamp timestamp;
/**
* Serial ID of the order. Useful for filtering by 'start_row'
@@ -1569,7 +1569,7 @@ TALER_MERCHANT_orders_get2 (
enum TALER_EXCHANGE_YesNoAll paid,
enum TALER_EXCHANGE_YesNoAll refunded,
enum TALER_EXCHANGE_YesNoAll wired,
- struct GNUNET_TIME_Absolute date,
+ struct GNUNET_TIME_Timestamp date,
uint64_t start_row,
int64_t delta,
struct GNUNET_TIME_Relative timeout,
@@ -1695,7 +1695,7 @@ struct TALER_MERCHANT_WireTransfer
* as the time at which the exchange initiated the transfer
* may differ from the time the bank or the merchant observed).
*/
- struct GNUNET_TIME_Absolute execution_time;
+ struct GNUNET_TIME_Timestamp execution_time;
/**
* Wire transfer subject.
@@ -1761,7 +1761,7 @@ struct TALER_MERCHANT_RefundOrderDetail
/**
* Time when the refund was granted.
*/
- struct GNUNET_TIME_Absolute refund_time;
+ struct GNUNET_TIME_Timestamp refund_time;
/**
* Total amount that was refunded.
@@ -1935,7 +1935,7 @@ struct TALER_MERCHANT_OrderStatusResponse
/**
* Time when the order was created.
*/
- struct GNUNET_TIME_Absolute creation_time;
+ struct GNUNET_TIME_Timestamp creation_time;
/**
* Total amount the order is about (amount to be paid by customer).
@@ -2291,9 +2291,9 @@ TALER_MERCHANT_order_pay (struct GNUNET_CURL_Context *ctx,
const struct TALER_Amount *max_fee,
const struct TALER_MerchantPublicKeyP *merchant_pub,
const struct TALER_MerchantSignatureP *merchant_sig,
- struct GNUNET_TIME_Absolute timestamp,
- struct GNUNET_TIME_Absolute refund_deadline,
- struct GNUNET_TIME_Absolute pay_deadline,
+ struct GNUNET_TIME_Timestamp timestamp,
+ struct GNUNET_TIME_Timestamp refund_deadline,
+ struct GNUNET_TIME_Timestamp pay_deadline,
const struct TALER_MerchantWireHash *h_wire,
const char *order_id,
unsigned int num_coins,
@@ -2736,7 +2736,7 @@ typedef void
(*TALER_MERCHANT_PostTransfersCallback) (
void *cls,
const struct TALER_MERCHANT_HttpResponse *hr,
- struct GNUNET_TIME_Absolute execution_time,
+ struct GNUNET_TIME_Timestamp execution_time,
const struct TALER_Amount *total_amount,
const struct TALER_Amount *wire_fee,
unsigned int details_length,
@@ -2876,7 +2876,7 @@ struct TALER_MERCHANT_TransferData
* Time of the wire transfer, according to the exchange.
* 0 for not provided by the exchange.
*/
- struct GNUNET_TIME_Absolute execution_time;
+ struct GNUNET_TIME_Timestamp execution_time;
/**
* Did we check the exchange's answer and are happy about it? False if we
@@ -2941,8 +2941,8 @@ TALER_MERCHANT_transfers_get (
struct GNUNET_CURL_Context *ctx,
const char *backend_url,
const char *payto_uri,
- const struct GNUNET_TIME_Absolute before,
- const struct GNUNET_TIME_Absolute after,
+ const struct GNUNET_TIME_Timestamp before,
+ const struct GNUNET_TIME_Timestamp after,
int64_t limit,
uint64_t offset,
enum TALER_EXCHANGE_YesNoAll verified,
@@ -3040,12 +3040,12 @@ struct TALER_MERCHANT_ReserveSummary
/**
* Timestamp when it was established
*/
- struct GNUNET_TIME_Absolute creation_time;
+ struct GNUNET_TIME_Timestamp creation_time;
/**
* Timestamp when it expires
*/
- struct GNUNET_TIME_Absolute expiration_time;
+ struct GNUNET_TIME_Timestamp expiration_time;
/**
* Initial amount as per reserve creation call
@@ -3108,7 +3108,7 @@ typedef void
struct TALER_MERCHANT_ReservesGetHandle *
TALER_MERCHANT_reserves_get (struct GNUNET_CURL_Context *ctx,
const char *backend_url,
- struct GNUNET_TIME_Absolute after,
+ struct GNUNET_TIME_Timestamp after,
enum TALER_EXCHANGE_YesNoAll active,
enum TALER_EXCHANGE_YesNoAll failures,
TALER_MERCHANT_ReservesGetCallback cb,
@@ -3232,7 +3232,7 @@ typedef void
const struct TALER_MERCHANT_HttpResponse *hr,
struct GNUNET_HashCode *tip_id,
const char *tip_uri,
- struct GNUNET_TIME_Absolute tip_expiration);
+ struct GNUNET_TIME_Timestamp tip_expiration);
/**
@@ -3384,7 +3384,7 @@ typedef void
(*TALER_MERCHANT_TipWalletGetCallback) (
void *cls,
const struct TALER_MERCHANT_HttpResponse *hr,
- struct GNUNET_TIME_Absolute expiration,
+ struct GNUNET_TIME_Timestamp expiration,
const char *exchange_url,
const struct TALER_Amount *amount_remaining);
@@ -3465,7 +3465,7 @@ typedef void
const struct TALER_Amount *total_authorized,
const struct TALER_Amount *total_picked_up,
const char *reason,
- struct GNUNET_TIME_Absolute expiration,
+ struct GNUNET_TIME_Timestamp expiration,
const struct TALER_ReservePublicKeyP *reserve_pub,
unsigned int pickups_length,
const struct TALER_MERCHANT_PickupDetail pickups[]);
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
index de49336f..18a1e0cc 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -339,7 +339,7 @@ TALER_TESTING_cmd_merchant_post_products2 (
json_t *taxes,
int64_t total_stock,
json_t *address,
- struct GNUNET_TIME_Absolute next_restock,
+ struct GNUNET_TIME_Timestamp next_restock,
unsigned int http_status);
@@ -404,7 +404,7 @@ TALER_TESTING_cmd_merchant_patch_product (
int64_t total_stock,
uint64_t total_lost,
json_t *address,
- struct GNUNET_TIME_Absolute next_restock,
+ struct GNUNET_TIME_Timestamp next_restock,
unsigned int http_status);
@@ -502,15 +502,14 @@ TALER_TESTING_cmd_merchant_delete_product (const char *label,
* @return the command
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_merchant_post_orders (const char *label,
- const char *merchant_url,
- unsigned int http_status,
- const char *order_id,
- struct GNUNET_TIME_Absolute
- refund_deadline,
- struct GNUNET_TIME_Absolute
- pay_deadline,
- const char *amount);
+TALER_TESTING_cmd_merchant_post_orders (
+ const char *label,
+ const char *merchant_url,
+ unsigned int http_status,
+ const char *order_id,
+ struct GNUNET_TIME_Timestamp refund_deadline,
+ struct GNUNET_TIME_Timestamp pay_deadline,
+ const char *amount);
/**
* Make the "proposal" command AVOIDING claiming the order.
@@ -526,15 +525,14 @@ TALER_TESTING_cmd_merchant_post_orders (const char *label,
* @return the command
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_merchant_post_orders_no_claim (const char *label,
- const char *merchant_url,
- unsigned int http_status,
- const char *order_id,
- struct GNUNET_TIME_Absolute
- refund_deadline,
- struct GNUNET_TIME_Absolute
- pay_deadline,
- const char *amount);
+TALER_TESTING_cmd_merchant_post_orders_no_claim (
+ const char *label,
+ const char *merchant_url,
+ unsigned int http_status,
+ const char *order_id,
+ struct GNUNET_TIME_Timestamp refund_deadline,
+ struct GNUNET_TIME_Timestamp pay_deadline,
+ const char *amount);
/**
* Make the "proposal" command.
@@ -564,8 +562,8 @@ TALER_TESTING_cmd_merchant_post_orders2 (
const char *merchant_url,
unsigned int http_status,
const char *order_id,
- struct GNUNET_TIME_Absolute refund_deadline,
- struct GNUNET_TIME_Absolute pay_deadline,
+ struct GNUNET_TIME_Timestamp refund_deadline,
+ struct GNUNET_TIME_Timestamp pay_deadline,
bool claim_token,
const char *amount,
const char *payment_target,
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 19e59812..3925011a 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -233,7 +233,7 @@ struct TALER_MERCHANTDB_ProductDetails
* Identifies when the product will be restocked. 0 for unknown,
* #GNUNET_TIME_UNIT_FOREVER_ABS for never.
*/
- struct GNUNET_TIME_Absolute next_restock;
+ struct GNUNET_TIME_Timestamp next_restock;
};
@@ -260,7 +260,7 @@ struct TALER_MERCHANTDB_OrderFilter
/**
* Filter orders by date, exact meaning depends on @e delta.
*/
- struct GNUNET_TIME_Absolute date;
+ struct GNUNET_TIME_Timestamp date;
/**
* Filter orders by order serial number, exact meaning depends on @e delta.
@@ -293,7 +293,7 @@ typedef void
(*TALER_MERCHANTDB_OrdersCallback)(void *cls,
const char *order_id,
uint64_t order_serial,
- struct GNUNET_TIME_Absolute timestamp);
+ struct GNUNET_TIME_Timestamp timestamp);
/**
@@ -349,7 +349,7 @@ typedef void
void *cls,
const struct TALER_WireTransferIdentifierRawP *wtid,
const char *exchange_url,
- struct GNUNET_TIME_Absolute execution_time,
+ struct GNUNET_TIME_Timestamp execution_time,
const struct TALER_Amount *deposit_value,
const struct TALER_Amount *deposit_fee,
bool transfer_confirmed);
@@ -372,7 +372,7 @@ typedef void
(*TALER_MERCHANTDB_RefundDetailCallback)(
void *cls,
uint64_t refund_serial,
- struct GNUNET_TIME_Absolute timestamp,
+ struct GNUNET_TIME_Timestamp timestamp,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const char *exchange_url,
uint64_t rtransaction_id,
@@ -400,7 +400,7 @@ typedef void
uint64_t exchange_kyc_serial,
const char *payto_uri,
const char *exchange_url,
- struct GNUNET_TIME_Absolute last_check,
+ struct GNUNET_TIME_Timestamp last_check,
bool kyc_ok);
@@ -493,7 +493,7 @@ typedef void
const char *payto_uri,
const char *exchange_url,
uint64_t transfer_serial_id,
- struct GNUNET_TIME_Absolute execution_time,
+ struct GNUNET_TIME_Timestamp execution_time,
bool verified,
bool confirmed);
@@ -517,8 +517,8 @@ typedef void
(*TALER_MERCHANTDB_ReservesCallback)(
void *cls,
const struct TALER_ReservePublicKeyP *reserve_pub,
- struct GNUNET_TIME_Absolute creation_time,
- struct GNUNET_TIME_Absolute expiration_time,
+ struct GNUNET_TIME_Timestamp creation_time,
+ struct GNUNET_TIME_Timestamp expiration_time,
const struct TALER_Amount *merchant_initial_amount,
const struct TALER_Amount *exchange_initial_amount,
const struct TALER_Amount *pickup_amount,
@@ -609,8 +609,8 @@ typedef void
typedef void
(*TALER_MERCHANTDB_ReserveDetailsCallback)(
void *cls,
- struct GNUNET_TIME_Absolute creation_time,
- struct GNUNET_TIME_Absolute expiration_time,
+ struct GNUNET_TIME_Timestamp creation_time,
+ struct GNUNET_TIME_Timestamp expiration_time,
const struct TALER_Amount *merchant_initial_amount,
const struct TALER_Amount *exchange_initial_amount,
const struct TALER_Amount *picked_up_amount,
@@ -661,8 +661,8 @@ typedef void
const struct TALER_Amount *refund_fee,
const struct TALER_Amount *wire_fee,
const struct TALER_MerchantWireHash *h_wire,
- struct GNUNET_TIME_Absolute deposit_timestamp,
- struct GNUNET_TIME_Absolute refund_deadline,
+ struct GNUNET_TIME_Timestamp deposit_timestamp,
+ struct GNUNET_TIME_Timestamp refund_deadline,
const struct TALER_ExchangeSignatureP *exchange_sig,
const struct TALER_ExchangePublicKeyP *exchange_pub);
@@ -1027,7 +1027,7 @@ struct TALER_MERCHANTDB_Plugin
uint64_t exchange_kyc_serial,
const struct TALER_ExchangeSignatureP *exchange_sig,
const struct TALER_ExchangePublicKeyP *exchange_pub,
- struct GNUNET_TIME_Absolute timestamp,
+ struct GNUNET_TIME_Timestamp timestamp,
bool kyc_ok);
@@ -1136,7 +1136,7 @@ struct TALER_MERCHANTDB_Plugin
const char *product_id,
const struct GNUNET_Uuid *uuid,
uint64_t quantity,
- struct GNUNET_TIME_Absolute expiration_time);
+ struct GNUNET_TIME_Timestamp expiration_time);
/**
@@ -1202,7 +1202,7 @@ struct TALER_MERCHANTDB_Plugin
(*lookup_order_summary)(void *cls,
const char *instance_id,
const char *order_id,
- struct GNUNET_TIME_Absolute *timestamp,
+ struct GNUNET_TIME_Timestamp *timestamp,
uint64_t *order_serial);
@@ -1241,7 +1241,7 @@ struct TALER_MERCHANTDB_Plugin
const char *instance_id,
const char *order_id,
const struct GNUNET_HashCode *h_post_data,
- struct GNUNET_TIME_Absolute pay_deadline,
+ struct GNUNET_TIME_Timestamp pay_deadline,
const struct TALER_ClaimTokenP *claim_token,
const json_t *contract_terms);
@@ -1400,9 +1400,9 @@ struct TALER_MERCHANTDB_Plugin
void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
const struct TALER_ExchangePublicKeyP *exchange_pub,
- struct GNUNET_TIME_Absolute start_date,
- struct GNUNET_TIME_Absolute expire_date,
- struct GNUNET_TIME_Absolute end_date,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp expire_date,
+ struct GNUNET_TIME_Timestamp end_date,
const struct TALER_MasterSignatureP *master_sig);
@@ -1426,7 +1426,7 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*insert_deposit)(void *cls,
const char *instance_id,
- struct GNUNET_TIME_Absolute deposit_timestamp,
+ struct GNUNET_TIME_Timestamp deposit_timestamp,
const struct TALER_PrivateContractHash *h_contract_terms,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const char *exchange_url,
@@ -1495,7 +1495,7 @@ struct TALER_MERCHANTDB_Plugin
(*refund_coin)(void *cls,
const char *instance_id,
const struct TALER_PrivateContractHash *h_contract_terms,
- struct GNUNET_TIME_Absolute refund_timestamp,
+ struct GNUNET_TIME_Timestamp refund_timestamp,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const char *reason);
@@ -1828,11 +1828,11 @@ struct TALER_MERCHANTDB_Plugin
(*lookup_wire_fee)(void *cls,
const struct TALER_MasterPublicKeyP *master_pub,
const char *wire_method,
- struct GNUNET_TIME_Absolute contract_date,
+ struct GNUNET_TIME_Timestamp contract_date,
struct TALER_Amount *wire_fee,
struct TALER_Amount *closing_fee,
- struct GNUNET_TIME_Absolute *start_date,
- struct GNUNET_TIME_Absolute *end_date,
+ struct GNUNET_TIME_Timestamp *start_date,
+ struct GNUNET_TIME_Timestamp *end_date,
struct TALER_MasterSignatureP *master_sig);
@@ -1885,7 +1885,7 @@ struct TALER_MERCHANTDB_Plugin
struct TALER_Amount *total_amount,
struct TALER_Amount *wire_fee,
struct TALER_Amount *exchange_amount,
- struct GNUNET_TIME_Absolute *execution_time,
+ struct GNUNET_TIME_Timestamp *execution_time,
bool *have_exchange_sig,
bool *verified);
@@ -1969,8 +1969,8 @@ struct TALER_MERCHANTDB_Plugin
(*lookup_transfers)(void *cls,
const char *instance_id,
const char *payto_uri,
- struct GNUNET_TIME_Absolute before,
- struct GNUNET_TIME_Absolute after,
+ struct GNUNET_TIME_Timestamp before,
+ struct GNUNET_TIME_Timestamp after,
int64_t limit,
uint64_t offset,
enum TALER_EXCHANGE_YesNoAll yna,
@@ -2000,8 +2000,8 @@ struct TALER_MERCHANTDB_Plugin
const struct GNUNET_HashCode *h_wire_method,
const struct TALER_Amount *wire_fee,
const struct TALER_Amount *closing_fee,
- struct GNUNET_TIME_Absolute start_date,
- struct GNUNET_TIME_Absolute end_date,
+ struct GNUNET_TIME_Timestamp start_date,
+ struct GNUNET_TIME_Timestamp end_date,
const struct TALER_MasterSignatureP *exchange_sig);
@@ -2031,7 +2031,7 @@ struct TALER_MERCHANTDB_Plugin
const char *exchange_url,
const char *payto_uri,
const struct TALER_Amount *initial_balance,
- struct GNUNET_TIME_Absolute expiration);
+ struct GNUNET_TIME_Timestamp expiration);
/**
@@ -2069,7 +2069,7 @@ struct TALER_MERCHANTDB_Plugin
enum GNUNET_DB_QueryStatus
(*lookup_reserves)(void *cls,
const char *instance_id,
- struct GNUNET_TIME_Absolute created_after,
+ struct GNUNET_TIME_Timestamp created_after,
enum TALER_EXCHANGE_YesNoAll active,
enum TALER_EXCHANGE_YesNoAll failures,
TALER_MERCHANTDB_ReservesCallback cb,
@@ -2169,7 +2169,7 @@ struct TALER_MERCHANTDB_Plugin
const char *justification,
const char *next_url,
struct GNUNET_HashCode *tip_id,
- struct GNUNET_TIME_Absolute *expiration);
+ struct GNUNET_TIME_Timestamp *expiration);
/**
@@ -2216,7 +2216,7 @@ struct TALER_MERCHANTDB_Plugin
const struct GNUNET_HashCode *tip_id,
struct TALER_Amount *total_authorized,
struct TALER_Amount *total_picked_up,
- struct GNUNET_TIME_Absolute *expiration,
+ struct GNUNET_TIME_Timestamp *expiration,
char **exchange_url,
struct TALER_ReservePrivateKeyP *reserve_priv);
@@ -2268,7 +2268,7 @@ struct TALER_MERCHANTDB_Plugin
struct TALER_Amount *total_authorized,
struct TALER_Amount *total_picked_up,
char **justification,
- struct GNUNET_TIME_Absolute *expiration,
+ struct GNUNET_TIME_Timestamp *expiration,
struct TALER_ReservePublicKeyP *reserve_pub,
unsigned int *pickups_length,
struct TALER_MERCHANTDB_PickupDetails **pickups);