aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_mhd_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-12-10 21:20:38 +0100
committerChristian Grothoff <christian@grothoff.org>2019-12-10 21:20:38 +0100
commit75240345d025ce448b7248a4ec693261ecf8a203 (patch)
treed1449462f777c73af2742a247795c44fe62a37b3 /src/include/taler_mhd_lib.h
parent496b9ba6a97ba03f2fa3ca1a8eebae270f008349 (diff)
writing generic tos/pp handler logic
Diffstat (limited to 'src/include/taler_mhd_lib.h')
-rw-r--r--src/include/taler_mhd_lib.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/include/taler_mhd_lib.h b/src/include/taler_mhd_lib.h
index cdbc8d290..6aefbd778 100644
--- a/src/include/taler_mhd_lib.h
+++ b/src/include/taler_mhd_lib.h
@@ -390,4 +390,55 @@ TALER_MHD_bind (const struct GNUNET_CONFIGURATION_Handle *cfg,
const char *section,
uint16_t *port);
+
+/**
+ * Prepared responses for legal documents
+ * (terms of service, privacy policy).
+ */
+struct TALER_MHD_Legal;
+
+
+/**
+ * Load set of legal documents as specified in
+ * @a cfg in section @a section where the Etag
+ * is given under the @param tagoption and the
+ * directory under the @a diroption.
+ *
+ * @param cfg configuration to use
+ * @param section section to load values from
+ * @param diroption name of the option with the
+ * path to the legal documents
+ * @param tagoption name of the files to use
+ * for the legal documents and the Etag
+ * @return NULL on error
+ */
+struct TALER_MHD_Legal *
+TALER_MHD_legal_load (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *diroption,
+ const char *tagoption);
+
+
+/**
+ * Free set of legal documents
+ *
+ * @param leg legal documents to free
+ */
+void
+TALER_MHD_legal_free (struct TALER_MHD_Legal *legal);
+
+
+/**
+ * Generate a response with a legal document in
+ * the format and language of the user's choosing.
+ *
+ * @param conn HTTP connection to handle
+ * @param legal legal document to serve
+ * @return MHD result code
+ */
+int
+TALER_MHD_reply_legal (struct MHD_Connection *conn,
+ struct TALER_MHD_Legal *legal);
+
+
#endif