Functions exported from Carbonite plugins. Use @ref CARB_PLUGIN_IMPL to have
reasonable default implementations of these function implemented for you in your plugin.
Typedefs
carb::GetFrameworkVersionFn: Required. Returns the plugin's required carb::Framework version.
carb::GetPluginDepsFn: Optional. Returns a static list of interfaces this plugin depends upon.
carb::OnPluginPostShutdownFn: Optional. Called after OnPluginShutdownFn .
carb::OnPluginPreStartupFn: Optional. Called after OnPluginRegisterExFn .
carb::OnPluginQuickShutdownFn: Optional. Called if provided in lieu of OnPluginShutdownFn when the carb::quickReleaseFrameworkAndTerminate() is performing a quick shutdown.
carb::OnPluginRegisterEx2Fn: Either this or OnPluginRegisterEx2Fn or OnPluginRegisterFn are required. Populates the given carb::PluginRegistryEntry2 with the plugin's information.
carb::OnPluginRegisterExFn: Either this or OnPluginRegisterFn or OnPluginRegisterEx2 are required. Populates the given carb::PluginRegistryEntry with the plugin's information.
carb::OnPluginRegisterFn: Either this or OnPluginRegisterExFn or OnPluginRegisterEx2Fn are required. Populates the given carb::PluginRegistryEntry with the plugin's information.
carb::OnPluginShutdownFn: Optional. Called after OnPluginStartupExFn .
carb::OnPluginStartupExFn: Optional. Called after OnPluginPreStartupFn .
carb::OnPluginStartupFn: Optional. Called after OnPluginPreStartupFn .
carb::OnReloadDependencyFn: Optional.
Typedefs
-
typedef Version (*carb::GetFrameworkVersionFn)()
Required. Returns the plugin’s required carb::Framework version.
Use CARB_PLUGIN_IMPL to have this function generated for your plugin.
Most users will not have a need to define this function, as it is defined by default via CARB_PLUGIN_IMPL.
See also
carbGetFrameworkVersion
-
typedef void (*carb::GetPluginDepsFn)(InterfaceDesc **interfaceDesc, size_t *count)
Optional. Returns a static list of interfaces this plugin depends upon.
Use CARB_PLUGIN_IMPL_DEPS to have this function generated for you.
See also
carbGetPluginDeps
-
typedef void (*carb::OnPluginPostShutdownFn)()
Optional. Called after OnPluginShutdownFn.
Called when the carb::Framework is unloading the plugin.
Most users will not have a need to define this function, as it is defined by default via CARB_PLUGIN_IMPL.
See also
carbOnPluginPostShutdown
-
typedef void (*carb::OnPluginPreStartupFn)()
Optional. Called after OnPluginRegisterExFn.
Most users will not have a need to define this function, as it is defined by default via CARB_PLUGIN_IMPL.
See also
carbOnPluginPreStartup
-
typedef void (*carb::OnPluginQuickShutdownFn)()
Optional. Called if provided in lieu of OnPluginShutdownFn when the carb::quickReleaseFrameworkAndTerminate() is performing a quick shutdown.
This function should save any state necessary, and close and flush any I/O, returning as quickly as possible. This function is not called if the plugin is unloaded normally or through carb::releaseFramework().
See also
carbOnPluginQuickShutdown
Note
If carb::quickReleaseFrameworkAndTerminate() is called, OnPluginQuickShutdownFn is called if it is available. If the function does not exist, OnPluginShutdownFn is called instead. OnPluginPostShutdownFn is always called.
-
typedef void (*carb::OnPluginRegisterEx2Fn)(PluginFrameworkDesc *framework, PluginRegistryEntry2 *outEntry)
Either this or OnPluginRegisterEx2Fn or OnPluginRegisterFn are required. Populates the given carb::PluginRegistryEntry2 with the plugin’s information.
Use CARB_PLUGIN_IMPL to have this function generated for your plugin.
See also
carbOnPluginRegisterEx2
-
typedef void (*carb::OnPluginRegisterExFn)(PluginFrameworkDesc *framework, PluginRegistryEntry *outEntry)
Either this or OnPluginRegisterFn or OnPluginRegisterEx2 are required. Populates the given carb::PluginRegistryEntry with the plugin’s information.
Use CARB_PLUGIN_IMPL to have this function generated for your plugin.
See also
carbOnPluginRegisterEx
-
typedef void (*carb::OnPluginRegisterFn)(Framework *framework, PluginRegistryEntry *outEntry)
Either this or OnPluginRegisterExFn or OnPluginRegisterEx2Fn are required. Populates the given carb::PluginRegistryEntry with the plugin’s information.
Prefer using OnPluginRegisterExFn instead of this function.
Most users will not have a need to define this function, as it is defined by default via CARB_PLUGIN_IMPL.
See also
carbOnPluginRegister
-
typedef void (*carb::OnPluginShutdownFn)()
Optional. Called after OnPluginStartupExFn.
Called when the carb::Framework is unloading the plugin. If the framework is released with carb::quickReleaseFrameworkAndTerminate() and OnPluginQuickShutdownFn is available for plugin, this function is not called.
This is the main user defined function for running shutdown code in your plugin.
See also
carbOnPluginShutdown
-
typedef bool (*carb::OnPluginStartupExFn)()
Optional. Called after OnPluginPreStartupFn.
This is the main user defined function for running startup code in your plugin.
See also
carbOnPluginStartupEx
- Return
Returns
true
if the startup was successful. Iffalse
is returned, the plugin will be immediately unloaded (only OnPluginPostShutdownFn is called).
-
typedef void (*carb::OnPluginStartupFn)()
Optional. Called after OnPluginPreStartupFn.
Prefer using OnPluginStartupExFn instead of this function since OnPluginStartupExFn return a value that will cause the plugin be unloaded.
See also
carbOnPluginStartup
-
typedef void (*carb::OnReloadDependencyFn)(PluginReloadState reloadState, void *pluginInterface, PluginImplDesc desc)
Optional.
See also
carbOnReloadDependency