This is a first cut of a plugins implementation for Bacula. The current code is simply a test program named main, which when executed will load the plugin named plugin.so and then call it with a few calls, then exit. What is implemented: - load a plugin - get main entry points in plugin (two) - pass plugin Bacula entry points - get plugin's entry points - keep list of plugins that are loaded - The plugin currently only needs config.h and bc_types.h in the Bacula src directory to be build. Otherwise, it is totally independent of Bacula. - The main test program is intended to be integrated into Bacula (at least a number of the functions therein). What is not yet implemented: - Search for all plugins in the plugin directory - Implement Bacula context for plugin instances - Implement plugin context for plugin instances - Some better method to pass variables - Pass Version information in plugin Initialize - Define more functionality (Bacula entry points, ...) - Integrate the code into Bacula - Make libbac.a into a shared object and allow plugin to call functions in directly so that plugins can use the same "safe" system utilities that Bacula uses. - Document the interface - Document libbac.so (when implemented) - Write a couple of plugins that really do something. - Figure out a way to deal with 3 types of plugins (Director, File daemon, Storage daemon). - Error handling must be much improved and brought into Bacula programming style. It currently just printf()s a message then exits.