X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fplugin.h;h=45e9b494fc60634b568ee6a7f0d9bc4bc263656f;hb=44d73d6556833bcfbc4678a01731aafee95c3caf;hp=baef3280095338561fd6f937751ba357a2013468;hpb=f5f5ac9aa1e7188c4f3ef197535b43e7044d7199;p=collectd.git diff --git a/src/plugin.h b/src/plugin.h index baef3280..45e9b494 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -1,6 +1,9 @@ +#ifndef PLUGIN_H +#define PLUGIN_H + /** * collectd - src/plugin.h - * Copyright (C) 2005 Florian octo Forster + * Copyright (C) 2005,2006 Florian octo Forster * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -20,8 +23,14 @@ * Florian octo Forster **/ -#ifndef PLUGIN_H -#define PLUGIN_H +/* + * + */ +typedef struct complain_s +{ + unsigned int interval; /* how long we wait for reporting this error again */ + unsigned int delay; /* how many more iterations we still need to wait */ +} complain_t; /* * NAME @@ -90,13 +99,17 @@ int plugin_load (const char *type); int plugin_load_all (char *dir); void plugin_init_all (void); -void plugin_read_all (void); +void plugin_read_all (const int *loop); + +void plugin_shutdown_all (void); void plugin_register (char *type, void (*init) (void), void (*read) (void), void (*write) (char *, char *, char *)); +int plugin_register_shutdown (char *, void (*) (void)); + /* * NAME * plugin_write @@ -117,4 +130,8 @@ void plugin_write (char *host, char *type, char *inst, char *val); void plugin_submit (char *type, char *inst, char *val); + +void plugin_complain (int level, complain_t *c, const char *format, ...); +void plugin_relief (int level, complain_t *c, const char *format, ...); + #endif /* PLUGIN_H */