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.

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.

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.

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.

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().

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.

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.

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.

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.

typedef bool (*carb::OnPluginStartupExFn)()#

Optional. Called after OnPluginPreStartupFn.

This is the main user defined function for running startup code in your plugin.

Return:

Returns true if the startup was successful. If false 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.

typedef void (*carb::OnReloadDependencyFn)(PluginReloadState reloadState, void *pluginInterface, PluginImplDesc desc)#

Optional.