Add plugins files missing from earlier commit
This commit is contained in:
10
src/lsi/plugin.h
Normal file
10
src/lsi/plugin.h
Normal file
@@ -0,0 +1,10 @@
|
||||
/* plugin.h */
|
||||
|
||||
struct plugin {
|
||||
char *pl_name;
|
||||
int (*pl_init)(void);
|
||||
void (*pl_shutdown)(void);
|
||||
int pl_active;
|
||||
/* function table? */
|
||||
};
|
||||
|
||||
23
src/lsi/plugins.c
Normal file
23
src/lsi/plugins.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* plugins.c */
|
||||
|
||||
/*
|
||||
* This is the master table of plugins. Add a plugin here
|
||||
* for it to take effect.
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
|
||||
#include "midi.h"
|
||||
#include "dmx.h"
|
||||
#include "beatdetect.h"
|
||||
#include "mouse.h"
|
||||
|
||||
struct plugin plugins_table[] = {
|
||||
{"midi", midi_init, midi_close, 0},
|
||||
{"dmx", dmx_init, dmx_close, 0},
|
||||
{"beatdetect", beatdetect_init, beatdetect_close, 0},
|
||||
{"mouse", mouse_init, mouse_close, 0},
|
||||
};
|
||||
|
||||
int nplugins = (sizeof(plugins_table) / sizeof(struct plugin));
|
||||
|
||||
13
src/lsi/plugins.h
Normal file
13
src/lsi/plugins.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/* plugins.h */
|
||||
|
||||
/*
|
||||
* The master table of plugins is found in plugins.c. This is
|
||||
* just a declaration to allow the table to be used.
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
|
||||
extern struct plugin plugins_table[];
|
||||
|
||||
extern int nplugins;
|
||||
|
||||
Reference in New Issue
Block a user