X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.h;h=0369067887ada3cab2c851cc7f99d5ad42b24ed8;hp=4f877e0ecb2f3407b8e475f99768facc12df03da;hb=06a86a60a7dabc685bdbd81ce3d36ea5f7e2c2d4;hpb=1ecde57a53fc7c50e6b0139ad745b868413d420c diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h index 4f877e0e..03690678 100644 --- a/src/daemon/plugin.h +++ b/src/daemon/plugin.h @@ -36,23 +36,19 @@ #include -#ifndef DATA_MAX_NAME_LEN -#define DATA_MAX_NAME_LEN 128 -#endif - #define DS_TYPE_COUNTER 0 #define DS_TYPE_GAUGE 1 #define DS_TYPE_DERIVE 2 #define DS_TYPE_ABSOLUTE 3 #define DS_TYPE_TO_STRING(t) \ - (t == DS_TYPE_COUNTER) ? "counter" : (t == DS_TYPE_GAUGE) \ - ? "gauge" \ - : (t == DS_TYPE_DERIVE) \ - ? "derive" \ - : (t == DS_TYPE_ABSOLUTE) \ - ? "absolute" \ - : "unknown" + (t == DS_TYPE_COUNTER) \ + ? "counter" \ + : (t == DS_TYPE_GAUGE) \ + ? "gauge" \ + : (t == DS_TYPE_DERIVE) \ + ? "derive" \ + : (t == DS_TYPE_ABSOLUTE) ? "absolute" : "unknown" #ifndef LOG_ERR #define LOG_ERR 3 @@ -151,7 +147,7 @@ typedef struct notification_meta_s { int64_t nm_signed_int; uint64_t nm_unsigned_int; double nm_double; - _Bool nm_boolean; + bool nm_boolean; } nm_value; struct notification_meta_s *next; } notification_meta_t; @@ -234,7 +230,7 @@ void plugin_set_dir(const char *dir); * Re-loading an already loaded module is detected and zero is returned in * this case. */ -int plugin_load(const char *name, _Bool global); +int plugin_load(const char *name, bool global); int plugin_init_all(void); void plugin_read_all(void); @@ -350,7 +346,7 @@ int plugin_dispatch_values(value_list_t const *vl); * plugin_dispatch_multivalue * * SYNOPSIS - * plugin_dispatch_multivalue (vl, 1, DS_TYPE_GAUGE, + * plugin_dispatch_multivalue (vl, true, DS_TYPE_GAUGE, * "free", 42.0, * "used", 58.0, * NULL); @@ -378,7 +374,7 @@ int plugin_dispatch_values(value_list_t const *vl); * The number of values it failed to dispatch (zero on success). */ __attribute__((sentinel)) int plugin_dispatch_multivalue(value_list_t const *vl, - _Bool store_percentage, + bool store_percentage, int store_type, ...); int plugin_dispatch_missing(const value_list_t *vl); @@ -413,7 +409,7 @@ int plugin_notification_meta_add_unsigned_int(notification_t *n, int plugin_notification_meta_add_double(notification_t *n, const char *name, double value); int plugin_notification_meta_add_boolean(notification_t *n, const char *name, - _Bool value); + bool value); int plugin_notification_meta_copy(notification_t *dst, const notification_t *src);