nut plugin: Added a plugin to query the `upsd' from the `network ups tools'.
[collectd.git] / src / plugin.h
index f88bc48..0164e9c 100644 (file)
 /*
  * Public data types
  */
+enum modreg
+{
+       MR_EVERYTHING = 7,
+       MR_DATASETS   = 1,
+       MR_READ       = 2,
+       MR_WRITE      = 4
+};
+typedef enum modreg modreg_e;
+
 typedef unsigned long long counter_t;
 typedef double gauge_t;
 
@@ -119,7 +128,8 @@ void plugin_set_dir (const char *dir);
  *  functions.
  *
  * ARGUMENTS
- *  `type'      Name of the plugin to load.
+ *  `name'      Name of the plugin to load.
+ *  `mr'        Types of functions to request from the plugin.
  *
  * RETURN VALUE
  *  Returns zero upon success, a value greater than zero if no plugin was found
@@ -128,7 +138,7 @@ void plugin_set_dir (const char *dir);
  * NOTES
  *  No attempt is made to re-load an already loaded module.
  */
-int  plugin_load (const char *name);
+int plugin_load (const char *name, modreg_e mr);
 
 void plugin_init_all (void);
 void plugin_read_all (const int *loop);
@@ -154,6 +164,7 @@ int plugin_register_data_set (const data_set_t *ds);
 int plugin_register_log (char *name,
                void (*callback) (int, const char *));
 
+int plugin_unregister_config (const char *name);
 int plugin_unregister_init (const char *name);
 int plugin_unregister_read (const char *name);
 int plugin_unregister_write (const char *name);