1 /*
2 ** Zabbix
3 ** Copyright (C) 2001-2021 Zabbix SIA
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 **/
19 
20 #ifndef ZABBIX_ZBXMODULES_H
21 #define ZABBIX_ZBXMODULES_H
22 
23 typedef struct
24 {
25 	void	*lib;
26 	char	*name;
27 }
28 zbx_module_t;
29 
30 typedef struct
31 {
32 	zbx_module_t	*module;
33 	void		(*history_float_cb)(const ZBX_HISTORY_FLOAT *, int);
34 }
35 zbx_history_float_cb_t;
36 
37 typedef struct
38 {
39 	zbx_module_t	*module;
40 	void		(*history_integer_cb)(const ZBX_HISTORY_INTEGER *, int);
41 }
42 zbx_history_integer_cb_t;
43 
44 typedef struct
45 {
46 	zbx_module_t	*module;
47 	void		(*history_string_cb)(const ZBX_HISTORY_STRING *, int);
48 }
49 zbx_history_string_cb_t;
50 
51 typedef struct
52 {
53 	zbx_module_t	*module;
54 	void		(*history_text_cb)(const ZBX_HISTORY_TEXT *, int);
55 }
56 zbx_history_text_cb_t;
57 
58 typedef struct
59 {
60 	zbx_module_t	*module;
61 	void		(*history_log_cb)(const ZBX_HISTORY_LOG *, int);
62 }
63 zbx_history_log_cb_t;
64 
65 extern zbx_history_float_cb_t	*history_float_cbs;
66 extern zbx_history_integer_cb_t	*history_integer_cbs;
67 extern zbx_history_string_cb_t	*history_string_cbs;
68 extern zbx_history_text_cb_t	*history_text_cbs;
69 extern zbx_history_log_cb_t	*history_log_cbs;
70 
71 int	zbx_load_modules(const char *path, char **file_names, int timeout, int verbose);
72 void	zbx_unload_modules(void);
73 
74 #endif
75