summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-07 15:56:42 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-03-07 15:56:42 +0100
commite94d256e09a9ba6c0283843ffb02ddb2c02e104d (patch)
treec82390293c111ad7e48a17b91bc74c9cf7d4e343 /src/include/taler_merchantdb_plugin.h
parent2632993fa90336bcc7c071d171f11959a0a16517 (diff)
downloadmerchant-e94d256e09a9ba6c0283843ffb02ddb2c02e104d.tar.gz
merchant-e94d256e09a9ba6c0283843ffb02ddb2c02e104d.tar.bz2
merchant-e94d256e09a9ba6c0283843ffb02ddb2c02e104d.zip
DB provides lookup of proposal data based on proposal data's
hashcode too.
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index befa23df..0dfbea8b 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -175,15 +175,13 @@ struct TALER_MERCHANTDB_Plugin
struct GNUNET_TIME_Absolute timestamp,
const json_t *proposal_data);
-
-
/**
- * Retrieve proposal data given its transaction id's hashcode
+ * Retrieve proposal data given its order ID.
*
* @param cls closure
- * @param h_transaction_id hashcode of the transaction id mentioned in this
- * proposal data
- * @param proposal_data where to store the retrieved proposal data
+ * @param proposal_data where to store the result
+ * @param order_id order_id used to lookup.
+ * @param merchant_pub instance's public key.
* @return #GNUNET_OK on success, #GNUNET_NO if no contract is
* found, #GNUNET_SYSERR upon error
*/
@@ -195,6 +193,23 @@ struct TALER_MERCHANTDB_Plugin
/**
+ * Retrieve proposal data given its hashcode
+ *
+ * @param cls closure
+ * @param proposal_data where to store the result
+ * @param h_proposal_data hashcode used to lookup.
+ * @param merchant_pub instance's public key.
+ * @return #GNUNET_OK on success, #GNUNET_NO if no contract is
+ * found, #GNUNET_SYSERR upon error
+ */
+ int
+ (*find_proposal_data_from_hash) (void *cls,
+ json_t **proposal_data,
+ const struct GNUNET_HashCode *h_proposal_data,
+ const struct TALER_MerchantPublicKeyP *merchant_pub);
+
+
+ /**
* Return proposal data and order id for all proposals younger than
* date.
*