summaryrefslogtreecommitdiffstats
path: root/src/libnetdata/config/appconfig_api_numbers.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/libnetdata/config/appconfig_api_numbers.h
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libnetdata/config/appconfig_api_numbers.h')
-rw-r--r--src/libnetdata/config/appconfig_api_numbers.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libnetdata/config/appconfig_api_numbers.h b/src/libnetdata/config/appconfig_api_numbers.h
new file mode 100644
index 000000000..58d382e3d
--- /dev/null
+++ b/src/libnetdata/config/appconfig_api_numbers.h
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_APPCONFIG_API_NUMBERS_H
+#define NETDATA_APPCONFIG_API_NUMBERS_H
+
+long long appconfig_get_number(struct config *root, const char *section, const char *name, long long value);
+long long appconfig_set_number(struct config *root, const char *section, const char *name, long long value);
+#define config_get_number(section, name, value) appconfig_get_number(&netdata_config, section, name, value)
+#define config_set_number(section, name, value) appconfig_set_number(&netdata_config, section, name, value)
+
+NETDATA_DOUBLE appconfig_get_double(struct config *root, const char *section, const char *name, NETDATA_DOUBLE value);
+NETDATA_DOUBLE appconfig_set_double(struct config *root, const char *section, const char *name, NETDATA_DOUBLE value);
+#define config_get_double(section, name, value) appconfig_get_double(&netdata_config, section, name, value)
+#define config_set_double(section, name, value) appconfig_set_float(&netdata_config, section, name, value)
+
+#endif //NETDATA_APPCONFIG_API_NUMBERS_H