2 * Copyright (C) 2007 Martin Willi
3 * Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup plugin_loader plugin_loader
21 #ifndef PLUGIN_LOADER_H_
22 #define PLUGIN_LOADER_H_
24 typedef struct plugin_loader_t plugin_loader_t
;
27 * The plugin_loader loads plugins from a directory and initializes them
29 struct plugin_loader_t
{
32 * Load plugins from a directory.
34 * @param path path containing loadable plugins
35 * @param prefix prefix of plugin libraries to load
36 * @return number of successfully loaded plugins
38 int (*load
)(plugin_loader_t
*this, char *path
, char *prefix
);
41 * Unload loaded plugins, destroy plugin_loader instance.
43 void (*destroy
)(plugin_loader_t
*this);
47 * Create a plugin_loader instance.
49 * @return plugin loader instance
51 plugin_loader_t
*plugin_loader_create();
53 #endif /* PLUGIN_LOADER_H_ @}*/