C-Pluff C API  0.2.0
Functions
Plug-in loaders

These functions are used to construct standard plug-in loaders. More...

Functions

CP_IMPORT cp_plugin_loader_tcp_create_local_ploader (cp_status_t *status)
 Creates and returns a new instance of a local plug-in loader. More...
 
CP_IMPORT void cp_destroy_local_ploader (cp_plugin_loader_t *loader)
 Releases the resources allocated by a previously created local plug-in loader. More...
 
CP_IMPORT cp_status_t cp_lpl_register_dir (cp_plugin_loader_t *loader, const char *dir)
 Registers a new directory to be scanned by the specified local plug-in loader. More...
 
CP_IMPORT void cp_lpl_unregister_dir (cp_plugin_loader_t *loader, const char *dir)
 Unregisters a directory from the specified local plug-in loader. More...
 
CP_IMPORT void cp_lpl_unregister_dirs (cp_plugin_loader_t *loader)
 Unregisters all registered directories from the specified local plug-in loader. More...
 

Detailed Description

These functions are used to construct standard plug-in loaders.

Currently there is a single plug-in loader for loading plug-ins from local plug-in collections.

Function Documentation

◆ cp_create_local_ploader()

CP_IMPORT cp_plugin_loader_t* cp_create_local_ploader ( cp_status_t status)

Creates and returns a new instance of a local plug-in loader.

The resources used by the returned instance can be released by calling cp_destroy_local_ploader when the loader is not needed anymore. Remaining local plug-in loaders are automatically destroyed when the plug-in framework is destroyed. The created plug-in loader can be registered with a plug-in context using cp_register_ploader.

Parameters
statuspointer to the location where status code is to be stored, or NULL
Returns
the new plug-in loader instance, or NULL on failure

◆ cp_destroy_local_ploader()

CP_IMPORT void cp_destroy_local_ploader ( cp_plugin_loader_t loader)

Releases the resources allocated by a previously created local plug-in loader.

The specified loader must have been obtained by a call to cp_create_local_ploader. The loader to be destroyed must not be registered with any plug-in context.

Parameters
theplug-in loader to be destroyed

◆ cp_lpl_register_dir()

CP_IMPORT cp_status_t cp_lpl_register_dir ( cp_plugin_loader_t loader,
const char *  dir 
)

Registers a new directory to be scanned by the specified local plug-in loader.

Returns CP_OK if the directory has already been registered.

Parameters
loaderthe plug-in loader obtained from cp_create_local_ploader
dirthe directory to register
Returns
CP_OK (zero) on success or CP_ERR_RESOURCE if insufficient memory

◆ cp_lpl_unregister_dir()

CP_IMPORT void cp_lpl_unregister_dir ( cp_plugin_loader_t loader,
const char *  dir 
)

Unregisters a directory from the specified local plug-in loader.

Does nothing if the specified directory has not been registered. This does not affect the status of already loaded plug-ins.

Parameters
loaderthe plug-in loader obtained from cp_create_local_ploader
dirthe directory to unregister

◆ cp_lpl_unregister_dirs()

CP_IMPORT void cp_lpl_unregister_dirs ( cp_plugin_loader_t loader)

Unregisters all registered directories from the specified local plug-in loader.

This does not affect the status of already loaded plug-ins.

Parameters
loaderthe plug-in

Generated on Fri May 1 2020 01:06:58 for C-Pluff C API by doxygen 1.8.13