|
OpenCBM
|
Program to install and uninstall the OPENCBM driver; handling of plugins. More...
#include <windows.h>#include <stdio.h>#include <stdlib.h>#include <direct.h>#include <getopt.h>#include "archlib.h"#include "archlib-windows.h"#include "cbmioctl.h"#include "configuration.h"#include "version.h"#include "arch.h"#include "i_opencbm.h"#include "libmisc.h"#include "debug.h"#include "instcbm.h"#include "opencbm-plugin.h"Go to the source code of this file.
Macros | |
| #define | DBG_USERMODE |
| #define | DBG_PROGNAME "INSTCBM.EXE" |
| #define | DBG_IS_DEBUG_C |
| #define | PLUGIN_PREFIX "opencbm-" |
| name prefix for the plugin executable More... | |
| #define | PLUGIN_SUFFIX ".dll" |
| name suffix for the plugin executable More... | |
Functions | |
| void | PluginListFree (cbm_install_parameter_t *InstallParameter) |
| Free all the memory occupied by plugin management. More... | |
| BOOL | ProcessPluginCommandlineAndAddIt (cbm_install_parameter_t *InstallParameter, const char *const PluginName, int Argc, char *const Argv[]) |
| Process the command-line parameters for a plugin and add that plugin to the plugin list. More... | |
| BOOL | get_all_plugins (cbm_install_parameter_t *InstallParameter) |
| Get all the plugins. More... | |
| BOOL | get_all_installed_plugins (cbm_install_parameter_t *InstallParameter) |
| Get all the installed plugins. More... | |
| BOOL | PluginForAll (cbm_install_parameter_t *InstallParameter, PluginForAll_Callback_t *Callback, void *Context) |
| Execute a callback function for all plugins in the plugin list. More... | |
Program to install and uninstall the OPENCBM driver; handling of plugins.
Definition in file plugin.c.
| #define DBG_IS_DEBUG_C |
| #define DBG_PROGNAME "INSTCBM.EXE" |
| #define DBG_USERMODE |
| #define PLUGIN_PREFIX "opencbm-" |
name prefix for the plugin executable
If the plugin if named "AAA", the plugin file must be named
PLUGIN_PREFIX "AAA" PLUGIN_SUFFIX
Definition at line 61 of file plugin.c.
Referenced by get_all_plugins().
| #define PLUGIN_SUFFIX ".dll" |
name suffix for the plugin executable
If the plugin if named "AAA", the plugin file must be named
PLUGIN_PREFIX "AAA" PLUGIN_SUFFIX
Definition at line 72 of file plugin.c.
Referenced by get_all_plugins().
| BOOL get_all_installed_plugins | ( | cbm_install_parameter_t * | InstallParameter | ) |
Get all the installed plugins.
This function searches all installed plugins and adds an entry for that plugin to the plugin list.
| InstallParameter | The install parameters which contain the plugin list. |
Definition at line 596 of file plugin.c.
References DBG_PREFIX, DBG_PRINT, FUNC_ENTER, FUNC_LEAVE_BOOL, LoadLocalOpenCBMDll(), opencbm_configuration_close(), and opencbm_plugin_get_all_plugin_names().
| BOOL get_all_plugins | ( | cbm_install_parameter_t * | InstallParameter | ) |
Get all the plugins.
This function searches for all plugins available and adds an entry for that plugin to the plugin list.
| InstallParameter | The install parameters which contain the plugin list. |
Definition at line 486 of file plugin.c.
References cbmlibmisc_strfree(), FUNC_ENTER, FUNC_LEAVE_BOOL, PLUGIN_PREFIX, and PLUGIN_SUFFIX.
| BOOL PluginForAll | ( | cbm_install_parameter_t * | InstallParameter, |
| PluginForAll_Callback_t * | Callback, | ||
| void * | Context | ||
| ) |
Execute a callback function for all plugins in the plugin list.
| InstallParameter | The install parameters which contain the plugin list. |
| Callback | Callback function to execute for each plugin. |
| Context | Context data to give to the Callback function. This data is Callback specific; it is not interpreted in any way by this function here. |
Definition at line 663 of file plugin.c.
References FUNC_ENTER, and FUNC_LEAVE_BOOL.
| void PluginListFree | ( | cbm_install_parameter_t * | InstallParameter | ) |
Free all the memory occupied by plugin management.
This function frees all the memory that was needed in order to remember plugins and their data.
| InstallParameter | The install parameters from which to free the plugin list. |
Definition at line 214 of file plugin.c.
References DBG_ASSERT, FUNC_ENTER, and FUNC_LEAVE.
Referenced by main().
| BOOL ProcessPluginCommandlineAndAddIt | ( | cbm_install_parameter_t * | InstallParameter, |
| const char *const | PluginName, | ||
| int | Argc, | ||
| char *const | Argv[] | ||
| ) |
Process the command-line parameters for a plugin and add that plugin to the plugin list.
This function lets the specified plugin process its own command-line parameters. Afterwards, an entry for that plugin with the plugin-specific data is added to the plugin list.
| InstallParameter | The install parameters which contain the plugin list. |
| PluginName | The name of the plugin. |
| Argc | The (remaining) argc value, as if given to int main(int, char **); |
| Argv | The (remaining) argv value, as if given to int main(int, char **); |
Definition at line 447 of file plugin.c.
References FUNC_ENTER, and FUNC_LEAVE_BOOL.
1.8.8