OpenCBM
Typedefs | Functions
instcbm.h File Reference

Header for installation routines. More...

Go to the source code of this file.

Typedefs

typedef struct
cbm_install_parameter_s 
cbm_install_parameter_t
 
typedef struct
CbmPluginInstallProcessCommandlineData_s 
CbmPluginInstallProcessCommandlineData_t
 
typedef struct
cbm_install_parameter_plugin_s 
cbm_install_parameter_plugin_t
 
typedef BOOL PluginForAll_Callback_t (cbm_install_parameter_plugin_t *PluginInstallParameter, void *Context)
 

Functions

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 ProcessPluginCommandlineAndAddIt (cbm_install_parameter_t *Parameter, const char *const Plugin, int Argc, char *const Argv[])
 Process the command-line parameters for a plugin and add that plugin to the plugin list. More...
 
void PluginListFree (cbm_install_parameter_t *InstallParameter)
 Free all the memory occupied by plugin management. 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...
 
HMODULE LoadLocalOpenCBMDll (void)
 @@@ More...
 

Detailed Description

Header for installation routines.



Author
Spiro Trikaliotis

Definition in file instcbm.h.

Typedef Documentation

typedef struct cbm_install_parameter_plugin_s cbm_install_parameter_plugin_t

@@\xrefitem todo 110.

Definition at line 27 of file instcbm.h.

typedef struct cbm_install_parameter_s cbm_install_parameter_t

@@\xrefitem todo 108.

Definition at line 23 of file instcbm.h.

typedef struct CbmPluginInstallProcessCommandlineData_s CbmPluginInstallProcessCommandlineData_t

@@\xrefitem todo 109.

Definition at line 25 of file instcbm.h.

typedef BOOL PluginForAll_Callback_t(cbm_install_parameter_plugin_t *PluginInstallParameter, void *Context)

@@\xrefitem todo 111.

Parameters
PluginInstallParameter
Context
Returns

Definition at line 43 of file instcbm.h.

Function Documentation

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.

Parameters
InstallParameterThe install parameters which contain the plugin list.
Returns
TRUE on error, else FALSE.
Remarks
An installed plugin is a plugin which is mentioned in the configuration file.

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.

Parameters
InstallParameterThe install parameters which contain the plugin list.
Returns
TRUE on error, else FALSE.
Remarks
An available plugin is a plugin in the current directory. A plugin is determined by all files that match the pattern PLUGIN_PREFIX "*" PLUGIN_SUFFIX.

Definition at line 486 of file plugin.c.

References cbmlibmisc_strfree(), FUNC_ENTER, FUNC_LEAVE_BOOL, PLUGIN_PREFIX, and PLUGIN_SUFFIX.

HMODULE LoadLocalOpenCBMDll ( void  )

@@@

Todo:
document
Returns

Definition at line 1479 of file instcbm.c.

References FUNC_ENTER, and FUNC_LEAVE_HMODULE.

Referenced by get_all_installed_plugins().

BOOL PluginForAll ( cbm_install_parameter_t InstallParameter,
PluginForAll_Callback_t Callback,
void *  Context 
)

Execute a callback function for all plugins in the plugin list.

Parameters
InstallParameterThe install parameters which contain the plugin list.
CallbackCallback function to execute for each plugin.
ContextContext data to give to the Callback function. This data is Callback specific; it is not interpreted in any way by this function here.
Returns
TRUE if an error occurred (that is, a callback returned TRUE); else FALSE:
Remarks
If a callback function returns TRUE, this indicates an error. In this case, all subsequent plugins will not be processed.

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.

Parameters
InstallParameterThe install parameters from which to free the plugin list.
Remarks
The plugin functions are not multi-thread safe!

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.

Parameters
InstallParameterThe install parameters which contain the plugin list.
PluginNameThe name of the plugin.
ArgcThe (remaining) argc value, as if given to int main(int, char **);
ArgvThe (remaining) argv value, as if given to int main(int, char **);
Returns
TRUE on error, else FALSE.

Definition at line 447 of file plugin.c.

References FUNC_ENTER, and FUNC_LEAVE_BOOL.