Fixed compilation error
[bochs-mirror.git] / extplugin.h
blobf3e43f79d44b87865218fe84a3b9ba9a9c1b9b35
1 /////////////////////////////////////////////////////////////////////////
2 // $Id: extplugin.h,v 1.4 2002/12/12 15:28:37 cbothamy Exp $
3 /////////////////////////////////////////////////////////////////////////
4 //
5 // extplugin.h
6 //
7 // This header file defines the types necessary to make a Bochs plugin,
8 // but without mentioning all the details of Bochs internals (bochs.h).
9 // It is included by the configuration interfaces and possibly other
10 // things which are intentionally isolated from other parts of the program.
12 // The plugin_t struct comes from the plugin.h file from plex86.
13 // Plex86 is Copyright (C) 1999-2000 The plex86 developers team
15 /////////////////////////////////////////////////////////////////////////
17 #ifndef __EXTPLUGIN_H
18 #define __EXTPLUGIN_H
20 #if BX_PLUGINS
21 #include "ltdl.h"
22 #endif
24 enum plugintype_t {
25 PLUGTYPE_NULL=100,
26 PLUGTYPE_CORE,
27 PLUGTYPE_OPTIONAL,
28 PLUGTYPE_USER
31 #define MAX_ARGC 10
33 typedef struct _plugin_t
35 plugintype_t type;
36 int initialized;
37 #if BX_PLUGINS
38 lt_dlhandle handle;
39 #endif
40 int argc;
41 char *name, *args, *argv[MAX_ARGC];
42 int (*plugin_init)(struct _plugin_t *plugin, plugintype_t type, int argc, char *argv[]);
43 void (*plugin_fini)(void);
45 struct _plugin_t *next;
46 } plugin_t;
50 #endif /* __EXTPLUGIN_H */