X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.h;h=9c1d72e107b3d1b1f2c11a06593b33eb2605d515;hb=1961988253c1f5b29a52343a34d291929e84fcf1;hp=a63f5cdc6e5e189e0461cf982f117e6d48b55a0f;hpb=01e2d29ebc5dec07daab935da3fcee5bb9c7d620;p=collectd.git diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h index a63f5cdc..9c1d72e1 100644 --- a/src/daemon/plugin.h +++ b/src/daemon/plugin.h @@ -1,5 +1,5 @@ /** - * collectd - src/plugin.h + * collectd - src/daemon/plugin.h * Copyright (C) 2005-2014 Florian octo Forster * * Permission is hereby granted, free of charge, to any person obtaining a @@ -29,17 +29,18 @@ #define PLUGIN_H #include "collectd.h" + #include "configfile.h" #include "meta_data.h" #include "utils_time.h" -#if HAVE_PTHREAD_H -# include -#endif +#include #define PLUGIN_FLAGS_GLOBAL 0x0001 -#define DATA_MAX_NAME_LEN 64 +#ifndef DATA_MAX_NAME_LEN +# define DATA_MAX_NAME_LEN 128 +#endif #define DS_TYPE_COUNTER 0 #define DS_TYPE_GAUGE 1 @@ -109,9 +110,7 @@ struct value_list_s }; typedef struct value_list_s value_list_t; -#define VALUE_LIST_INIT { NULL, 0, 0, plugin_get_interval (), \ - "localhost", "", "", "", "", NULL } -#define VALUE_LIST_STATIC { NULL, 0, 0, 0, "localhost", "", "", "", "", NULL } +#define VALUE_LIST_INIT { .values = NULL, .meta = NULL } struct data_source_s { @@ -200,7 +199,6 @@ typedef void (*plugin_log_cb) (int severity, const char *message, typedef int (*plugin_shutdown_cb) (void); typedef int (*plugin_notification_cb) (const notification_t *, user_data_t *); - /* * NAME * plugin_set_dir @@ -240,10 +238,10 @@ void plugin_set_dir (const char *dir); */ int plugin_load (const char *name, uint32_t flags); -void plugin_init_all (void); +int plugin_init_all (void); void plugin_read_all (void); int plugin_read_all_once (void); -void plugin_shutdown_all (void); +int plugin_shutdown_all (void); /* * NAME