diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-07-20 17:57:59 +0200 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2018-07-25 15:12:48 +0200 |
commit | f96bbb49cc9bcd81693300191cf7a01b879fd83d (patch) | |
tree | 0d50513ecaab432ce2a4fbd73175363b49545b7e /src/afb-hook-flags.h | |
parent | fe9601cbf6bbebe9464bfbde2efd0ec278b3e243 (diff) |
afb-config: Rewrite the config as JSON object
Despite its poor performance, this changes is good
at the end because:
- it allows to put config in files
- it removes dirty code to translate to JSON
- it removes dirty code to dump the config
- it unifies code for scanning hook's flag's names
- it improves unity of naming between option's names and JSON's names
Change-Id: I2487c8746d78a0cff80505a12b9fa60e40da9951
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-hook-flags.h')
-rw-r--r-- | src/afb-hook-flags.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/afb-hook-flags.h b/src/afb-hook-flags.h new file mode 100644 index 00000000..5b373c25 --- /dev/null +++ b/src/afb-hook-flags.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2018 "IoT.bzh" + * Author José Bollo <jose.bollo@iot.bzh> + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +extern int afb_hook_flags_xreq_from_text(const char *text); +extern int afb_hook_flags_api_from_text(const char *text); +extern int afb_hook_flags_evt_from_text(const char *text); +extern int afb_hook_flags_session_from_text(const char *text); +extern int afb_hook_flags_global_from_text(const char *text); + +extern char *afb_hook_flags_xreq_to_text(int value); +extern char *afb_hook_flags_api_to_text(int value); +extern char *afb_hook_flags_evt_to_text(int value); +extern char *afb_hook_flags_session_to_text(int value); + +#if !defined(REMOVE_LEGACY_TRACE) +extern int afb_hook_flags_legacy_ditf_from_text(const char *text); +extern int afb_hook_flags_legacy_svc_from_text(const char *text); + +extern char *afb_hook_flags_legacy_ditf_to_text(int value); +extern char *afb_hook_flags_legacy_svc_to_text(int value); +#endif + |