summaryrefslogtreecommitdiff
path: root/src/include/taler_bank_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-02 14:24:45 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-02 14:29:44 +0200
commitcb55c1a3af9f56a6da38e5589e72df0b70d355b1 (patch)
tree5f9a3af7d9073249f77ce56c690844a6cb27c3e7 /src/include/taler_bank_service.h
parent7a20062bafed42f937c5388aed09042aad7014c0 (diff)
downloadexchange-cb55c1a3af9f56a6da38e5589e72df0b70d355b1.tar.gz
exchange-cb55c1a3af9f56a6da38e5589e72df0b70d355b1.tar.bz2
exchange-cb55c1a3af9f56a6da38e5589e72df0b70d355b1.zip
Changing configuration structure to enable multiple accounts.
This change enables using multiple wire plugins at the same time. Also, we now distinguish between the wire plugin (i.e. EBICS or taler_bank) and the wire method (i.e. SEPA or x-taler-bank) that the wire plugin is implementing. The "taler-bank" wire method was renamed from "test" to "x-taler-bank". This also changes the format of the /wire response of the exchange, as we now need to return multiple accounts. Note that wire fees are specified per wire method, not per wire account. taler-exchange-keyup now automatically signs all of the /wire responses in the location specified by the configuration. Account identification in wire plugins was changed to use payto://-URLs instead of method-specific JSON fields. Signing and validation of /wire responses was moved from each wire plugin to a generic validation method in libtalerutil (crypto) or libtalerjson (for JSON-formatted inputs). Convenience methods were added to generate JSON for wire accounts (salting, signing). Various section and option names were adjusted to streamline the configuration and make it more consistent overall. Documentation was updated as well.
Diffstat (limited to 'src/include/taler_bank_service.h')
-rw-r--r--src/include/taler_bank_service.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h
index bfa050336..1cad5710a 100644
--- a/src/include/taler_bank_service.h
+++ b/src/include/taler_bank_service.h
@@ -217,9 +217,9 @@ struct TALER_BANK_TransferDetails
char *wire_transfer_subject;
/**
- * The other account that was involved
+ * payto://-URL of the other account that was involved
*/
- json_t *account_details;
+ char *account_url;
};
@@ -347,4 +347,29 @@ void
TALER_BANK_reject_cancel (struct TALER_BANK_RejectHandle *rh);
+/**
+ * Convenience method for parsing configuration section with bank
+ * authentication data. The section must contain an option
+ * "METHOD", plus other options that depend on the METHOD specified.
+ *
+ * @param cfg configuration to parse
+ * @param section the section with the configuration data
+ * @param auth[out] set to the configuration data found
+ * @return #GNUNET_OK on success
+ */
+int
+TALER_BANK_auth_parse_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ struct TALER_BANK_AuthenticationData *auth);
+
+
+/**
+ * Free memory inside of @a auth (but not auth itself).
+ * Dual to #TALER_BANK_auth_parse_cfg().
+ *
+ * @param auth authentication data to free
+ */
+void
+TALER_BANK_auth_free (struct TALER_BANK_AuthenticationData *auth);
+
#endif /* _TALER_BANK_SERVICE_H */