diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-01-11 15:24:43 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-01-21 15:41:02 +0100 |
commit | 0b56de6c994d3e525aa2d0195ff4607db3f14715 (patch) | |
tree | 9f34c40155dd5538841497c9f6a151deb2305a8d /src/include/taler_extensions.h | |
parent | 0b6ebc6160f1fd1f6db7c433f0912b5d2845a59c (diff) | |
download | exchange-0b56de6c994d3e525aa2d0195ff4607db3f14715.tar.xz |
[age restriction] progress 12/n
- taler-offline-tool now handles extensions
- command "extensions" added with subcommands "show" and "sign"
- parses extensions from taler config
- shows and signs of extensions and their configurations
- creates signed set of configurations for upload
- added test for retrieval of extension config
- simplified signature verification for extensions
- remove per-extension signatures, also from DB schema
- adjust prepared statements accordingly
- adjust DB event handler for extensions
- allow NULL for config for extension in DB schema
- handler for /management/extensions adjusted to new datastructures
- changed test for TALER_denom_blind/TALER_denom_sign_blinded with and
without TALER_AgeHash
- minor updates and various fixes
Diffstat (limited to 'src/include/taler_extensions.h')
-rw-r--r-- | src/include/taler_extensions.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/include/taler_extensions.h b/src/include/taler_extensions.h index 243811eb5..31e5c6738 100644 --- a/src/include/taler_extensions.h +++ b/src/include/taler_extensions.h @@ -28,29 +28,22 @@ #define TALER_EXTENSION_SECTION_PREFIX "exchange-extension-" -enum TALER_Extension_ReturnValue -{ - TALER_Extension_OK = 0, - TALER_Extension_ERROR_PARSING = 1, - TALER_Extension_ERROR_INVALID = 2, - TALER_Extension_ERROR_SYS = 3 -}; - enum TALER_Extension_Type { TALER_Extension_AgeRestriction = 0, TALER_Extension_Peer2Peer = 1, - TALER_Extension_Max = 2 // Must be last + TALER_Extension_MaxPredefined = 2 // Must be last }; /* - * TODO oec: documentation + * Represents the implementation of an extension. */ struct TALER_Extension { enum TALER_Extension_Type type; char *name; bool critical; + bool enabled; void *config; enum GNUNET_GenericReturnValue (*test_config)(const json_t *config); @@ -68,7 +61,7 @@ struct TALER_Extension * Finds and returns a supported extension by a given name. * * @param name name of the extension to lookup - * @param extensions list of TALER_Extensions as haystack, terminated by an entry of type TALER_Extension_Max + * @param extensions list of TALER_Extensions as haystack, terminated by a NULL-entry * @param[out] ext set to the extension, if found, NULL otherwise * @return GNUNET_OK if extension was found, GNUNET_NO otherwise */ @@ -109,7 +102,7 @@ TALER_extension_get_by_name (const char *name, * @param[out] mask Mask representation for age restriction. * @return Error, if age groups were invalid, OK otherwise. */ -enum TALER_Extension_ReturnValue +enum GNUNET_GenericReturnValue TALER_parse_age_group_string (const char *groups, struct TALER_AgeMask *mask); @@ -133,7 +126,7 @@ TALER_age_mask_to_string (const struct TALER_AgeMask *mask); * @return Error if extension for age restriction was set but age groups were * invalid, OK otherwise. */ -enum TALER_Extension_ReturnValue +enum GNUNET_GenericReturnValue TALER_get_age_mask (const struct GNUNET_CONFIGURATION_Handle *cfg, struct TALER_AgeMask *mask); |