summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 228fa90b..85cadd8a 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -184,6 +184,23 @@ struct TALER_MERCHANTDB_Plugin
int
(*initialize) (void *cls);
+ /**
+ * Insert order into db.
+ *
+ * @param cls closure
+ * @param order_id alphanumeric string that uniquely identifies the proposal
+ * @param merchant_pub merchant's public key
+ * @param timestamp timestamp of this proposal data
+ * @param contract_terms proposal data to store
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*insert_order) (void *cls,
+ const char *order_id,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ struct GNUNET_TIME_Absolute timestamp,
+ const json_t *contract_terms);
+
/**
* Insert proposal data into db; the routine will internally hash and
@@ -238,6 +255,22 @@ struct TALER_MERCHANTDB_Plugin
const char *order_id,
const struct TALER_MerchantPublicKeyP *merchant_pub);
+ /**
+ * Retrieve order given its order id and the instance's merchant public key.
+ *
+ * @param cls closure
+ * @param[out] contract_terms where to store the retrieved contract terms
+ * @param order id order id used to perform the lookup
+ * @param merchant_pub merchant public key that identifies the instance
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*find_orders) (void *cls,
+ json_t **contract_terms,
+ const char *order_id,
+ const struct TALER_MerchantPublicKeyP *merchant_pub);
+
+
/**
* Retrieve proposal data given its hashcode