Started working on the plugin configuration and loader code.

The example plugin works, but does not do anything.
This commit is contained in:
Jan Vidar Krey
2010-06-12 02:54:53 +02:00
parent 7218011449
commit ccaa4860b4
7 changed files with 146 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
* This is a minimal example plugin for uhub.
*/
#include "uhub.h"
// #include "uhub.h"
#include "plugin_api/handle.h"
int plugin_register(struct uhub_plugin_handle* plugin, const char* config)
@@ -14,11 +14,15 @@ int plugin_register(struct uhub_plugin_handle* plugin, const char* config)
plugin->plugin_api_version = PLUGIN_API_VERSION;
plugin->plugin_funcs_size = sizeof(struct plugin_funcs);
memset(&plugin->funcs, 0, sizeof(struct plugin_funcs));
puts("plugin register");
return 0;
}
void plugin_unregister(struct uhub_plugin_handle* plugin)
int plugin_unregister(struct uhub_plugin_handle* plugin)
{
/* No need to do anything! */
puts("plugin unregister");
return 0;
}