X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fplugin.h;h=dd65b5982c6eb6ca80e5f8b63d947a00a05ca132;hb=77311aed583ac4566d76f1ce3a1dc9deae2e59dc;hp=4d5201b68d3bd0b532630a0cef3ed211c72a2fed;hpb=a06c1a5201303c3b0bd0c330d733916cbf20d568;p=collectd.git diff --git a/src/plugin.h b/src/plugin.h index 4d5201b6..dd65b598 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -2,7 +2,7 @@ #define PLUGIN_H /** * collectd - src/plugin.h - * Copyright (C) 2005-2010 Florian octo Forster + * Copyright (C) 2005-2011 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 @@ -281,7 +281,7 @@ int plugin_register_flush (const char *name, plugin_flush_cb callback, user_data_t *user_data); int plugin_register_missing (const char *name, plugin_missing_cb callback, user_data_t *user_data); -int plugin_register_shutdown (char *name, +int plugin_register_shutdown (const char *name, plugin_shutdown_cb callback); int plugin_register_data_set (const data_set_t *ds); int plugin_register_log (const char *name, @@ -318,6 +318,7 @@ int plugin_unregister_notification (const char *name); * function. */ int plugin_dispatch_values (value_list_t *vl); +int plugin_dispatch_values_secure (const value_list_t *vl); int plugin_dispatch_missing (const value_list_t *vl); int plugin_dispatch_notification (const notification_t *notif); @@ -325,6 +326,10 @@ int plugin_dispatch_notification (const notification_t *notif); void plugin_log (int level, const char *format, ...) __attribute__ ((format(printf,2,3))); +/* These functions return the parsed severity or less than zero on failure. */ +int parse_log_severity (const char *severity); +int parse_notif_severity (const char *severity); + #define ERROR(...) plugin_log (LOG_ERR, __VA_ARGS__) #define WARNING(...) plugin_log (LOG_WARNING, __VA_ARGS__) #define NOTICE(...) plugin_log (LOG_NOTICE, __VA_ARGS__)