summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-06 22:16:27 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-06 22:16:27 +0200
commit05afe21f0f4788451af7baaeda4f2f7fd6c547c5 (patch)
treecf4e6ca9224eea7b9bf327868f9455f6edbab47b /src/include/taler_merchantdb_plugin.h
parent02faacad3cd56e3266be625980920e420f61250f (diff)
downloadmerchant-05afe21f0f4788451af7baaeda4f2f7fd6c547c5.tar.gz
merchant-05afe21f0f4788451af7baaeda4f2f7fd6c547c5.tar.bz2
merchant-05afe21f0f4788451af7baaeda4f2f7fd6c547c5.zip
fix FTBFS
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h90
1 files changed, 68 insertions, 22 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 94fe6188..51d48dc4 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -394,6 +394,22 @@ enum TALER_MERCHANTDB_RefundStatus
};
+/**
+ * Function called with information about a wire transfer identifier.
+ *
+ * @param cls closure
+ * @param order_id the order to which the deposits belong
+ * @param deposit_value the amount deposited under @a order_id
+ * @param deposit_fee the fee charged for @a deposit_value
+ */
+typedef void
+(*TALER_MERCHANTDB_TransferDetailsCallback)(
+ void *cls,
+ const char *order_id,
+ const struct TALER_Amount *deposit_value,
+ const struct TALER_Amount *deposit_fee);
+
+
/* **************** OLD: ******************** */
/**
@@ -1284,6 +1300,58 @@ struct TALER_MERCHANTDB_Plugin
struct TALER_MasterSignatureP *master_sig);
+ /* WIP: */
+ /**
+ * Lookup information about coin payments by @a h_contract_terms and
+ * @a coin_pub.
+ *
+ * @param cls closure
+ * @param instance_id instance to lookup payments for
+ * @param h_contract_terms proposal data's hashcode
+ * @param coin_pub public key to use for the search
+ * @param cb function to call with payment data
+ * @param cb_cls closure for @a cb
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*lookup_deposits_by_contract_and_coin)(
+ void *cls,
+ const char *instance_id,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ TALER_MERCHANTDB_CoinDepositCallback cb,
+ void *cb_cls);
+
+
+ /**
+ * Lookup transfer details.
+ *
+ * @param cls closure
+ * @param instance_id instance to lookup payments for
+ * @param exchange_url
+ * @param payto_uri
+ * @param wtid
+ * @param total_amount
+ * @param wire_fee
+ * @param execution_time
+ * @param cb function to call with detailed transfer data
+ * @param cb_cls closure for @a cb
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*lookup_transfer_details)(
+ void *cls,
+ const char *instance_id,
+ const char *exchange_url,
+ const char *payto_uri,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const struct TALER_Amount *total_amount,
+ const struct TALER_Amount *wire_fee,
+ struct GNUNET_TIME_Absolute execution_time,
+ TALER_MERCHANTDB_TransferDetailsCallback cb,
+ void *cb_cls);
+
+
/* ****************** OLD API ******************** */
@@ -1463,28 +1531,6 @@ struct TALER_MERCHANTDB_Plugin
/**
- * Lookup information about coin payments by h_contract_terms and coin.
- *
- * @param cls closure
- * @param h_contract_terms proposal data's hashcode
- * @param merchant_pub merchant's public key. It's AND'd with @a h_contract_terms
- * in order to find the result.
- * @param coin_pub public key to use for the search
- * @param cb function to call with payment data
- * @param cb_cls closure for @a cb
- * @return transaction status
- */
- enum GNUNET_DB_QueryStatus
- (*find_payments_by_hash_and_coin)(
- void *cls,
- const struct GNUNET_HashCode *h_contract_terms,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- TALER_MERCHANTDB_CoinDepositCallback cb,
- void *cb_cls);
-
-
- /**
* Lookup information about a transfer by @a h_contract_terms. Note
* that in theory there could be multiple wire transfers for a
* single @a h_contract_terms, as the transaction may have involved