diff options
author | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-06-10 21:25:13 -0400 |
---|---|---|
committer | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-06-10 21:25:13 -0400 |
commit | 726a1ff5748a7debf284377b39ce3de2f72b7f4f (patch) | |
tree | 17d95e463c4c1b1e31e51d6cf5e027906ebb666c /gnu-taler-error-codes | |
parent | d9a74736b8de37a157ffbaa6c917384b0b565034 (diff) |
generation of taler error codes in kotlin and typescript
Diffstat (limited to 'gnu-taler-error-codes')
-rw-r--r-- | gnu-taler-error-codes/.gitignore | 4 | ||||
-rw-r--r-- | gnu-taler-error-codes/Makefile | 16 | ||||
-rw-r--r-- | gnu-taler-error-codes/kt.footer | 3 | ||||
-rw-r--r-- | gnu-taler-error-codes/kt.header | 25 | ||||
-rw-r--r-- | gnu-taler-error-codes/kt.template | 8 | ||||
-rw-r--r-- | gnu-taler-error-codes/ts.footer | 3 | ||||
-rw-r--r-- | gnu-taler-error-codes/ts.header | 24 | ||||
-rw-r--r-- | gnu-taler-error-codes/ts.template | 8 |
8 files changed, 90 insertions, 1 deletions
diff --git a/gnu-taler-error-codes/.gitignore b/gnu-taler-error-codes/.gitignore index 9ce0634..9111c0f 100644 --- a/gnu-taler-error-codes/.gitignore +++ b/gnu-taler-error-codes/.gitignore @@ -1,4 +1,8 @@ taler-error-codes.h +taler-error-codes.ts +taler-error-codes.kt combined.tmp taler-error-codes.h.tmp +taler-error-codes.ts.tmp +taler-error-codes.kt.tmp diff --git a/gnu-taler-error-codes/Makefile b/gnu-taler-error-codes/Makefile index b95669f..c0bb208 100644 --- a/gnu-taler-error-codes/Makefile +++ b/gnu-taler-error-codes/Makefile @@ -1,4 +1,6 @@ -FILES=taler-error-codes.h +FILES=taler-error-codes.h \ + taler-error-codes.ts \ + taler-error-codes.kt all: check $(FILES) check: registry.rec recfix --check registry.rec @@ -21,5 +23,17 @@ taler-error-codes.h.tmp: combined.tmp h.template taler-error-codes.h: h.header taler-error-codes.h.tmp h.footer cat $^ > $@ +taler-error-codes.ts.tmp: combined.tmp ts.template + ../format.sh ts.template < combined.tmp > $@ + +taler-error-codes.ts: ts.header taler-error-codes.ts.tmp ts.footer + cat $^ > $@ + +taler-error-codes.kt.tmp: combined.tmp kt.template + ../format.sh kt.template < combined.tmp > $@ + +taler-error-codes.kt: kt.header taler-error-codes.kt.tmp kt.footer + cat $^ > $@ + .PHONY: check clean distclean prep diff --git a/gnu-taler-error-codes/kt.footer b/gnu-taler-error-codes/kt.footer new file mode 100644 index 0000000..b285e7d --- /dev/null +++ b/gnu-taler-error-codes/kt.footer @@ -0,0 +1,3 @@ + + +} diff --git a/gnu-taler-error-codes/kt.header b/gnu-taler-error-codes/kt.header new file mode 100644 index 0000000..0abbb6e --- /dev/null +++ b/gnu-taler-error-codes/kt.header @@ -0,0 +1,25 @@ +/* + This file is part of GNU Taler + Copyright (C) 2012-2020 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. + */ +package net.taler.common.errorcodes + +enum class TalerErrorCode(val code: Int) { diff --git a/gnu-taler-error-codes/kt.template b/gnu-taler-error-codes/kt.template new file mode 100644 index 0000000..9934b7e --- /dev/null +++ b/gnu-taler-error-codes/kt.template @@ -0,0 +1,8 @@ + + + /** + * {{Description}} + * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_{{Name}}({{Value}}), diff --git a/gnu-taler-error-codes/ts.footer b/gnu-taler-error-codes/ts.footer new file mode 100644 index 0000000..b285e7d --- /dev/null +++ b/gnu-taler-error-codes/ts.footer @@ -0,0 +1,3 @@ + + +} diff --git a/gnu-taler-error-codes/ts.header b/gnu-taler-error-codes/ts.header new file mode 100644 index 0000000..21c7178 --- /dev/null +++ b/gnu-taler-error-codes/ts.header @@ -0,0 +1,24 @@ +/* + This file is part of GNU Taler + Copyright (C) 2012-2020 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. + */ + +export enum TalerErrorCode { diff --git a/gnu-taler-error-codes/ts.template b/gnu-taler-error-codes/ts.template new file mode 100644 index 0000000..366aafb --- /dev/null +++ b/gnu-taler-error-codes/ts.template @@ -0,0 +1,8 @@ + + + /** + * {{Description}} + * Returned with an HTTP status code of #MHD_HTTP_{{HttpStatus_Identifier}} ({{HttpStatus_Value}}). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_{{Name}} = {{Value}}, |