diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_auditor_service.h | 12 | ||||
-rw-r--r-- | src/include/taler_auditordb_plugin.h | 32 | ||||
-rw-r--r-- | src/include/taler_bank_service.h | 45 | ||||
-rw-r--r-- | src/include/taler_crypto_lib.h | 94 | ||||
-rw-r--r-- | src/include/taler_exchange_service.h | 80 | ||||
-rw-r--r-- | src/include/taler_exchangedb_plugin.h | 156 | ||||
-rw-r--r-- | src/include/taler_json_lib.h | 96 | ||||
-rw-r--r-- | src/include/taler_pq_lib.h | 57 | ||||
-rw-r--r-- | src/include/taler_signatures.h | 66 | ||||
-rw-r--r-- | src/include/taler_sq_lib.h | 53 | ||||
-rw-r--r-- | src/include/taler_testing_lib.h | 57 |
11 files changed, 274 insertions, 474 deletions
diff --git a/src/include/taler_auditor_service.h b/src/include/taler_auditor_service.h index bc990a143..f71520345 100644 --- a/src/include/taler_auditor_service.h +++ b/src/include/taler_auditor_service.h @@ -259,18 +259,18 @@ TALER_AUDITOR_deposit_confirmation ( const struct TALER_MerchantWireHash *h_wire, const struct TALER_ExtensionContractHash *h_extensions, const struct TALER_PrivateContractHash *h_contract_terms, - struct GNUNET_TIME_Absolute timestamp, - struct GNUNET_TIME_Absolute wire_deadline, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp timestamp, + struct GNUNET_TIME_Timestamp wire_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, const struct TALER_Amount *amount_without_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant_pub, const struct TALER_ExchangePublicKeyP *exchange_pub, const struct TALER_ExchangeSignatureP *exchange_sig, const struct TALER_MasterPublicKeyP *master_pub, - struct GNUNET_TIME_Absolute ep_start, - struct GNUNET_TIME_Absolute ep_expire, - struct GNUNET_TIME_Absolute ep_end, + struct GNUNET_TIME_Timestamp ep_start, + struct GNUNET_TIME_Timestamp ep_expire, + struct GNUNET_TIME_Timestamp ep_end, const struct TALER_MasterSignatureP *master_sig, TALER_AUDITOR_DepositConfirmationResultCallback cb, void *cb_cls); diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h index 7756db2bc..e4ff8e8e2 100644 --- a/src/include/taler_auditordb_plugin.h +++ b/src/include/taler_auditordb_plugin.h @@ -63,7 +63,7 @@ typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)( void *cls, const struct TALER_DenominationHash *denom_pub_hash, - struct GNUNET_TIME_Absolute revenue_timestamp, + struct GNUNET_TIME_Timestamp revenue_timestamp, const struct TALER_Amount *revenue_balance, const struct TALER_Amount *loss_balance); @@ -84,8 +84,8 @@ typedef enum GNUNET_GenericReturnValue typedef enum GNUNET_GenericReturnValue (*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)( void *cls, - struct GNUNET_TIME_Absolute start_time, - struct GNUNET_TIME_Absolute end_time, + struct GNUNET_TIME_Timestamp start_time, + struct GNUNET_TIME_Timestamp end_time, const struct TALER_Amount *reserve_profits); @@ -100,7 +100,7 @@ struct TALER_AUDITORDB_WireProgressPoint * Time until which we have confirmed that all wire transactions * that the exchange should do, have indeed been done. */ - struct GNUNET_TIME_Absolute last_timestamp; + struct GNUNET_TIME_Timestamp last_timestamp; /** * reserves_close uuid until which we have checked @@ -240,17 +240,17 @@ struct TALER_AUDITORDB_ExchangeSigningKey /** * When does @e exchange_pub start to be used? */ - struct GNUNET_TIME_Absolute ep_start; + struct GNUNET_TIME_Timestamp ep_start; /** * When will the exchange stop signing with @e exchange_pub? */ - struct GNUNET_TIME_Absolute ep_expire; + struct GNUNET_TIME_Timestamp ep_expire; /** * When does the signing key expire (for legal disputes)? */ - struct GNUNET_TIME_Absolute ep_end; + struct GNUNET_TIME_Timestamp ep_end; /** * What is the public offline signing key this is all about? @@ -289,7 +289,7 @@ struct TALER_AUDITORDB_DepositConfirmation /** * Time when this deposit confirmation was generated by the exchange. */ - struct GNUNET_TIME_Absolute exchange_timestamp; + struct GNUNET_TIME_Timestamp exchange_timestamp; /** * How much time does the @e merchant have to issue a refund @@ -298,12 +298,12 @@ struct TALER_AUDITORDB_DepositConfirmation * performed by the exchange until the refund deadline. This value * is taken from the original deposit request. */ - struct GNUNET_TIME_Absolute refund_deadline; + struct GNUNET_TIME_Timestamp refund_deadline; /** * How much time does the @e exchange have to wire the funds? */ - struct GNUNET_TIME_Absolute wire_deadline; + struct GNUNET_TIME_Timestamp wire_deadline; /** * Amount to be deposited, excluding fee. Calculated from the @@ -872,7 +872,7 @@ struct TALER_AUDITORDB_Plugin const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_Amount *reserve_balance, const struct TALER_Amount *withdraw_fee_balance, - struct GNUNET_TIME_Absolute expiration_date, + struct GNUNET_TIME_Timestamp expiration_date, const char *origin_account); @@ -895,7 +895,7 @@ struct TALER_AUDITORDB_Plugin const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_Amount *reserve_balance, const struct TALER_Amount *withdraw_fee_balance, - struct GNUNET_TIME_Absolute expiration_date); + struct GNUNET_TIME_Timestamp expiration_date); /** @@ -919,7 +919,7 @@ struct TALER_AUDITORDB_Plugin uint64_t *rowid, struct TALER_Amount *reserve_balance, struct TALER_Amount *withdraw_fee_balance, - struct GNUNET_TIME_Absolute *expiration_date, + struct GNUNET_TIME_Timestamp *expiration_date, char **sender_account); @@ -1220,7 +1220,7 @@ struct TALER_AUDITORDB_Plugin void *cls, const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_DenominationHash *denom_pub_hash, - struct GNUNET_TIME_Absolute revenue_timestamp, + struct GNUNET_TIME_Timestamp revenue_timestamp, const struct TALER_Amount *revenue_balance, const struct TALER_Amount *recoup_loss_balance); @@ -1257,8 +1257,8 @@ struct TALER_AUDITORDB_Plugin (*insert_historic_reserve_revenue)( void *cls, const struct TALER_MasterPublicKeyP *master_pub, - struct GNUNET_TIME_Absolute start_time, - struct GNUNET_TIME_Absolute end_time, + struct GNUNET_TIME_Timestamp start_time, + struct GNUNET_TIME_Timestamp end_time, const struct TALER_Amount *reserve_profits); diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h index db78ca6a8..bb7f3d33b 100644 --- a/src/include/taler_bank_service.h +++ b/src/include/taler_bank_service.h @@ -112,12 +112,13 @@ struct TALER_BANK_AdminAddIncomingHandle; * @param json detailed response from the HTTPD, or NULL if reply was not in JSON */ typedef void -(*TALER_BANK_AdminAddIncomingCallback) (void *cls, - unsigned int http_status, - enum TALER_ErrorCode ec, - uint64_t serial_id, - struct GNUNET_TIME_Absolute timestamp, - const json_t *json); +(*TALER_BANK_AdminAddIncomingCallback) ( + void *cls, + unsigned int http_status, + enum TALER_ErrorCode ec, + uint64_t serial_id, + struct GNUNET_TIME_Timestamp timestamp, + const json_t *json); /** @@ -199,11 +200,12 @@ struct TALER_BANK_TransferHandle; * @param timestamp when did the transaction go into effect */ typedef void -(*TALER_BANK_TransferCallback)(void *cls, - unsigned int response_code, - enum TALER_ErrorCode ec, - uint64_t row_id, - struct GNUNET_TIME_Absolute timestamp); +(*TALER_BANK_TransferCallback)( + void *cls, + unsigned int response_code, + enum TALER_ErrorCode ec, + uint64_t row_id, + struct GNUNET_TIME_Timestamp timestamp); /** @@ -266,7 +268,7 @@ struct TALER_BANK_CreditDetails /** * Time of the the transfer */ - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; /** * Reserve public key encoded in the wire @@ -332,13 +334,14 @@ typedef enum GNUNET_GenericReturnValue * In this case, the callback is not called. */ struct TALER_BANK_CreditHistoryHandle * -TALER_BANK_credit_history (struct GNUNET_CURL_Context *ctx, - const struct TALER_BANK_AuthenticationData *auth, - uint64_t start_row, - int64_t num_results, - struct GNUNET_TIME_Relative timeout, - TALER_BANK_CreditHistoryCallback hres_cb, - void *hres_cb_cls); +TALER_BANK_credit_history ( + struct GNUNET_CURL_Context *ctx, + const struct TALER_BANK_AuthenticationData *auth, + uint64_t start_row, + int64_t num_results, + struct GNUNET_TIME_Relative timeout, + TALER_BANK_CreditHistoryCallback hres_cb, + void *hres_cb_cls); /** @@ -374,7 +377,7 @@ struct TALER_BANK_DebitDetails /** * Time of the the transfer */ - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; /** * Wire transfer identifier used by the exchange. @@ -477,7 +480,7 @@ TALER_BANK_debit_history_cancel (struct TALER_BANK_DebitHistoryHandle *hh); * @param[out] auth set to the configuration data found * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, struct TALER_BANK_AuthenticationData *auth); diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h index ea53efb66..0a59ab9e3 100644 --- a/src/include/taler_crypto_lib.h +++ b/src/include/taler_crypto_lib.h @@ -1367,7 +1367,7 @@ typedef void (*TALER_CRYPTO_RsaDenominationKeyStatusCallback)( void *cls, const char *section_name, - struct GNUNET_TIME_Absolute start_time, + struct GNUNET_TIME_Timestamp start_time, struct GNUNET_TIME_Relative validity_duration, const struct TALER_RsaPubHashP *h_rsa, const struct TALER_DenominationPublicKey *denom_pub, @@ -1484,7 +1484,7 @@ struct TALER_CRYPTO_ExchangeSignHelper; typedef void (*TALER_CRYPTO_ExchangeKeyStatusCallback)( void *cls, - struct GNUNET_TIME_Absolute start_time, + struct GNUNET_TIME_Timestamp start_time, struct GNUNET_TIME_Relative validity_duration, const struct TALER_ExchangePublicKeyP *exchange_pub, const struct TALER_SecurityModulePublicKeyP *sm_pub, @@ -1625,9 +1625,9 @@ TALER_exchange_deposit_confirm_verify ( const struct TALER_PrivateContractHash *h_contract_terms, const struct TALER_MerchantWireHash *h_wire, const struct TALER_ExtensionContractHash *h_extensions, - struct GNUNET_TIME_Absolute exchange_timestamp, - struct GNUNET_TIME_Absolute wire_deadline, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp exchange_timestamp, + struct GNUNET_TIME_Timestamp wire_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, const struct TALER_Amount *amount_without_fee, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant_pub, @@ -1661,9 +1661,9 @@ TALER_wallet_deposit_sign ( const struct TALER_PrivateContractHash *h_contract_terms, const struct TALER_ExtensionContractHash *h_extensions, const struct TALER_DenominationHash *h_denom_pub, - struct GNUNET_TIME_Absolute wallet_timestamp, + struct GNUNET_TIME_Timestamp wallet_timestamp, const struct TALER_MerchantPublicKeyP *merchant_pub, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, const struct TALER_CoinSpendPrivateKeyP *coin_priv, struct TALER_CoinSpendSignatureP *coin_sig); @@ -1692,9 +1692,9 @@ TALER_wallet_deposit_verify ( const struct TALER_PrivateContractHash *h_contract_terms, const struct TALER_ExtensionContractHash *h_extensions, const struct TALER_DenominationHash *h_denom_pub, - struct GNUNET_TIME_Absolute wallet_timestamp, + struct GNUNET_TIME_Timestamp wallet_timestamp, const struct TALER_MerchantPublicKeyP *merchant_pub, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_CoinSpendSignatureP *coin_sig); @@ -1754,7 +1754,7 @@ void TALER_exchange_offline_auditor_add_sign ( const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, - struct GNUNET_TIME_Absolute start_date, + struct GNUNET_TIME_Timestamp start_date, const struct TALER_MasterPrivateKeyP *master_priv, struct TALER_MasterSignatureP *master_sig); @@ -1773,7 +1773,7 @@ enum GNUNET_GenericReturnValue TALER_exchange_offline_auditor_add_verify ( const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, - struct GNUNET_TIME_Absolute start_date, + struct GNUNET_TIME_Timestamp start_date, const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_MasterSignatureP *master_sig); @@ -1789,7 +1789,7 @@ TALER_exchange_offline_auditor_add_verify ( void TALER_exchange_offline_auditor_del_sign ( const struct TALER_AuditorPublicKeyP *auditor_pub, - struct GNUNET_TIME_Absolute end_date, + struct GNUNET_TIME_Timestamp end_date, const struct TALER_MasterPrivateKeyP *master_priv, struct TALER_MasterSignatureP *master_sig); @@ -1806,7 +1806,7 @@ TALER_exchange_offline_auditor_del_sign ( enum GNUNET_GenericReturnValue TALER_exchange_offline_auditor_del_verify ( const struct TALER_AuditorPublicKeyP *auditor_pub, - struct GNUNET_TIME_Absolute end_date, + struct GNUNET_TIME_Timestamp end_date, const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_MasterSignatureP *master_sig); @@ -1882,9 +1882,9 @@ TALER_exchange_offline_signkey_revoke_verify ( void TALER_exchange_offline_signkey_validity_sign ( const struct TALER_ExchangePublicKeyP *exchange_pub, - struct GNUNET_TIME_Absolute start_sign, - struct GNUNET_TIME_Absolute end_sign, - struct GNUNET_TIME_Absolute end_legal, + struct GNUNET_TIME_Timestamp start_sign, + struct GNUNET_TIME_Timestamp end_sign, + struct GNUNET_TIME_Timestamp end_legal, const struct TALER_MasterPrivateKeyP *master_priv, struct TALER_MasterSignatureP *master_sig); @@ -1903,9 +1903,9 @@ TALER_exchange_offline_signkey_validity_sign ( enum GNUNET_GenericReturnValue TALER_exchange_offline_signkey_validity_verify ( const struct TALER_ExchangePublicKeyP *exchange_pub, - struct GNUNET_TIME_Absolute start_sign, - struct GNUNET_TIME_Absolute end_sign, - struct GNUNET_TIME_Absolute end_legal, + struct GNUNET_TIME_Timestamp start_sign, + struct GNUNET_TIME_Timestamp end_sign, + struct GNUNET_TIME_Timestamp end_legal, const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_MasterSignatureP *master_sig); @@ -1929,10 +1929,10 @@ TALER_exchange_offline_signkey_validity_verify ( void TALER_exchange_offline_denom_validity_sign ( const struct TALER_DenominationHash *h_denom_pub, - struct GNUNET_TIME_Absolute stamp_start, - struct GNUNET_TIME_Absolute stamp_expire_withdraw, - struct GNUNET_TIME_Absolute stamp_expire_deposit, - struct GNUNET_TIME_Absolute stamp_expire_legal, + struct GNUNET_TIME_Timestamp stamp_start, + struct GNUNET_TIME_Timestamp stamp_expire_withdraw, + struct GNUNET_TIME_Timestamp stamp_expire_deposit, + struct GNUNET_TIME_Timestamp stamp_expire_legal, const struct TALER_Amount *coin_value, const struct TALER_Amount *fee_withdraw, const struct TALER_Amount *fee_deposit, @@ -1962,10 +1962,10 @@ TALER_exchange_offline_denom_validity_sign ( enum GNUNET_GenericReturnValue TALER_exchange_offline_denom_validity_verify ( const struct TALER_DenominationHash *h_denom_pub, - struct GNUNET_TIME_Absolute stamp_start, - struct GNUNET_TIME_Absolute stamp_expire_withdraw, - struct GNUNET_TIME_Absolute stamp_expire_deposit, - struct GNUNET_TIME_Absolute stamp_expire_legal, + struct GNUNET_TIME_Timestamp stamp_start, + struct GNUNET_TIME_Timestamp stamp_expire_withdraw, + struct GNUNET_TIME_Timestamp stamp_expire_deposit, + struct GNUNET_TIME_Timestamp stamp_expire_legal, const struct TALER_Amount *coin_value, const struct TALER_Amount *fee_withdraw, const struct TALER_Amount *fee_deposit, @@ -1987,7 +1987,7 @@ TALER_exchange_offline_denom_validity_verify ( void TALER_exchange_secmod_eddsa_sign ( const struct TALER_ExchangePublicKeyP *exchange_pub, - struct GNUNET_TIME_Absolute start_sign, + struct GNUNET_TIME_Timestamp start_sign, struct GNUNET_TIME_Relative duration, const struct TALER_SecurityModulePrivateKeyP *secm_priv, struct TALER_SecurityModuleSignatureP *secm_sig); @@ -2006,7 +2006,7 @@ TALER_exchange_secmod_eddsa_sign ( enum GNUNET_GenericReturnValue TALER_exchange_secmod_eddsa_verify ( const struct TALER_ExchangePublicKeyP *exchange_pub, - struct GNUNET_TIME_Absolute start_sign, + struct GNUNET_TIME_Timestamp start_sign, struct GNUNET_TIME_Relative duration, const struct TALER_SecurityModulePublicKeyP *secm_pub, const struct TALER_SecurityModuleSignatureP *secm_sig); @@ -2026,7 +2026,7 @@ void TALER_exchange_secmod_rsa_sign ( const struct TALER_RsaPubHashP *h_rsa, const char *section_name, - struct GNUNET_TIME_Absolute start_sign, + struct GNUNET_TIME_Timestamp start_sign, struct GNUNET_TIME_Relative duration, const struct TALER_SecurityModulePrivateKeyP *secm_priv, struct TALER_SecurityModuleSignatureP *secm_sig); @@ -2047,7 +2047,7 @@ enum GNUNET_GenericReturnValue TALER_exchange_secmod_rsa_verify ( const struct TALER_RsaPubHashP *h_rsa, const char *section_name, - struct GNUNET_TIME_Absolute start_sign, + struct GNUNET_TIME_Timestamp start_sign, struct GNUNET_TIME_Relative duration, const struct TALER_SecurityModulePublicKeyP *secm_pub, const struct TALER_SecurityModuleSignatureP *secm_sig); @@ -2076,10 +2076,10 @@ TALER_auditor_denom_validity_sign ( const char *auditor_url, const struct TALER_DenominationHash *h_denom_pub, const struct TALER_MasterPublicKeyP *master_pub, - struct GNUNET_TIME_Absolute stamp_start, - struct GNUNET_TIME_Absolute stamp_expire_withdraw, - struct GNUNET_TIME_Absolute stamp_expire_deposit, - struct GNUNET_TIME_Absolute stamp_expire_legal, + struct GNUNET_TIME_Timestamp stamp_start, + struct GNUNET_TIME_Timestamp stamp_expire_withdraw, + struct GNUNET_TIME_Timestamp stamp_expire_deposit, + struct GNUNET_TIME_Timestamp stamp_expire_legal, const struct TALER_Amount *coin_value, const struct TALER_Amount *fee_withdraw, const struct TALER_Amount *fee_deposit, @@ -2113,10 +2113,10 @@ TALER_auditor_denom_validity_verify ( const char *auditor_url, const struct TALER_DenominationHash *h_denom_pub, const struct TALER_MasterPublicKeyP *master_pub, - struct GNUNET_TIME_Absolute stamp_start, - struct GNUNET_TIME_Absolute stamp_expire_withdraw, - struct GNUNET_TIME_Absolute stamp_expire_deposit, - struct GNUNET_TIME_Absolute stamp_expire_legal, + struct GNUNET_TIME_Timestamp stamp_start, + struct GNUNET_TIME_Timestamp stamp_expire_withdraw, + struct GNUNET_TIME_Timestamp stamp_expire_deposit, + struct GNUNET_TIME_Timestamp stamp_expire_legal, const struct TALER_Amount *coin_value, const struct TALER_Amount *fee_withdraw, const struct TALER_Amount *fee_deposit, @@ -2143,8 +2143,8 @@ TALER_auditor_denom_validity_verify ( void TALER_exchange_offline_wire_fee_sign ( const char *payment_method, - struct GNUNET_TIME_Absolute start_time, - struct GNUNET_TIME_Absolute end_time, + struct GNUNET_TIME_Timestamp start_time, + struct GNUNET_TIME_Timestamp end_time, const struct TALER_Amount *wire_fee, const struct TALER_Amount *closing_fee, const struct TALER_MasterPrivateKeyP *master_priv, @@ -2166,8 +2166,8 @@ TALER_exchange_offline_wire_fee_sign ( enum GNUNET_GenericReturnValue TALER_exchange_offline_wire_fee_verify ( const char *payment_method, - struct GNUNET_TIME_Absolute start_time, - struct GNUNET_TIME_Absolute end_time, + struct GNUNET_TIME_Timestamp start_time, + struct GNUNET_TIME_Timestamp end_time, const struct TALER_Amount *wire_fee, const struct TALER_Amount *closing_fee, const struct TALER_MasterPublicKeyP *master_pub, @@ -2185,7 +2185,7 @@ TALER_exchange_offline_wire_fee_verify ( void TALER_exchange_offline_wire_add_sign ( const char *payto_uri, - struct GNUNET_TIME_Absolute now, + struct GNUNET_TIME_Timestamp now, const struct TALER_MasterPrivateKeyP *master_priv, struct TALER_MasterSignatureP *master_sig); @@ -2202,7 +2202,7 @@ TALER_exchange_offline_wire_add_sign ( enum GNUNET_GenericReturnValue TALER_exchange_offline_wire_add_verify ( const char *payto_uri, - struct GNUNET_TIME_Absolute sign_time, + struct GNUNET_TIME_Timestamp sign_time, const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_MasterSignatureP *master_sig); @@ -2218,7 +2218,7 @@ TALER_exchange_offline_wire_add_verify ( void TALER_exchange_offline_wire_del_sign ( const char *payto_uri, - struct GNUNET_TIME_Absolute now, + struct GNUNET_TIME_Timestamp now, const struct TALER_MasterPrivateKeyP *master_priv, struct TALER_MasterSignatureP *master_sig); @@ -2235,7 +2235,7 @@ TALER_exchange_offline_wire_del_sign ( enum GNUNET_GenericReturnValue TALER_exchange_offline_wire_del_verify ( const char *payto_uri, - struct GNUNET_TIME_Absolute sign_time, + struct GNUNET_TIME_Timestamp sign_time, const struct TALER_MasterPublicKeyP *master_pub, const struct TALER_MasterSignatureP *master_sig); diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 09c50b17e..60a471ab6 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -70,17 +70,17 @@ struct TALER_EXCHANGE_SigningPublicKey /** * Validity start time */ - struct GNUNET_TIME_Absolute valid_from; + struct GNUNET_TIME_Timestamp valid_from; /** * Validity expiration time (how long the exchange may use it). */ - struct GNUNET_TIME_Absolute valid_until; + struct GNUNET_TIME_Timestamp valid_until; /** * Validity expiration time for legal disputes. */ - struct GNUNET_TIME_Absolute valid_legal; + struct GNUNET_TIME_Timestamp valid_legal; }; @@ -107,18 +107,18 @@ struct TALER_EXCHANGE_DenomPublicKey /** * Timestamp indicating when the denomination key becomes valid */ - struct GNUNET_TIME_Absolute valid_from; + struct GNUNET_TIME_Timestamp valid_from; /** * Timestamp indicating when the denomination key can’t be used anymore to * withdraw new coins. */ - struct GNUNET_TIME_Absolute withdraw_valid_until; + struct GNUNET_TIME_Timestamp withdraw_valid_until; /** * Timestamp indicating when coins of this denomination become invalid. */ - struct GNUNET_TIME_Absolute expire_deposit; + struct GNUNET_TIME_Timestamp expire_deposit; /** * When do signatures with this denomination key become invalid? @@ -127,7 +127,7 @@ struct TALER_EXCHANGE_DenomPublicKey * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_deposit (by a year or more). */ - struct GNUNET_TIME_Absolute expire_legal; + struct GNUNET_TIME_Timestamp expire_legal; /** * The value of this denomination @@ -273,14 +273,14 @@ struct TALER_EXCHANGE_Keys /** * Timestamp indicating the /keys generation. */ - struct GNUNET_TIME_Absolute list_issue_date; + struct GNUNET_TIME_Timestamp list_issue_date; /** * Timestamp indicating the creation time of the last * denomination key in /keys. * Used to fetch /keys incrementally. */ - struct GNUNET_TIME_Absolute last_denom_issue_date; + struct GNUNET_TIME_Timestamp last_denom_issue_date; /** * Length of the @e sign_keys array (number of valid entries). @@ -491,7 +491,7 @@ TALER_EXCHANGE_get_keys (struct TALER_EXCHANGE_Handle *exchange); */ void TALER_EXCHANGE_set_last_denom (struct TALER_EXCHANGE_Handle *exchange, - struct GNUNET_TIME_Absolute last_denom_new); + struct GNUNET_TIME_Timestamp last_denom_new); /** @@ -535,7 +535,7 @@ enum TALER_EXCHANGE_CheckKeysFlags * @param flags options controlling when to download what * @return until when the existing response is current, 0 if we are re-downloading now */ -struct GNUNET_TIME_Absolute +struct GNUNET_TIME_Timestamp TALER_EXCHANGE_check_keys_current (struct TALER_EXCHANGE_Handle *exchange, enum TALER_EXCHANGE_CheckKeysFlags flags); @@ -663,12 +663,12 @@ struct TALER_EXCHANGE_WireAggregateFees /** * Time when this fee goes into effect (inclusive) */ - struct GNUNET_TIME_Absolute start_date; + struct GNUNET_TIME_Timestamp start_date; /** * Time when this fee stops being in effect (exclusive). */ - struct GNUNET_TIME_Absolute end_date; + struct GNUNET_TIME_Timestamp end_date; /** * Signature affirming the above fee structure. @@ -789,9 +789,9 @@ TALER_EXCHANGE_deposit_permission_sign ( const struct TALER_ExtensionContractHash *h_extensions, const struct TALER_DenominationHash *h_denom_pub, const struct TALER_CoinSpendPrivateKeyP *coin_priv, - struct GNUNET_TIME_Absolute wallet_timestamp, + struct GNUNET_TIME_Timestamp wallet_timestamp, const struct TALER_MerchantPublicKeyP *merchant_pub, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, struct TALER_CoinSpendSignatureP *coin_sig); @@ -824,7 +824,7 @@ struct TALER_EXCHANGE_DepositResult /** * Time when the exchange generated the deposit confirmation */ - struct GNUNET_TIME_Absolute deposit_timestamp; + struct GNUNET_TIME_Timestamp deposit_timestamp; /** * signature provided by the exchange @@ -910,7 +910,7 @@ struct TALER_EXCHANGE_DepositHandle * TALER_EXCHANGE_deposit ( struct TALER_EXCHANGE_Handle *exchange, const struct TALER_Amount *amount, - struct GNUNET_TIME_Absolute wire_deadline, + struct GNUNET_TIME_Timestamp wire_deadline, const char *merchant_payto_uri, const struct TALER_WireSalt *wire_salt, const struct TALER_PrivateContractHash *h_contract_terms, @@ -918,9 +918,9 @@ TALER_EXCHANGE_deposit ( const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_DenominationSignature *denom_sig, const struct TALER_DenominationPublicKey *denom_pub, - struct GNUNET_TIME_Absolute timestamp, + struct GNUNET_TIME_Timestamp timestamp, const struct TALER_MerchantPublicKeyP *merchant_pub, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, const struct TALER_CoinSpendSignatureP *coin_sig, TALER_EXCHANGE_DepositResultCallback cb, void *cb_cls, @@ -1102,7 +1102,7 @@ struct TALER_EXCHANGE_ReserveHistory /** * When did the wire transfer happen? */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; } in_details; @@ -1149,7 +1149,7 @@ struct TALER_EXCHANGE_ReserveHistory /** * When did the /recoup operation happen? */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; } recoup_details; @@ -1183,7 +1183,7 @@ struct TALER_EXCHANGE_ReserveHistory /** * When did the wire transfer happen? */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; /** * Fee that was charged for the closing. @@ -1716,7 +1716,7 @@ struct TALER_EXCHANGE_TransferData /** * time when the exchange claims to have performed the wire transfer */ - struct GNUNET_TIME_Absolute execution_time; + struct GNUNET_TIME_Timestamp execution_time; /** * Actual amount of the wire transfer, excluding the wire fee. @@ -1837,7 +1837,7 @@ struct TALER_EXCHANGE_GetDepositResponse /** * actual execution time for the wire transfer */ - struct GNUNET_TIME_Absolute execution_time; + struct GNUNET_TIME_Timestamp execution_time; /** * contribution to the total amount by this coin, all zeros if exchange did not @@ -1861,7 +1861,7 @@ struct TALER_EXCHANGE_GetDepositResponse /** * planned execution time for the wire transfer */ - struct GNUNET_TIME_Absolute execution_time; + struct GNUNET_TIME_Timestamp execution_time; /** * Payment target that the merchant should use @@ -2029,6 +2029,7 @@ typedef void * @param pk kind of coin to pay back * @param denom_sig signature over the coin by the exchange using @a pk * @param ps secret internals of the original planchet + * @param amount value remaining on the coin that is being recouped * @param was_refreshed true if the coin in @a ps was refreshed * @param recoup_cb the callback to call when the final result for this request is available * @param recoup_cb_cls closure for @a recoup_cb @@ -2041,6 +2042,7 @@ TALER_EXCHANGE_recoup (struct TALER_EXCHANGE_Handle *exchange, const struct TALER_EXCHANGE_DenomPublicKey *pk, const struct TALER_DenominationSignature *denom_sig, const struct TALER_PlanchetSecretsP *ps, + const struct TALER_Amount *amount, bool was_refreshed, TALER_EXCHANGE_RecoupResultCallback recoup_cb, void *recoup_cb_cls); @@ -2091,7 +2093,7 @@ struct TALER_EXCHANGE_KycStatus /** * Time of the affirmation. */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; /** * The signing public key used for @e exchange_sig. @@ -2327,17 +2329,17 @@ struct TALER_EXCHANGE_FutureSigningPublicKey /** * Validity start time */ - struct GNUNET_TIME_Absolute valid_from; + struct GNUNET_TIME_Timestamp valid_from; /** * Validity expiration time (how long the exchange may use it). */ - struct GNUNET_TIME_Absolute valid_until; + struct GNUNET_TIME_Timestamp valid_until; /** * Validity expiration time for legal disputes. */ - struct GNUNET_TIME_Absolute valid_legal; + struct GNUNET_TIME_Timestamp valid_legal; }; @@ -2359,18 +2361,18 @@ struct TALER_EXCHANGE_FutureDenomPublicKey /** * Timestamp indicating when the denomination key becomes valid */ - struct GNUNET_TIME_Absolute valid_from; + struct GNUNET_TIME_Timestamp valid_from; /** * Timestamp indicating when the denomination key can’t be used anymore to * withdraw new coins. */ - struct GNUNET_TIME_Absolute withdraw_valid_until; + struct GNUNET_TIME_Timestamp withdraw_valid_until; /** * Timestamp indicating when coins of this denomination become invalid. */ - struct GNUNET_TIME_Absolute expire_deposit; + struct GNUNET_TIME_Timestamp expire_deposit; /** * When do signatures with this denomination key become invalid? @@ -2379,7 +2381,7 @@ struct TALER_EXCHANGE_FutureDenomPublicKey * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_deposit (by a year or more). */ - struct GNUNET_TIME_Absolute expire_legal; + struct GNUNET_TIME_Timestamp expire_legal; /** * The value of this denomination @@ -2750,7 +2752,7 @@ TALER_EXCHANGE_management_enable_auditor ( const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, const char *auditor_name, - struct GNUNET_TIME_Absolute validity_start, + struct GNUNET_TIME_Timestamp validity_start, const struct TALER_MasterSignatureP *master_sig, TALER_EXCHANGE_ManagementAuditorEnableCallback cb, void *cb_cls); @@ -2801,7 +2803,7 @@ TALER_EXCHANGE_management_disable_auditor ( struct GNUNET_CURL_Context *ctx, const char *url, const struct TALER_AuditorPublicKeyP *auditor_pub, - struct GNUNET_TIME_Absolute validity_end, + struct GNUNET_TIME_Timestamp validity_end, const struct TALER_MasterSignatureP *master_sig, TALER_EXCHANGE_ManagementAuditorDisableCallback cb, void *cb_cls); @@ -2855,7 +2857,7 @@ TALER_EXCHANGE_management_enable_wire ( struct GNUNET_CURL_Context *ctx, const char *url, const char *payto_uri, - struct GNUNET_TIME_Absolute validity_start, + struct GNUNET_TIME_Timestamp validity_start, const struct TALER_MasterSignatureP *master_sig1, const struct TALER_MasterSignatureP *master_sig2, TALER_EXCHANGE_ManagementWireEnableCallback cb, @@ -2908,7 +2910,7 @@ TALER_EXCHANGE_management_disable_wire ( struct GNUNET_CURL_Context *ctx, const char *url, const char *payto_uri, - struct GNUNET_TIME_Absolute validity_end, + struct GNUNET_TIME_Timestamp validity_end, const struct TALER_MasterSignatureP *master_sig, TALER_EXCHANGE_ManagementWireDisableCallback cb, void *cb_cls); @@ -2963,8 +2965,8 @@ TALER_EXCHANGE_management_set_wire_fees ( struct GNUNET_CURL_Context *ctx, const char *exchange_base_url, const char *wire_method, - struct GNUNET_TIME_Absolute validity_start, - struct GNUNET_TIME_Absolute validity_end, + struct GNUNET_TIME_Timestamp validity_start, + struct GNUNET_TIME_Timestamp validity_end, const struct TALER_Amount *wire_fee, const struct TALER_Amount *closing_fee, const struct TALER_MasterSignatureP *master_sig, diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 56a16dd72..ad840fc92 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -117,12 +117,12 @@ struct TALER_EXCHANGEDB_SignkeyMetaData /** * Start time of the validity period for this key. */ - struct GNUNET_TIME_Absolute start; + struct GNUNET_TIME_Timestamp start; /** * The exchange will sign messages with this key between @e start and this time. */ - struct GNUNET_TIME_Absolute expire_sign; + struct GNUNET_TIME_Timestamp expire_sign; /** * When do signatures with this sign key become invalid? @@ -131,7 +131,7 @@ struct TALER_EXCHANGEDB_SignkeyMetaData * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_sign (by a year or more). */ - struct GNUNET_TIME_Absolute expire_legal; + struct GNUNET_TIME_Timestamp expire_legal; }; @@ -197,10 +197,10 @@ struct TALER_EXCHANGEDB_TableData uint32_t age_restrictions; struct TALER_DenominationPublicKey denom_pub; struct TALER_MasterSignatureP master_sig; - struct GNUNET_TIME_Absolute valid_from; - struct GNUNET_TIME_Absolute expire_withdraw; - struct GNUNET_TIME_Absolute expire_deposit; - struct GNUNET_TIME_Absolute expire_legal; + struct GNUNET_TIME_Timestamp valid_from; + struct GNUNET_TIME_Timestamp expire_withdraw; + struct GNUNET_TIME_Timestamp expire_deposit; + struct GNUNET_TIME_Timestamp expire_legal; struct TALER_Amount coin; struct TALER_Amount fee_withdraw; struct TALER_Amount fee_deposit; @@ -228,8 +228,8 @@ struct TALER_EXCHANGEDB_TableData * Note: not useful for auditor, because not UPDATEd! */ struct TALER_Amount current_balance; - struct GNUNET_TIME_Absolute expiration_date; - struct GNUNET_TIME_Absolute gc_date; + struct GNUNET_TIME_Timestamp expiration_date; + struct GNUNET_TIME_Timestamp gc_date; } reserves; struct @@ -238,14 +238,14 @@ struct TALER_EXCHANGEDB_TableData struct TALER_Amount credit; uint64_t sender_account; char *exchange_account_section; - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; uint64_t reserve_uuid; } reserves_in; struct { uint64_t reserve_uuid; - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; struct TALER_WireTransferIdentifierRawP wtid; uint64_t wire_target_serial_id; struct TALER_Amount amount; @@ -259,7 +259,7 @@ struct TALER_EXCHANGEDB_TableData struct TALER_BlindedDenominationSignature denom_sig; uint64_t reserve_uuid; struct TALER_ReserveSignatureP reserve_sig; - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; struct TALER_Amount amount_with_fee; } reserves_out; @@ -269,7 +269,7 @@ struct TALER_EXCHANGEDB_TableData char *auditor_url; char *auditor_name; bool is_active; - struct GNUNET_TIME_Absolute last_change; + struct GNUNET_TIME_Timestamp last_change; } auditors; struct @@ -333,10 +333,10 @@ struct TALER_EXCHANGEDB_TableData uint64_t shard; uint64_t known_coin_id; struct TALER_Amount amount_with_fee; - struct GNUNET_TIME_Absolute wallet_timestamp; - struct GNUNET_TIME_Absolute exchange_timestamp; - struct GNUNET_TIME_Absolute refund_deadline; - struct GNUNET_TIME_Absolute wire_deadline; + struct GNUNET_TIME_Timestamp wallet_timestamp; + struct GNUNET_TIME_Timestamp exchange_timestamp; + struct GNUNET_TIME_Timestamp refund_deadline; + struct GNUNET_TIME_Timestamp wire_deadline; struct TALER_MerchantPublicKeyP merchant_pub; struct TALER_PrivateContractHash h_contract_terms; struct TALER_CoinSpendSignatureP coin_sig; @@ -358,7 +358,7 @@ struct TALER_EXCHANGEDB_TableData struct { - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; struct TALER_WireTransferIdentifierRawP wtid_raw; uint64_t wire_target_serial_id; char *exchange_account_section; @@ -374,8 +374,8 @@ struct TALER_EXCHANGEDB_TableData struct { char *wire_method; - 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_Amount wire_fee; struct TALER_Amount closing_fee; struct TALER_MasterSignatureP master_sig; @@ -387,7 +387,7 @@ struct TALER_EXCHANGEDB_TableData struct TALER_CoinSpendSignatureP coin_sig; union TALER_DenominationBlindingKeyP coin_blind; struct TALER_Amount amount; - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; uint64_t reserve_out_serial_id; } recoup; @@ -397,7 +397,7 @@ struct TALER_EXCHANGEDB_TableData struct TALER_CoinSpendSignatureP coin_sig; union TALER_DenominationBlindingKeyP coin_blind; struct TALER_Amount amount; - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; uint64_t rrc_serial; } recoup_refresh; @@ -467,7 +467,7 @@ struct TALER_EXCHANGEDB_BankTransfer * (This is the execution date of the exchange's database, * the execution date of the bank should be in @e wire). */ - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; /** * Detailed wire information about the sending account @@ -508,7 +508,7 @@ struct TALER_EXCHANGEDB_ClosingTransfer /** * When did the exchange execute the transaction? */ - struct GNUNET_TIME_Absolute execution_date; + struct GNUNET_TIME_Timestamp execution_date; /** * Detailed wire information about the receiving account @@ -544,13 +544,13 @@ struct TALER_EXCHANGEDB_Reserve * The expiration date of this reserve; funds will be wired back * at this time. */ - struct GNUNET_TIME_Absolute expiry; + struct GNUNET_TIME_Timestamp expiry; /** * The legal expiration date of this reserve; we will forget about * it at this time. */ - struct GNUNET_TIME_Absolute gc; + struct GNUNET_TIME_Timestamp gc; }; @@ -562,7 +562,7 @@ struct TALER_EXCHANGEDB_DenominationKeyMetaData /** * Start time of the validity period for this key. */ - struct GNUNET_TIME_Absolute start; + struct GNUNET_TIME_Timestamp start; /** * The exchange will sign fresh coins between @e start and this time. @@ -576,7 +576,7 @@ struct TALER_EXCHANGEDB_DenominationKeyMetaData * with the same value with overlapping validity periods, to address * issues such as clock skew. */ - struct GNUNET_TIME_Absolute expire_withdraw; + struct GNUNET_TIME_Timestamp expire_withdraw; /** * Coins signed with the denomination key must be spent or refreshed @@ -588,7 +588,7 @@ struct TALER_EXCHANGEDB_DenominationKeyMetaData * significantly larger than @e expire_withdraw (by months or even * years). */ - struct GNUNET_TIME_Absolute expire_deposit; + struct GNUNET_TIME_Timestamp expire_deposit; /** * When do signatures with this denomination key become invalid? @@ -597,7 +597,7 @@ struct TALER_EXCHANGEDB_DenominationKeyMetaData * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_deposit (by a year or more). */ - struct GNUNET_TIME_Absolute expire_legal; + struct GNUNET_TIME_Timestamp expire_legal; /** * The value of the coins signed with this denomination key. @@ -815,7 +815,7 @@ struct TALER_EXCHANGEDB_Recoup /** * When did the recoup operation happen? */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; }; @@ -857,7 +857,7 @@ struct TALER_EXCHANGEDB_RecoupListEntry /** * When did the /recoup operation happen? */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; }; @@ -900,7 +900,7 @@ struct TALER_EXCHANGEDB_RecoupRefreshListEntry /** * When did the recoup operation happen? */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; }; @@ -1054,14 +1054,14 @@ struct TALER_EXCHANGEDB_Deposit * deposit request in a timely fashion (so back-dating is not * prevented). */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; /** * How much time does the merchant have to issue a refund request? * Zero if refunds are not allowed. After this time, the coin * cannot be refunded. */ - struct GNUNET_TIME_Absolute refund_deadline; + struct GNUNET_TIME_Timestamp refund_deadline; /** * How much time does the merchant have to execute the wire transfer? @@ -1069,7 +1069,7 @@ struct TALER_EXCHANGEDB_Deposit * constraint (as the merchant can theoretically pick any time, * including one in the past). */ - struct GNUNET_TIME_Absolute wire_deadline; + struct GNUNET_TIME_Timestamp wire_deadline; /** * Fraction of the coin's remaining value to be deposited, including @@ -1141,14 +1141,14 @@ struct TALER_EXCHANGEDB_DepositListEntry * deposit request in a timely fashion (so back-dating is not * prevented). */ - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; /** * How much time does the merchant have to issue a refund request? * Zero if refunds are not allowed. After this time, the coin * cannot be refunded. */ - struct GNUNET_TIME_Absolute refund_deadline; + struct GNUNET_TIME_Timestamp refund_deadline; /** * How much time does the merchant have to execute the wire transfer? @@ -1156,7 +1156,7 @@ struct TALER_EXCHANGEDB_DepositListEntry * constraint (as the merchant can theoretically pick any time, * including one in the past). */ - struct GNUNET_TIME_Absolute wire_deadline; + struct GNUNET_TIME_Timestamp wire_deadline; /** * Fraction of the coin's remaining value to be deposited, including @@ -1572,7 +1572,7 @@ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_DepositCallback)( void *cls, uint64_t rowid, - struct GNUNET_TIME_Absolute exchange_timestamp, + struct GNUNET_TIME_Timestamp exchange_timestamp, const struct TALER_EXCHANGEDB_Deposit *deposit, const struct TALER_DenominationPublicKey *denom_pub, bool done); @@ -1787,7 +1787,7 @@ typedef enum GNUNET_GenericReturnValue const struct TALER_Amount *credit, const char *sender_account_details, uint64_t wire_reference, - struct GNUNET_TIME_Absolute execution_date); + struct GNUNET_TIME_Timestamp execution_date); /** @@ -1821,8 +1821,8 @@ typedef void void *cls, 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 *master_sig); @@ -1847,7 +1847,7 @@ typedef enum GNUNET_GenericReturnValue const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_ReserveSignatureP *reserve_sig, - struct GNUNET_TIME_Absolute execution_date, + struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee); @@ -1888,7 +1888,7 @@ typedef void uint64_t rowid, const struct TALER_MerchantPublicKeyP *merchant_pub, const char *account_payto_uri, - struct GNUNET_TIME_Absolute exec_time, + struct GNUNET_TIME_Timestamp exec_time, const struct TALER_PrivateContractHash *h_contract_terms, const struct TALER_DenominationPublicKey *denom_pub, const struct TALER_CoinSpendPublicKeyP *coin_pub, @@ -1912,7 +1912,7 @@ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_WireTransferOutCallback)( void *cls, uint64_t rowid, - struct GNUNET_TIME_Absolute date, + struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, const char *payto_uri, const struct TALER_Amount *amount); @@ -1956,7 +1956,7 @@ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RecoupCallback)( void *cls, uint64_t rowid, - struct GNUNET_TIME_Absolute timestamp, + struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_CoinPublicInfo *coin, @@ -1985,7 +1985,7 @@ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_RecoupRefreshCallback)( void *cls, uint64_t rowid, - struct GNUNET_TIME_Absolute timestamp, + struct GNUNET_TIME_Timestamp timestamp, const struct TALER_Amount *amount, const struct TALER_CoinSpendPublicKeyP *old_coin_pub, const struct TALER_DenominationHash *old_denom_pub_hash, @@ -2013,7 +2013,7 @@ typedef enum GNUNET_GenericReturnValue (*TALER_EXCHANGEDB_ReserveClosedCallback)( void *cls, uint64_t rowid, - struct GNUNET_TIME_Absolute execution_date, + struct GNUNET_TIME_Timestamp execution_date, const struct TALER_Amount *amount_with_fee, const struct TALER_Amount *closing_fee, const struct TALER_ReservePublicKeyP *reserve_pub, @@ -2049,7 +2049,7 @@ typedef enum GNUNET_DB_QueryStatus const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *left, const char *account_details, - struct GNUNET_TIME_Absolute expiration_date); + struct GNUNET_TIME_Timestamp expiration_date); /** @@ -2095,7 +2095,7 @@ typedef void const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_Amount *amount, const char *payto_uri, - struct GNUNET_TIME_Absolute deadline, + struct GNUNET_TIME_Timestamp deadline, bool tiny, bool done); @@ -2462,7 +2462,7 @@ struct TALER_EXCHANGEDB_Plugin (*reserves_in_insert)(void *cls, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *balance, - struct GNUNET_TIME_Absolute execution_time, + struct GNUNET_TIME_Timestamp execution_time, const char *sender_account_details, const char *exchange_account_name, uint64_t wire_reference); @@ -2544,7 +2544,7 @@ struct TALER_EXCHANGEDB_Plugin (*do_withdraw)( void *cls, const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable, - struct GNUNET_TIME_Absolute now, + struct GNUNET_TIME_Timestamp now, bool *found, bool *balance_ok, struct TALER_EXCHANGEDB_KycStatus *kyc_ok, @@ -2712,7 +2712,7 @@ struct TALER_EXCHANGEDB_Plugin (*have_deposit)(void *cls, const struct TALER_EXCHANGEDB_Deposit *deposit, struct TALER_Amount *deposit_fee, - struct GNUNET_TIME_Absolute *exchange_timestamp); + struct GNUNET_TIME_Timestamp *exchange_timestamp); /** @@ -2737,9 +2737,9 @@ struct TALER_EXCHANGEDB_Plugin const struct TALER_MerchantWireHash *h_wire, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantPublicKeyP *merchant, - struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Timestamp refund_deadline, struct TALER_Amount *deposit_fee, - struct GNUNET_TIME_Absolute *exchange_timestamp); + struct GNUNET_TIME_Timestamp *exchange_timestamp); /** @@ -2752,7 +2752,7 @@ struct TALER_EXCHANGEDB_Plugin */ enum GNUNET_DB_QueryStatus (*insert_deposit)(void *cls, - struct GNUNET_TIME_Absolute exchange_timestamp, + struct GNUNET_TIME_Timestamp exchange_timestamp, const struct TALER_EXCHANGEDB_Deposit *deposit); @@ -3055,7 +3055,7 @@ struct TALER_EXCHANGEDB_Plugin const struct TALER_MerchantPublicKeyP *merchant_pub, bool *pending, struct TALER_WireTransferIdentifierRawP *wtid, - struct GNUNET_TIME_Absolute *exec_time, + struct GNUNET_TIME_Timestamp *exec_time, struct TALER_Amount *amount_with_fee, struct TALER_Amount *deposit_fee, struct TALER_EXCHANGEDB_KycStatus *kyc); @@ -3091,8 +3091,8 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*insert_wire_fee)(void *cls, const char *wire_method, - 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_Amount *wire_fee, const struct TALER_Amount *closing_fee, const struct TALER_MasterSignatureP *master_sig); @@ -3114,9 +3114,9 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*get_wire_fee)(void *cls, const char *type, - struct GNUNET_TIME_Absolute date, - struct GNUNET_TIME_Absolute *start_date, - struct GNUNET_TIME_Absolute *end_date, + struct GNUNET_TIME_Timestamp date, + struct GNUNET_TIME_Timestamp *start_date, + struct GNUNET_TIME_Timestamp *end_date, struct TALER_Amount *wire_fee, struct TALER_Amount *closing_fee, struct TALER_MasterSignatureP *master_sig); @@ -3134,7 +3134,7 @@ struct TALER_EXCHANGEDB_Plugin */ enum GNUNET_DB_QueryStatus (*get_expired_reserves)(void *cls, - struct GNUNET_TIME_Absolute now, + struct GNUNET_TIME_Timestamp now, TALER_EXCHANGEDB_ReserveExpiredCallback rec, void *rec_cls); @@ -3154,7 +3154,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*insert_reserve_closed)(void *cls, const struct TALER_ReservePublicKeyP *reserve_pub, - struct GNUNET_TIME_Absolute execution_date, + struct GNUNET_TIME_Timestamp execution_date, const char *receiver_account, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *amount_with_fee, @@ -3248,7 +3248,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*store_wire_transfer_out)( void *cls, - struct GNUNET_TIME_Absolute date, + struct GNUNET_TIME_Timestamp date, const struct TALER_WireTransferIdentifierRawP *wtid, uint64_t wire_target, const char *exchange_account_section, @@ -3486,7 +3486,7 @@ struct TALER_EXCHANGEDB_Plugin const union TALER_DenominationBlindingKeyP *coin_blind, const struct TALER_Amount *amount, const struct TALER_BlindedCoinHash *h_blind_ev, - struct GNUNET_TIME_Absolute timestamp); + struct GNUNET_TIME_Timestamp timestamp); /** @@ -3511,7 +3511,7 @@ struct TALER_EXCHANGEDB_Plugin const union TALER_DenominationBlindingKeyP *coin_blind, const struct TALER_Amount *amount, const struct TALER_BlindedCoinHash *h_blind_ev, - struct GNUNET_TIME_Absolute timestamp); + struct GNUNET_TIME_Timestamp timestamp); /** @@ -3592,8 +3592,8 @@ struct TALER_EXCHANGEDB_Plugin */ enum GNUNET_DB_QueryStatus (*select_deposits_missing_wire)(void *cls, - struct GNUNET_TIME_Absolute start_date, - struct GNUNET_TIME_Absolute end_date, + struct GNUNET_TIME_Timestamp start_date, + struct GNUNET_TIME_Timestamp end_date, TALER_EXCHANGEDB_WireMissingCallback cb, void *cb_cls); @@ -3609,7 +3609,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*lookup_auditor_timestamp)(void *cls, const struct TALER_AuditorPublicKeyP *auditor_pub, - struct GNUNET_TIME_Absolute *last_date); + struct GNUNET_TIME_Timestamp *last_date); /** @@ -3645,7 +3645,7 @@ struct TALER_EXCHANGEDB_Plugin const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, const char *auditor_name, - struct GNUNET_TIME_Absolute start_date); + struct GNUNET_TIME_Timestamp start_date); /** @@ -3665,7 +3665,7 @@ struct TALER_EXCHANGEDB_Plugin const struct TALER_AuditorPublicKeyP *auditor_pub, const char *auditor_url, const char *auditor_name, - struct GNUNET_TIME_Absolute change_date, + struct GNUNET_TIME_Timestamp change_date, bool enabled); @@ -3680,7 +3680,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*lookup_wire_timestamp)(void *cls, const char *payto_uri, - struct GNUNET_TIME_Absolute *last_date); + struct GNUNET_TIME_Timestamp *last_date); /** @@ -3697,7 +3697,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*insert_wire)(void *cls, const char *payto_uri, - struct GNUNET_TIME_Absolute start_date, + struct GNUNET_TIME_Timestamp start_date, const struct TALER_MasterSignatureP *master_sig); @@ -3714,7 +3714,7 @@ struct TALER_EXCHANGEDB_Plugin enum GNUNET_DB_QueryStatus (*update_wire)(void *cls, const char *payto_uri, - struct GNUNET_TIME_Absolute change_date, + struct GNUNET_TIME_Timestamp change_date, bool enabled); @@ -3899,8 +3899,8 @@ struct TALER_EXCHANGEDB_Plugin (*lookup_wire_fee_by_time)( void *cls, const char *wire_method, - struct GNUNET_TIME_Absolute start_time, - struct GNUNET_TIME_Absolute end_time, + struct GNUNET_TIME_Timestamp start_time, + struct GNUNET_TIME_Timestamp end_time, struct TALER_Amount *wire_fee, struct TALER_Amount *closing_fee); diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index 73d0c418f..b20bd4ea4 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -40,20 +40,6 @@ /** * Generate packer instruction for a JSON field of type - * absolute time. - * The absolute time value is expected to be already rounded. - * - * @param name name of the field to add to the object - * @param at absolute time to pack - * @return json pack specification - */ -struct GNUNET_JSON_PackSpec -TALER_JSON_pack_time_abs (const char *name, - struct GNUNET_TIME_Absolute at); - - -/** - * Generate packer instruction for a JSON field of type * absolute time creating a human-readable timestamp. * * @param name name of the field to add to the object @@ -66,20 +52,6 @@ TALER_JSON_pack_time_abs_human (const char *name, /** - * Generate packer instruction for a JSON field of type - * absolute time in network byte order. - * The absolute time value is expected to be already rounded. - * - * @param name name of the field to add to the object - * @param at absolute time to pack - * @return json pack specification - */ -struct GNUNET_JSON_PackSpec -TALER_JSON_pack_time_abs_nbo (const char *name, - struct GNUNET_TIME_AbsoluteNBO at); - - -/** * Put an error code into a JSON reply, including * both the numeric value and the hint. * @@ -104,34 +76,6 @@ TALER_JSON_pack_time_abs_nbo_human (const char *name, /** * Generate packer instruction for a JSON field of type - * relative time. - * The relative time value is expected to be already rounded. - * - * @param name name of the field to add to the object - * @param rt relative time to pack - * @return json pack specification - */ -struct GNUNET_JSON_PackSpec -TALER_JSON_pack_time_rel (const char *name, - struct GNUNET_TIME_Relative rt); - - -/** - * Generate packer instruction for a JSON field of type - * relative time in network byte order. - * The relative time value is expected to be already rounded. - * - * @param name name of the field to add to the object - * @param rt relative time to pack - * @return json pack specification - */ -struct GNUNET_JSON_PackSpec -TALER_JSON_pack_time_rel_nbo (const char *name, - struct GNUNET_TIME_RelativeNBO rt); - - -/** - * Generate packer instruction for a JSON field of type * denomination public key. * * @param name name of the field to add to the object @@ -279,46 +223,6 @@ TALER_JSON_spec_amount_any_nbo (const char *name, /** - * Provide specification to parse given JSON object to an absolute time. - * The absolute time value is expected to be already rounded. - * - * @param name name of the time field in the JSON - * @param[out] r_time where the time has to be written - * @return spec for parsing an absolute time - */ -struct GNUNET_JSON_Specification -TALER_JSON_spec_absolute_time (const char *name, - struct GNUNET_TIME_Absolute *r_time); - - -/** - * Provide specification to parse given JSON object to an absolute time - * in network byte order. - * The absolute time value is expected to be already rounded. - * - * @param name name of the time field in the JSON - * @param[out] r_time where the time has to be written - * @return spec for parsing an absolute time - */ -struct GNUNET_JSON_Specification -TALER_JSON_spec_absolute_time_nbo (const char *name, - struct GNUNET_TIME_AbsoluteNBO *r_time); - - -/** - * Provide specification to parse given JSON object to a relative time. - * The absolute time value is expected to be already rounded. - * - * @param name name of the time field in the JSON - * @param[out] r_time where the time has to be written - * @return spec for parsing a relative time - */ -struct GNUNET_JSON_Specification -TALER_JSON_spec_relative_time (const char *name, - struct GNUNET_TIME_Relative *r_time); - - -/** * Generate line in parser specification for denomination public key. * * @param field name of the field diff --git a/src/include/taler_pq_lib.h b/src/include/taler_pq_lib.h index 6e69cdf6d..2189a4f61 100644 --- a/src/include/taler_pq_lib.h +++ b/src/include/taler_pq_lib.h @@ -102,33 +102,6 @@ TALER_PQ_query_param_json (const json_t *x); /** - * Generate query parameter for an absolute time value. - * In contrast to - * #GNUNET_PQ_query_param_absolute_time(), this function - * will abort (!) if the time given is not rounded! - * The database must store a 64-bit integer. - * - * @param x pointer to the query parameter to pass - */ -struct GNUNET_PQ_QueryParam -TALER_PQ_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x); - - -/** - * Generate query parameter for an absolute time value. - * In contrast to - * #GNUNET_PQ_query_param_absolute_time(), this function - * will abort (!) if the time given is not rounded! - * The database must store a 64-bit integer. - * - * @param x pointer to the query parameter to pass - */ -struct GNUNET_PQ_QueryParam -TALER_PQ_query_param_absolute_time_nbo (const struct - GNUNET_TIME_AbsoluteNBO *x); - - -/** * Currency amount expected. * * @param name name of the field in the table @@ -205,36 +178,6 @@ TALER_PQ_result_spec_json (const char *name, json_t **jp); -/** - * Rounded absolute time expected. - * In contrast to #GNUNET_PQ_query_param_absolute_time_nbo(), - * this function ensures that the result is rounded and can - * be converted to JSON. - * - * @param name name of the field in the table - * @param[out] at where to store the result - * @return array entry for the result specification to use - */ -struct GNUNET_PQ_ResultSpec -TALER_PQ_result_spec_absolute_time (const char *name, - struct GNUNET_TIME_Absolute *at); - - -/** - * Rounded absolute time expected. - * In contrast to #GNUNET_PQ_result_spec_absolute_time_nbo(), - * this function ensures that the result is rounded and can - * be converted to JSON. - * - * @param name name of the field in the table - * @param[out] at where to store the result - * @return array entry for the result specification to use - */ -struct GNUNET_PQ_ResultSpec -TALER_PQ_result_spec_absolute_time_nbo (const char *name, - struct GNUNET_TIME_AbsoluteNBO *at); - - #endif /* TALER_PQ_LIB_H_ */ /* end of include/taler_pq_lib.h */ diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h index 991c56e65..87a004e31 100644 --- a/src/include/taler_signatures.h +++ b/src/include/taler_signatures.h @@ -342,7 +342,7 @@ struct TALER_DenominationKeyAnnouncementPS /** * When does the key become available? */ - struct GNUNET_TIME_AbsoluteNBO anchor_time; + struct GNUNET_TIME_TimestampNBO anchor_time; /** * How long is the key available after @e anchor_time? @@ -373,7 +373,7 @@ struct TALER_SigningKeyAnnouncementPS /** * When does the key become available? */ - struct GNUNET_TIME_AbsoluteNBO anchor_time; + struct GNUNET_TIME_TimestampNBO anchor_time; /** * How long is the key available after @e anchor_time? @@ -497,14 +497,14 @@ struct TALER_DepositRequestPS * deposit request in a timely fashion (so back-dating is not * prevented). */ - struct GNUNET_TIME_AbsoluteNBO wallet_timestamp; + struct GNUNET_TIME_TimestampNBO wallet_timestamp; /** * How much time does the merchant have to issue a refund request? * Zero if refunds are not allowed. After this time, the coin * cannot be refunded. */ - struct GNUNET_TIME_AbsoluteNBO refund_deadline; + struct GNUNET_TIME_TimestampNBO refund_deadline; /** * Amount to be deposited, including deposit fee charged by the @@ -565,13 +565,13 @@ struct TALER_DepositConfirmationPS * Time when this confirmation was generated / when the exchange received * the deposit request. */ - struct GNUNET_TIME_AbsoluteNBO exchange_timestamp; + struct GNUNET_TIME_TimestampNBO exchange_timestamp; /** * By when does the exchange expect to pay the merchant * (as per the merchant's request). */ - struct GNUNET_TIME_AbsoluteNBO wire_deadline; + struct GNUNET_TIME_TimestampNBO wire_deadline; /** * How much time does the @e merchant have to issue a refund @@ -580,7 +580,7 @@ struct TALER_DepositConfirmationPS * performed by the exchange until the refund deadline. This value * is taken from the original deposit request. */ - struct GNUNET_TIME_AbsoluteNBO refund_deadline; + struct GNUNET_TIME_TimestampNBO refund_deadline; /** * Amount to be deposited, excluding fee. Calculated from the @@ -782,7 +782,7 @@ struct TALER_ExchangeSigningKeyValidityPS /** * When does this signing key begin to be valid? */ - struct GNUNET_TIME_AbsoluteNBO start; + struct GNUNET_TIME_TimestampNBO start; /** * When does this signing key expire? Note: This is currently when @@ -792,7 +792,7 @@ struct TALER_ExchangeSigningKeyValidityPS * the use of either key during the overlap time (due to the * possibility of clock skew). */ - struct GNUNET_TIME_AbsoluteNBO expire; + struct GNUNET_TIME_TimestampNBO expire; /** * When do signatures with this signing key become invalid? After @@ -801,7 +801,7 @@ struct TALER_ExchangeSigningKeyValidityPS * evidence. @e end is expected to be significantly larger than @e * expire (by a year or more). */ - struct GNUNET_TIME_AbsoluteNBO end; + struct GNUNET_TIME_TimestampNBO end; /** * The public online signing key that the exchange will use @@ -828,7 +828,7 @@ struct TALER_ExchangeKeySetPS /** * Time of the key set issue. */ - struct GNUNET_TIME_AbsoluteNBO list_issue_date; + struct GNUNET_TIME_TimestampNBO list_issue_date; /** * Hash over the various denomination signing keys returned. @@ -858,7 +858,7 @@ struct TALER_ExchangeAccountSetupSuccessPS /** * When was the signature made. */ - struct GNUNET_TIME_AbsoluteNBO timestamp; + struct GNUNET_TIME_TimestampNBO timestamp; }; @@ -878,7 +878,7 @@ struct TALER_MasterAddAuditorPS /** * Time of the change. */ - struct GNUNET_TIME_AbsoluteNBO start_date; + struct GNUNET_TIME_TimestampNBO start_date; /** * Public key of the auditor. @@ -908,7 +908,7 @@ struct TALER_MasterDelAuditorPS /** * Time of the change. */ - struct GNUNET_TIME_AbsoluteNBO end_date; + struct GNUNET_TIME_TimestampNBO end_date; /** * Public key of the auditor. @@ -934,7 +934,7 @@ struct TALER_MasterAddWirePS /** * Time of the change. */ - struct GNUNET_TIME_AbsoluteNBO start_date; + struct GNUNET_TIME_TimestampNBO start_date; /** * Hash over the exchange's payto URI. @@ -959,7 +959,7 @@ struct TALER_MasterDelWirePS /** * Time of the change. */ - struct GNUNET_TIME_AbsoluteNBO end_date; + struct GNUNET_TIME_TimestampNBO end_date; /** * Hash over the exchange's payto URI. @@ -990,7 +990,7 @@ struct TALER_DenominationKeyValidityPS /** * Start time of the validity period for this key. */ - struct GNUNET_TIME_AbsoluteNBO start; + struct GNUNET_TIME_TimestampNBO start; /** * The exchange will sign fresh coins between @e start and this time. @@ -1004,7 +1004,7 @@ struct TALER_DenominationKeyValidityPS * with the same value with overlapping validity periods, to address * issues such as clock skew. */ - struct GNUNET_TIME_AbsoluteNBO expire_withdraw; + struct GNUNET_TIME_TimestampNBO expire_withdraw; /** * Coins signed with the denomination key must be spent or refreshed @@ -1016,7 +1016,7 @@ struct TALER_DenominationKeyValidityPS * significantly larger than @e expire_withdraw (by months or even * years). */ - struct GNUNET_TIME_AbsoluteNBO expire_deposit; + struct GNUNET_TIME_TimestampNBO expire_deposit; /** * When do signatures with this denomination key become invalid? @@ -1025,7 +1025,7 @@ struct TALER_DenominationKeyValidityPS * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_deposit (by a year or more). */ - struct GNUNET_TIME_AbsoluteNBO expire_legal; + struct GNUNET_TIME_TimestampNBO expire_legal; /** * The value of the coins signed with this denomination key. @@ -1093,7 +1093,7 @@ struct TALER_ExchangeKeyValidityPS /** * Start time of the validity period for this key. */ - struct GNUNET_TIME_AbsoluteNBO start; + struct GNUNET_TIME_TimestampNBO start; /** * The exchange will sign fresh coins between @e start and this time. @@ -1107,7 +1107,7 @@ struct TALER_ExchangeKeyValidityPS * with the same value with overlapping validity periods, to address * issues such as clock skew. */ - struct GNUNET_TIME_AbsoluteNBO expire_withdraw; + struct GNUNET_TIME_TimestampNBO expire_withdraw; /** * Coins signed with the denomination key must be spent or refreshed @@ -1119,7 +1119,7 @@ struct TALER_ExchangeKeyValidityPS * significantly larger than @e expire_withdraw (by months or even * years). */ - struct GNUNET_TIME_AbsoluteNBO expire_deposit; + struct GNUNET_TIME_TimestampNBO expire_deposit; /** * When do signatures with this denomination key become invalid? @@ -1128,7 +1128,7 @@ struct TALER_ExchangeKeyValidityPS * of the evidence. @e expire_legal is expected to be significantly * larger than @e expire_deposit (by a year or more). */ - struct GNUNET_TIME_AbsoluteNBO expire_legal; + struct GNUNET_TIME_TimestampNBO expire_legal; /** * The value of the coins signed with this denomination key. @@ -1231,12 +1231,12 @@ struct TALER_MasterWireFeePS /** * Start date when the fee goes into effect. */ - struct GNUNET_TIME_AbsoluteNBO start_date; + struct GNUNET_TIME_TimestampNBO start_date; /** * End date when the fee stops being in effect (exclusive) */ - struct GNUNET_TIME_AbsoluteNBO end_date; + struct GNUNET_TIME_TimestampNBO end_date; /** * Fee charged to the merchant per wire transfer. @@ -1338,7 +1338,7 @@ struct TALER_WireDepositDetailP /** * Time when the wire transfer was performed by the exchange. */ - struct GNUNET_TIME_AbsoluteNBO execution_time; + struct GNUNET_TIME_TimestampNBO execution_time; /** * Coin's public key. @@ -1473,7 +1473,7 @@ struct TALER_ConfirmWirePS * timestamp may not be exactly the same on the wire, i.e. * because the wire has a different timezone or resolution. */ - struct GNUNET_TIME_AbsoluteNBO execution_time; + struct GNUNET_TIME_TimestampNBO execution_time; /** * The contribution of @e coin_pub to the total transfer volume. @@ -1532,7 +1532,7 @@ struct TALER_RecoupConfirmationPS * Indirectly determines when the wire transfer is (likely) * to happen. */ - struct GNUNET_TIME_AbsoluteNBO timestamp; + struct GNUNET_TIME_TimestampNBO timestamp; /** * How much of the coin's value will the exchange transfer? @@ -1570,7 +1570,7 @@ struct TALER_RecoupRefreshConfirmationPS * Indirectly determines when the wire transfer is (likely) * to happen. */ - struct GNUNET_TIME_AbsoluteNBO timestamp; + struct GNUNET_TIME_TimestampNBO timestamp; /** * How much of the coin's value will the exchange transfer? @@ -1605,7 +1605,7 @@ struct TALER_DenominationUnknownAffirmationPS /** * When did the exchange sign this message. */ - struct GNUNET_TIME_AbsoluteNBO timestamp; + struct GNUNET_TIME_TimestampNBO timestamp; /** * Hash of the public denomination key we do not know. @@ -1630,7 +1630,7 @@ struct TALER_DenominationExpiredAffirmationPS /** * When did the exchange sign this message. */ - struct GNUNET_TIME_AbsoluteNBO timestamp; + struct GNUNET_TIME_TimestampNBO timestamp; /** * Name of the operation that is not allowed at this time. Might NOT be 0-terminated, but is padded with 0s. @@ -1660,7 +1660,7 @@ struct TALER_ReserveCloseConfirmationPS /** * When did the exchange initiate the wire transfer. */ - struct GNUNET_TIME_AbsoluteNBO timestamp; + struct GNUNET_TIME_TimestampNBO timestamp; /** * How much did the exchange send? diff --git a/src/include/taler_sq_lib.h b/src/include/taler_sq_lib.h index 66bd38c82..b5749308e 100644 --- a/src/include/taler_sq_lib.h +++ b/src/include/taler_sq_lib.h @@ -61,33 +61,6 @@ TALER_SQ_query_param_json (const json_t *x); /** - * Generate query parameter for an absolute time value. - * In contrast to - * #GNUNET_SQ_query_param_absolute_time(), this function - * will abort (!) if the time given is not rounded! - * The database must store a 64-bit integer. - * - * @param x pointer to the query parameter to pass - */ -struct GNUNET_SQ_QueryParam -TALER_SQ_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x); - - -/** - * Generate query parameter for an absolute time value. - * In contrast to - * #GNUNET_SQ_query_param_absolute_time(), this function - * will abort (!) if the time given is not rounded! - * The database must store a 64-bit integer. - * - * @param x pointer to the query parameter to pass - */ -struct GNUNET_SQ_QueryParam -TALER_SQ_query_param_absolute_time_nbo (const struct - GNUNET_TIME_AbsoluteNBO *x); - - -/** * Currency amount expected. * * @param currency currency to use for @a amount @@ -121,32 +94,6 @@ struct GNUNET_SQ_ResultSpec TALER_SQ_result_spec_json (json_t **jp); -/** - * Rounded absolute time expected. - * In contrast to #GNUNET_SQ_query_param_absolute_time_nbo(), - * this function ensures that the result is rounded and can - * be converted to JSON. - * - * @param[out] at where to store the result - * @return array entry for the result specification to use - */ -struct GNUNET_SQ_ResultSpec -TALER_SQ_result_spec_absolute_time (struct GNUNET_TIME_Absolute *at); - - -/** - * Rounded absolute time expected. - * In contrast to #GNUNET_SQ_result_spec_absolute_time_nbo(), - * this function ensures that the result is rounded and can - * be converted to JSON. - * - * @param[out] at where to store the result - * @return array entry for the result specification to use - */ -struct GNUNET_SQ_ResultSpec -TALER_SQ_result_spec_absolute_time_nbo (struct GNUNET_TIME_AbsoluteNBO *at); - - #endif /* TALER_SQ_LIB_H_ */ /* end of include/taler_sq_lib.h */ diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index f50e13a21..4733cf2f6 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -133,7 +133,7 @@ struct TALER_TESTING_LibeufinServices * @return #GNUNET_OK on success, #GNUNET_NO if test should be * skipped, #GNUNET_SYSERR on test failure */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_prepare_exchange (const char *config_filename, int reset_db, struct TALER_TESTING_ExchangeConfiguration *ec); @@ -208,7 +208,7 @@ TALER_TESTING_cleanup_files (const char *config_name); * @param cfg configuration * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_cleanup_files_cfg (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg); @@ -222,7 +222,7 @@ TALER_TESTING_cleanup_files_cfg (void *cls, * @param auditor_url URL of auditor to enable, can be NULL * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_run_exchange_offline (const char *config_filename, const char *payto_uri, const char *auditor_pub, @@ -235,7 +235,7 @@ TALER_TESTING_run_exchange_offline (const char *config_filename, * @param config_filename configuration file to use * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_auditor_db_reset (const char *config_filename); @@ -245,7 +245,7 @@ TALER_TESTING_auditor_db_reset (const char *config_filename); * @param config_filename configuration file to use * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_exchange_db_reset (const char *config_filename); @@ -255,7 +255,7 @@ TALER_TESTING_exchange_db_reset (const char *config_filename); * @param config_filename configuration file to use * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_run_auditor_offline (const char *config_filename); @@ -268,7 +268,7 @@ TALER_TESTING_run_auditor_offline (const char *config_filename); * @param do_remove #GNUNET_NO to add exchange, #GNUNET_YES to remove * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_run_auditor_exchange (const char *config_filename, const char *exchange_master_pub, const char *exchange_base_url, @@ -281,7 +281,7 @@ TALER_TESTING_run_auditor_exchange (const char *config_filename, * @param url URL to extract port from, 80 is default * @return #GNUNET_OK if the port is free */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_url_port_free (const char *url); @@ -324,7 +324,7 @@ struct TALER_TESTING_BankConfiguration * @param[out] bc set to the bank's configuration data * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_prepare_fakebank (const char *config_filename, const char *config_section, struct TALER_TESTING_BankConfiguration *bc); @@ -531,7 +531,7 @@ struct TALER_TESTING_Command * @param index index number of the object to extract. * @return #GNUNET_OK on success */ - int + enum GNUNET_GenericReturnValue (*traits)(void *cls, const void **ret, const char *trait, @@ -731,7 +731,7 @@ typedef void * non-#GNUNET_OK codes are #GNUNET_SYSERR most of the * times. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_setup (TALER_TESTING_Main main_cb, void *main_cb_cls, const struct GNUNET_CONFIGURATION_Handle *cfg, @@ -751,7 +751,7 @@ TALER_TESTING_setup (TALER_TESTING_Main main_cb, * non-GNUNET_OK codes are #GNUNET_SYSERR most of the * times. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_auditor_setup (TALER_TESTING_Main main_cb, void *main_cb_cls, const char *config_filename); @@ -788,7 +788,7 @@ struct TALER_TESTING_SetupContext * @param cfg configuration to use. * @return #GNUNET_OK if no errors occurred. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_setup_with_exchange_cfg ( void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg); @@ -809,7 +809,7 @@ TALER_TESTING_setup_with_exchange_cfg ( * at its base URL. * @return #GNUNET_OK if no errors occurred. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb, void *main_cb_cls, const char *config_file); @@ -824,7 +824,7 @@ TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb, * @param cfg configuration to use. * @return #GNUNET_OK if no errors occurred. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_setup_with_auditor_and_exchange_cfg ( void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg); @@ -845,7 +845,7 @@ TALER_TESTING_setup_with_auditor_and_exchange_cfg ( * at its base URL. * @return #GNUNET_OK if no errors occurred. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_setup_with_auditor_and_exchange (TALER_TESTING_Main main_cb, void *main_cb_cls, const char *config_file); @@ -905,7 +905,7 @@ TALER_TESTING_run_fakebank (const char *bank_url, * @param[out] bc set to the bank's configuration data * @return #GNUNET_OK on success */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_prepare_bank (const char *config_filename, int reset_db, const char *config_section, @@ -922,7 +922,7 @@ TALER_TESTING_prepare_bank (const char *config_filename, * @return the base url, or NULL upon errors. Must be freed * by the caller. */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_prepare_nexus (const char *config_filename, int reset_db, const char *config_section, @@ -934,7 +934,7 @@ TALER_TESTING_prepare_nexus (const char *config_filename, * @param prog program's name to look into * @param marker chunk to find in @a prog */ -int +enum GNUNET_GenericReturnValue TALER_TESTING_has_in_name (const char *prog, const char *marker); @@ -1966,7 +1966,7 @@ TALER_TESTING_cmd_insert_deposit ( const struct TALER_TESTING_DatabaseConnection *dbc, const char *merchant_name, const char *merchant_account, - struct GNUNET_TIME_Absolute exchange_timestamp, + struct GNUNET_TIME_Timestamp exchange_timestamp, struct GNUNET_TIME_Relative wire_deadline, const char *amount_with_fee, const char *deposit_fee); @@ -2446,12 +2446,12 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, op (debit_payto_uri, const char *) \ op (order_id, const char *) \ op (amount, const struct TALER_Amount) \ - op (amount_with_fee, const struct TALER_Amount) \ - op (deposit_amount, const struct TALER_Amount) \ - op (deposit_fee_amount, const struct TALER_Amount) \ + op (amount_with_fee, const struct TALER_Amount) \ + op (deposit_amount, const struct TALER_Amount) \ + op (deposit_fee_amount, const struct TALER_Amount) \ op (batch_cmds, struct TALER_TESTING_Command *) \ op (uuid, const struct GNUNET_Uuid) \ - op (fresh_coins, const struct TALER_TESTING_FreshCoinData *) \ + op (fresh_coins, const struct TALER_TESTING_FreshCoinData *) \ op (claim_token, const struct TALER_ClaimTokenP) \ op (relative_time, const struct GNUNET_TIME_Relative) \ op (process, struct GNUNET_OS_Process *) @@ -2460,14 +2460,15 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits, /** * Call #op on all indexed traits. */ -#define TALER_TESTING_INDEXED_TRAITS(op) \ +#define TALER_TESTING_INDEXED_TRAITS(op) \ op (denom_pub, const struct TALER_EXCHANGE_DenomPublicKey) \ - op (denom_sig, const struct TALER_DenominationSignature) \ + op (denom_sig, const struct TALER_DenominationSignature) \ op (coin_priv, const struct TALER_CoinSpendPrivateKeyP) \ op (coin_pub, const struct TALER_CoinSpendPublicKeyP) \ op (absolute_time, const struct GNUNET_TIME_Absolute) \ - op (wire_deadline, const struct GNUNET_TIME_Absolute) \ - op (refund_deadline, const struct GNUNET_TIME_Absolute) \ + op (timestamp, const struct GNUNET_TIME_Timestamp) \ + op (wire_deadline, const struct GNUNET_TIME_Timestamp) \ + op (refund_deadline, const struct GNUNET_TIME_Timestamp) \ op (exchange_pub, const struct TALER_ExchangePublicKeyP) \ op (exchange_sig, const struct TALER_ExchangeSignatureP) \ op (blinding_key, const union TALER_DenominationBlindingKeyP) |