summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-17 15:11:16 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-17 15:11:16 +0200
commit00a03bf279e21ce4e87fbc0dc54fef37de84c297 (patch)
treed1e315fd0bfad1a5d77b76d501c5c9196aa1b3b0 /src/backend/taler-merchant-httpd.h
parent0b8e550d09635f762033626c8c12b7b4a0d0faf7 (diff)
downloadmerchant-00a03bf279e21ce4e87fbc0dc54fef37de84c297.tar.gz
merchant-00a03bf279e21ce4e87fbc0dc54fef37de84c297.tar.bz2
merchant-00a03bf279e21ce4e87fbc0dc54fef37de84c297.zip
sketch instance loading
Diffstat (limited to 'src/backend/taler-merchant-httpd.h')
-rw-r--r--src/backend/taler-merchant-httpd.h75
1 files changed, 25 insertions, 50 deletions
diff --git a/src/backend/taler-merchant-httpd.h b/src/backend/taler-merchant-httpd.h
index b2e1a599..52563e77 100644
--- a/src/backend/taler-merchant-httpd.h
+++ b/src/backend/taler-merchant-httpd.h
@@ -95,11 +95,6 @@ struct TMH_MerchantInstance
char *name;
/**
- * File holding the merchant's private key
- */
- char *keyfile;
-
- /**
* Next entry in DLL.
*/
struct TMH_WireMethod *wm_head;
@@ -110,7 +105,7 @@ struct TMH_MerchantInstance
struct TMH_WireMethod *wm_tail;
/**
- * Merchant's private key
+ * Merchant's private key.
*/
struct TALER_MerchantPrivateKeyP privkey;
@@ -120,54 +115,15 @@ struct TMH_MerchantInstance
struct TALER_MerchantPublicKeyP pubkey;
/**
- * Default maximum wire fee to assume, unless stated differently in the proposal
- * already.
- */
- struct TALER_Amount default_max_wire_fee;
-
- /**
- * Default max deposit fee that the merchant is willing to
- * pay; if deposit costs more, then the customer will cover
- * the difference.
- */
- struct TALER_Amount default_max_deposit_fee;
-
- /**
- * Default factor for wire fee amortization.
- */
- unsigned long long default_wire_fee_amortization;
-
- /**
- * If the frontend does NOT specify an execution date, how long should
- * we tell the exchange to wait to aggregate transactions before
- * executing the wire transfer? This delay is added to the current
- * time when we generate the advisory execution time for the exchange.
- */
- struct GNUNET_TIME_Relative default_wire_transfer_delay;
-
- /**
- * If the frontend does NOT specify a payment deadline, how long should
- * offers we make be valid by default?
- */
- struct GNUNET_TIME_Relative default_pay_deadline;
-
- /**
- * Exchange this instance uses for tipping, NULL if tipping
- * is not supported.
- */
- char *tip_exchange;
-
- /**
- * Locations from the configuration. Mapping from
- * label to location data.
+ * General settings for an instance.
*/
- json_t *default_locations;
+ struct TALER_MERCHANTDB_InstanceSettings settings;
/**
- * What is the private key of the reserve used for signing tips by this exchange?
- * Only valid if @e tip_exchange is non-null.
+ * Reference counter on this structure. Only destroyed if the
+ * counter hits zero.
*/
- struct TALER_ReservePrivateKeyP tip_reserve;
+ unsigned int rc;
};
@@ -444,4 +400,23 @@ TMH_long_poll_resume (const char *order_id,
const struct TALER_Amount *refund_amount);
+/**
+ * Decrement reference counter of @a mi, and free if it hits zero.
+ *
+ * @param[in,out] mi merchant instance to update and possibly free
+ */
+void
+TMH_instance_decref (struct TMH_MerchantInstance *mi);
+
+
+/**
+ * Add instance definition to our active set of instances.
+ *
+ * @param[in,out] mi merchant instance details to define
+ * @return #GNUNET_OK on success, #GNUNET_NO if the same ID is in use already
+ */
+int
+TMH_add_instance (struct TMH_MerchantInstance *mi);
+
+
#endif