2010-06-06 14:15:15 +00:00
|
|
|
/**
|
|
|
|
* This is a minimal example plugin for uhub.
|
|
|
|
*/
|
|
|
|
|
2010-06-12 00:54:53 +00:00
|
|
|
// #include "uhub.h"
|
2010-06-06 14:15:15 +00:00
|
|
|
#include "plugin_api/handle.h"
|
|
|
|
|
|
|
|
int plugin_register(struct uhub_plugin_handle* plugin, const char* config)
|
|
|
|
{
|
|
|
|
plugin->name = "Example plugin";
|
|
|
|
plugin->version = "1.0";
|
|
|
|
plugin->description = "A simple example plugin";
|
|
|
|
plugin->ptr = NULL;
|
|
|
|
plugin->plugin_api_version = PLUGIN_API_VERSION;
|
|
|
|
plugin->plugin_funcs_size = sizeof(struct plugin_funcs);
|
|
|
|
memset(&plugin->funcs, 0, sizeof(struct plugin_funcs));
|
2010-06-12 00:54:53 +00:00
|
|
|
|
|
|
|
puts("plugin register");
|
2010-06-06 14:15:15 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-06-12 00:54:53 +00:00
|
|
|
int plugin_unregister(struct uhub_plugin_handle* plugin)
|
2010-06-06 14:15:15 +00:00
|
|
|
{
|
|
|
|
/* No need to do anything! */
|
2010-06-12 00:54:53 +00:00
|
|
|
puts("plugin unregister");
|
|
|
|
return 0;
|
2010-06-06 14:15:15 +00:00
|
|
|
}
|
|
|
|
|