cfgfile: Remove trailing whitespace in variable values
[nagios-reports-module.git] / nagios / nebmodules.h
blobbb279e87863d3ec055ff48cd8e2a9d3b8e2cd0d7
1 /*****************************************************************************
3 * NEBMODULES.H - Include file for event broker modules
5 * Copyright (c) 2002-2006 Ethan Galstad (nagios@nagios.org)
6 * Last Modified: 02-27-2006
8 * License:
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *****************************************************************************/
25 #ifndef _NEBMODULES_H
26 #define _NEBMODULES_H
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 /***** MODULE VERSION INFORMATION *****/
34 #define NEB_API_VERSION(x) int __neb_api_version = x;
35 #define CURRENT_NEB_API_VERSION 3
39 /***** MODULE INFORMATION *****/
41 #define NEBMODULE_MODINFO_NUMITEMS 6
42 #define NEBMODULE_MODINFO_TITLE 0
43 #define NEBMODULE_MODINFO_AUTHOR 1
44 #define NEBMODULE_MODINFO_COPYRIGHT 2
45 #define NEBMODULE_MODINFO_VERSION 3
46 #define NEBMODULE_MODINFO_LICENSE 4
47 #define NEBMODULE_MODINFO_DESC 5
51 /***** MODULE LOAD/UNLOAD OPTIONS *****/
53 #define NEBMODULE_NORMAL_LOAD 0 /* module is being loaded normally */
54 #define NEBMODULE_REQUEST_UNLOAD 0 /* request module to unload (but don't force it) */
55 #define NEBMODULE_FORCE_UNLOAD 1 /* force module to unload */
59 /***** MODULES UNLOAD REASONS *****/
61 #define NEBMODULE_NEB_SHUTDOWN 1 /* event broker is shutting down */
62 #define NEBMODULE_NEB_RESTART 2 /* event broker is restarting */
63 #define NEBMODULE_ERROR_NO_INIT 3 /* _module_init() function was not found in module */
64 #define NEBMODULE_ERROR_BAD_INIT 4 /* _module_init() function returned a bad code */
65 #define NEBMODULE_ERROR_API_VERSION 5 /* module version is incompatible with current api */
69 /***** MODULE STRUCTURES *****/
71 /* NEB module structure */
72 typedef struct nebmodule_struct{
73 char *filename;
74 char *args;
75 char *info[NEBMODULE_MODINFO_NUMITEMS];
76 int should_be_loaded;
77 int is_currently_loaded;
78 #ifdef USE_LTDL
79 lt_dlhandle module_handle;
80 lt_ptr init_func;
81 lt_ptr deinit_func;
82 #else
83 void *module_handle;
84 void *init_func;
85 void *deinit_func;
86 #endif
87 #ifdef HAVE_PTHREAD_H
88 pthread_t thread_id;
89 #endif
90 struct nebmodule_struct *next;
91 }nebmodule;
95 /***** MODULE FUNCTIONS *****/
96 int neb_set_module_info(void *,int,char *);
98 #ifdef __cplusplus
100 #endif
102 #endif