summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 13:38:59 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 13:38:59 +0200
commitbd76ae195ba95ef18bb1d91f7e3ff7501543bf1c (patch)
treea64ee396a59ff5e579c62e6f712670de3f5855a1
parent755e752e3a235df0be8d45374835b109f7843c1c (diff)
new DB events registry
-rw-r--r--gnu-taler-db-events/.gitignore2
-rw-r--r--gnu-taler-db-events/Makefile20
-rw-r--r--gnu-taler-db-events/h.footer13
-rw-r--r--gnu-taler-db-events/h.header46
-rw-r--r--gnu-taler-db-events/h.template6
-rw-r--r--gnu-taler-db-events/registry.rec27
-rw-r--r--gnu-taler-error-codes/registry.rec2
7 files changed, 115 insertions, 1 deletions
diff --git a/gnu-taler-db-events/.gitignore b/gnu-taler-db-events/.gitignore
new file mode 100644
index 0000000..bb3e68e
--- /dev/null
+++ b/gnu-taler-db-events/.gitignore
@@ -0,0 +1,2 @@
+taler_dbevents.h
+taler_dbevents.h.tmp
diff --git a/gnu-taler-db-events/Makefile b/gnu-taler-db-events/Makefile
new file mode 100644
index 0000000..194ba50
--- /dev/null
+++ b/gnu-taler-db-events/Makefile
@@ -0,0 +1,20 @@
+FILES=taler_dbevents.h
+
+all: check $(FILES)
+
+check: registry.rec
+ recfix --check registry.rec
+
+distclean:
+ rm -f *.tmp
+
+clean:
+ rm -f $(FILES) *.tmp
+
+taler_dbevents.h.tmp: registry.rec h.template
+ ../format.sh h.template < registry.rec > $@
+
+taler_dbevents.h: h.header taler_dbevents.h.tmp h.footer
+ cat $^ > $@
+
+.PHONY: check clean distclean
diff --git a/gnu-taler-db-events/h.footer b/gnu-taler-db-events/h.footer
new file mode 100644
index 0000000..5d32ee9
--- /dev/null
+++ b/gnu-taler-db-events/h.footer
@@ -0,0 +1,13 @@
+
+
+};
+
+
+#if 0 /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/gnu-taler-db-events/h.header b/gnu-taler-db-events/h.header
new file mode 100644
index 0000000..34704e0
--- /dev/null
+++ b/gnu-taler-db-events/h.header
@@ -0,0 +1,46 @@
+/*
+ This file is part of GNU Taler
+ Copyright (C) 2012-2021 Taler Systems SA
+
+ GNU Taler is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: LGPL3.0-or-later
+
+ Note: the LGPL does not apply to all components of GNU Taler,
+ but it does apply to this file.
+ */
+ /**
+ * @file include/taler_dbevents.h
+ * @brief GNU Taler database event types, generated via https://gana.gnunet.org/
+ *
+ * Do NOT edit this file, it is generated!
+ */
+#ifndef GNU_TALER_DBEVENTS_H
+#define GNU_TALER_DBEVENTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#if 0 /* keep Emacsens' auto-indent happy */
+}
+#endif
+#endif
+
+#include <limits.h>
+
+
+/**
+ * Taler database event types.
+ */
+enum TALER_DbEventType
+{
diff --git a/gnu-taler-db-events/h.template b/gnu-taler-db-events/h.template
new file mode 100644
index 0000000..5282e8d
--- /dev/null
+++ b/gnu-taler-db-events/h.template
@@ -0,0 +1,6 @@
+
+
+ /**
+ * {{Description}}
+ */
+ TALER_DBEVENT_{{Name}} = {{Value}},
diff --git a/gnu-taler-db-events/registry.rec b/gnu-taler-db-events/registry.rec
new file mode 100644
index 0000000..fe60af2
--- /dev/null
+++ b/gnu-taler-db-events/registry.rec
@@ -0,0 +1,27 @@
+# -*- mode: rec -*-
+#
+# Registry for Taler database event trigger types
+#
+%rec: TalerDatabaseEventTriggerTypes
+%key: Value
+%typedef: ValueRange_t range 0 65535
+%type: Value ValueRange_t
+%mandatory: Value
+%typedef: Description_t regexp |^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\(\)\.,;!"':#\/ -]*$|
+%type: Description Description_t
+%mandatory: Description
+%typedef: Name_t regexp /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*$/
+%type: Name Name_t
+%unique: Name
+%mandatory: Name
+%sort: Value
+
+# 0 - 999: Reserved for GNUnet
+
+# 1000-1099: For Taler Exchange
+
+# 1100-1199: For Taler Merchant
+
+Value: 1100
+Name: MERCHANT_INSTANCE_SETTINGS
+Description: Some instance setting was changed (new instance, deleted instance, change options)
diff --git a/gnu-taler-error-codes/registry.rec b/gnu-taler-error-codes/registry.rec
index 9a1aab9..7a2c539 100644
--- a/gnu-taler-error-codes/registry.rec
+++ b/gnu-taler-error-codes/registry.rec
@@ -947,7 +947,7 @@ HttpStatus: 502
Value: 2200
Name: MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH
Description: The contract hash does not match the given order ID.
-HttpStatus: 409
+HttpStatus: 400
Value: 2201
Name: MERCHANT_POST_ORDERS_ID_PAID_COIN_SIGNATURE_INVALID