1 /*
2 ** Modular Logfile Analyzer
3 ** Copyright 2000 Jan Kneschke <jan@kneschke.de>
4 **
5 ** Homepage: http://www.modlogan.org
6 **
7 
8     This program is free software; you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation; either version 2 of the License, or
11     (at your option) any later version, and provided that the above
12     copyright and permission notice is included with all distributed
13     copies of this or derived software.
14 
15     This program is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     GNU General Public License for more details.
19 
20     You should have received a copy of the GNU General Public License
21     along with this program; if not, write to the Free Software
22     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
23 
24 **
25 ** $Id: mplugins.h,v 1.21 2002/12/30 11:27:22 ostborn Exp $
26 */
27 
28 #ifndef _M_PLUGINS_H_
29 #define _M_PLUGINS_H_
30 
31 #include "mconfig.h"
32 #include "mstate.h"
33 #include "mrecord.h"
34 
35 typedef struct {
36 	int (*dlinit)(mconfig *);
37 	int (*dlclose)(mconfig *);
38 	int (*parse_config)(mconfig *, const char *, const char *);
39 	int (*set_defaults)(mconfig *);
40 	int (*get_next_record)(mconfig *, mlogrec *record);
41 	int (*insert_record)(mconfig *, mlist *state_list, mlogrec *record);
42 	int (*gen_report)(mconfig *, mstate *state, const char *subpath);
43 	int (*gen_history)(mconfig *, mlist *history, const char *subpath);
44 
45 	void * handle;
46 	void * config;
47 } mplugin;
48 
49 int mplugins_setup(mconfig *conf);
50 int mplugins_load_plugins(mconfig *conf);
51 int mplugins_unload_plugins(mconfig *conf);
52 int mplugins_free(mconfig *conf);
53 
54 #if 0
55 int mplugins_load_datatypes();
56 #endif
57 
58 #endif
59 
60