61 #define CP_C_API CP_IMPORT    78 #define CP_SP_UPGRADE 0x01    84 #define CP_SP_STOP_ALL_ON_UPGRADE 0x02    91 #define CP_SP_STOP_ALL_ON_INSTALL 0x04    97 #define CP_SP_RESTART_ACTIVE 0x08   347 typedef void (*
cp_plugin_listener_func_t)(
const char *plugin_id, cp_plugin_state_t old_state, cp_plugin_state_t new_state, 
void *user_data);
   361 typedef void (*
cp_logger_func_t)(cp_log_severity_t severity, 
const char *msg, 
const char *apid, 
void *user_data);
   778         int (*start)(
void *data);
   803         void (*stop)(
void *data);
   817         void (*destroy)(
void *data);
 CP_IMPORT cp_status_t cp_register_plistener(cp_context_t *ctx, cp_plugin_listener_func_t listener, void *user_data)
Registers a plug-in listener with a plug-in context. 
 
Plug-in is not installed. 
Definition: cpluff.h:181
 
Extension structure captures information about an extension. 
Definition: cpluff.h:614
 
cp_extension_t * extensions
An array of num_extensions extensions provided by this plug-in. 
Definition: cpluff.h:524
 
char * version
An optional release version string. 
Definition: cpluff.h:423
 
CP_IMPORT cp_status_t cp_register_ploader(cp_context_t *ctx, cp_plugin_loader_t *loader)
Registers a plug-in loader that will be used to load plug-ins into this context when cp_scan_plugins ...
 
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. 
 
void(* cp_plugin_listener_func_t)(const char *plugin_id, cp_plugin_state_t old_state, cp_plugin_state_t new_state, void *user_data)
A listener function called synchronously after a plugin state change. 
Definition: cpluff.h:347
 
CP_IMPORT cp_ext_point_t ** cp_get_ext_points_info(cp_context_t *ctx, cp_status_t *status, int *num)
Returns static information about the currently installed extension points. 
 
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. 
 
CP_IMPORT void cp_set_plugin_descriptor_root_element(cp_context_t *ctx, const char *root)
Changes the XML root element's name in plug-in descriptor. 
 
CP_IMPORT void cp_run_plugins(cp_context_t *ctx)
Runs the started plug-ins as long as there is something to run. 
 
CP_IMPORT cp_cfg_element_t * cp_lookup_cfg_element(cp_cfg_element_t *base, const char *path)
Traverses a configuration element tree and returns the specified element. 
 
CP_IMPORT cp_plugin_state_t cp_get_plugin_state(cp_context_t *ctx, const char *id)
Returns the current state of the specified plug-in. 
 
CP_IMPORT void cp_unregister_pcollections(cp_context_t *ctx)
Unregisters all plug-in collections from a plug-in context. 
 
CP_IMPORT void cp_release_info(cp_context_t *ctx, void *info)
Releases a previously obtained reference counted information object. 
 
cp_cfg_element_t * parent
A pointer to the parent element or NULL if this is a root element. 
Definition: cpluff.h:695
 
CP_IMPORT const char * cp_get_version(void)
Returns the release version string of the linked in C-Pluff implementation. 
 
char * local_id
An optional local identifier uniquely identifying the extension within the host plug-in. 
Definition: cpluff.h:635
 
The specified object is unknown to the framework. 
Definition: cpluff.h:145
 
Container for plug-in runtime information. 
Definition: cpluff.h:737
 
CP_IMPORT void cp_log(cp_context_t *ctx, cp_log_severity_t severity, const char *msg)
Emits a new log message. 
 
An I/O error occurred. 
Definition: cpluff.h:148
 
Plug-in information structure captures information about a plug-in. 
Definition: cpluff.h:399
 
CP_IMPORT cp_status_t cp_define_symbol(cp_context_t *ctx, const char *name, void *ptr)
Defines a context specific symbol. 
 
Used for messages reporting errors. 
Definition: cpluff.h:253
 
Plug-in runtime signaled an error. 
Definition: cpluff.h:160
 
cp_plugin_state_t
An enumeration of possible plug-in states. 
Definition: cpluff.h:175
 
unsigned int num_children
Number of children in the children array. 
Definition: cpluff.h:701
 
Plug-in dependencies could not be satisfied. 
Definition: cpluff.h:157
 
char * name
An optional extension name. 
Definition: cpluff.h:650
 
Extension point structure captures information about an extension point. 
Definition: cpluff.h:569
 
CP_IMPORT cp_plugin_info_t * cp_load_plugin_descriptor_from_memory(cp_context_t *ctx, const char *buffer, unsigned int buffer_len, cp_status_t *status)
Loads a plug-in descriptor from the specified block of memory and returns information about the plug-...
 
CP_IMPORT cp_status_t cp_init(void)
Initializes the plug-in framework. 
 
CP_IMPORT cp_status_t cp_register_pcollection(cp_context_t *ctx, const char *dir)
Registers a local plug-in collection with a plug-in context. 
 
CP_IMPORT void cp_unregister_ploaders(cp_context_t *ctx)
Unregisters all registered plug-in loaders from a plug-in context. 
 
CP_IMPORT cp_status_t cp_uninstall_plugin(cp_context_t *ctx, const char *id)
Uninstalls the specified plug-in. 
 
CP_IMPORT cp_plugin_info_t ** cp_get_plugins_info(cp_context_t *ctx, cp_status_t *status, int *num)
Returns static information about the installed plug-ins. 
 
char * identifier
An optional unique identifier of the extension. 
Definition: cpluff.h:642
 
cp_status_t
An enumeration of status codes returned by API functions. 
Definition: cpluff.h:133
 
CP_IMPORT void cp_unregister_ploader(cp_context_t *ctx, cp_plugin_loader_t *loader)
Unregisters a previously registered plug-in loader from a plug-in context. 
 
char * name
The name of the configuration element. 
Definition: cpluff.h:676
 
char * api_bw_compatibility
Optional API compatibility information. 
Definition: cpluff.h:468
 
CP_IMPORT void cp_release_symbol(cp_context_t *ctx, const void *ptr)
Releases a previously obtained symbol. 
 
CP_IMPORT char * cp_lookup_cfg_value(cp_cfg_element_t *base, const char *path)
Traverses a configuration element tree and returns the value of the specified element or attribute...
 
CP_IMPORT const char * cp_get_host_type(void)
Returns the canonical host type associated with the linked in C-Pluff implementation. 
 
CP_IMPORT cp_status_t cp_stop_plugin(cp_context_t *ctx, const char *id)
Stops a plug-in. 
 
CP_IMPORT cp_status_t cp_start_plugin(cp_context_t *ctx, const char *id)
Starts a plug-in. 
 
unsigned int index
The index of this element among its siblings (0-based). 
Definition: cpluff.h:698
 
CP_IMPORT cp_plugin_info_t * cp_get_plugin_info(cp_context_t *ctx, const char *id, cp_status_t *status)
Returns static information about the specified plug-in. 
 
unsigned int num_extensions
Number of extensions in extensions array. 
Definition: cpluff.h:517
 
cp_cfg_element_t * children
An array of num_children childrens of this element. 
Definition: cpluff.h:707
 
char * ext_point_id
The unique identifier of the extension point this extension is attached to. 
Definition: cpluff.h:628
 
char * req_cpluff_version
Optional C-Pluff version requirement. 
Definition: cpluff.h:478
 
unsigned int num_ext_points
Number of extension points in ext_points array. 
Definition: cpluff.h:507
 
char * identifier
The unique identifier of the extension point. 
Definition: cpluff.h:590
 
unsigned int num_imports
Number of import entries in the imports array. 
Definition: cpluff.h:481
 
CP_IMPORT int cp_run_plugins_step(cp_context_t *ctx)
Runs one registered run function. 
 
Plug-in dependencies have been resolved. 
Definition: cpluff.h:202
 
Common defines shared by C-Pluff C and C++ APIs. 
 
CP_IMPORT void cp_stop_plugins(cp_context_t *ctx)
Stops all active plug-ins. 
 
Malformed plug-in descriptor was encountered when loading a plug-in. 
Definition: cpluff.h:151
 
Operation was performed successfully (equals to zero). 
Definition: cpluff.h:139
 
Not enough memory or other operating system resources available. 
Definition: cpluff.h:142
 
CP_IMPORT cp_status_t cp_install_plugin(cp_context_t *ctx, cp_plugin_info_t *pi)
Installs the plug-in described by the specified plug-in information structure to the specified plug-i...
 
char * value
An optional value of this configuration element. 
Definition: cpluff.h:692
 
CP_IMPORT void cp_uninstall_plugins(cp_context_t *ctx)
Uninstalls all plug-ins. 
 
CP_IMPORT cp_status_t cp_register_logger(cp_context_t *ctx, cp_logger_func_t logger, void *user_data, cp_log_severity_t min_severity)
Registers a logger with a plug-in context or updates the settings of a registered logger...
 
CP_IMPORT void cp_lpl_unregister_dirs(cp_plugin_loader_t *loader)
Unregisters all registered directories from the specified local plug-in loader. 
 
CP_IMPORT int cp_is_logged(cp_context_t *ctx, cp_log_severity_t severity)
Returns whether a message of the specified severity would get logged. 
 
CP_IMPORT cp_extension_t ** cp_get_extensions_info(cp_context_t *ctx, const char *extpt_id, cp_status_t *status, int *num)
Returns static information about the currently installed extension points. 
 
CP_IMPORT void cp_unregister_plistener(cp_context_t *ctx, cp_plugin_listener_func_t listener)
Removes a plug-in listener from a plug-in context. 
 
Plug-in is installed. 
Definition: cpluff.h:190
 
char * abi_bw_compatibility
Optional ABI compatibility information. 
Definition: cpluff.h:454
 
char * plugin_path
Path of the plugin directory or NULL if not known. 
Definition: cpluff.h:441
 
cp_cfg_element_t * configuration
Extension configuration starting with the extension element. 
Definition: cpluff.h:658
 
#define CP_GCC_PURE
Declares a function as pure function having no side effects. 
Definition: cpluffdef.h:190
 
Plug-in has been successfully started and it has not yet been stopped. 
Definition: cpluff.h:230
 
A plug-in loader instance. 
Definition: cpluff.h:839
 
Used for messages warning about possible problems. 
Definition: cpluff.h:250
 
cp_ext_point_t * ext_points
An array of num_ext_points extension points provided by this plug-in. 
Definition: cpluff.h:514
 
CP_IMPORT void cp_unregister_logger(cp_context_t *ctx, cp_logger_func_t logger)
Removes a logger registration. 
 
CP_IMPORT cp_status_t cp_run_function(cp_context_t *ctx, cp_run_func_t runfunc)
Registers a new run function. 
 
CP_IMPORT void cp_destroy_local_ploader(cp_plugin_loader_t *loader)
Releases the resources allocated by a previously created local plug-in loader. 
 
CP_IMPORT cp_status_t cp_scan_plugins(cp_context_t *ctx, int flags)
Scans for plug-ins in the registered plug-in directories, installing new plug-ins and upgrading insta...
 
unsigned int num_atts
Number of attribute name, value pairs in the atts array. 
Definition: cpluff.h:679
 
char * schema_path
An optional path to the extension schema definition. 
Definition: cpluff.h:606
 
#define CP_C_API
Marks a symbol declaration to be part of the C-Pluff C API. 
Definition: cpluff.h:61
 
cp_plugin_info_t * plugin
A pointer to plug-in information containing this extension point. 
Definition: cpluff.h:576
 
char * name
An optional plug-in name. 
Definition: cpluff.h:416
 
int optional
Is this import optional. 
Definition: cpluff.h:560
 
CP_IMPORT void cp_set_context_args(cp_context_t *ctx, char **argv)
Sets startup arguments for the specified plug-in context. 
 
char * version
An optional version requirement. 
Definition: cpluff.h:549
 
char * name
An optional extension point name. 
Definition: cpluff.h:598
 
CP_IMPORT void * cp_resolve_symbol(cp_context_t *ctx, const char *id, const char *name, cp_status_t *status)
Resolves a symbol provided by the specified plug-in. 
 
CP_IMPORT char ** cp_get_context_args(cp_context_t *ctx, int *argc)
Returns the startup arguments associated with the specified plug-in context. 
 
struct cp_context_t cp_context_t
A plug-in context represents the co-operation environment of a set of plug-ins from the perspective o...
Definition: cpluff.h:281
 
void(* cp_fatal_error_func_t)(const char *msg)
A fatal error handler for handling unrecoverable errors. 
Definition: cpluff.h:372
 
Plug-in is starting. 
Definition: cpluff.h:213
 
CP_IMPORT void cp_destroy_context(cp_context_t *ctx)
Destroys the specified plug-in context and releases the associated resources. 
 
void * data
An opaque data pointer for this plug-in loader instance. 
Definition: cpluff.h:847
 
Used for detailed debug messages. 
Definition: cpluff.h:244
 
CP_IMPORT void cp_set_plugin_descriptor_name(cp_context_t *ctx, const char *name)
Changes the file name in the plug-in the plug-in descriptor is loaded from. 
 
char ** atts
An array of pointers to alternating attribute names and values. 
Definition: cpluff.h:685
 
A configuration element contains configuration information for an extension. 
Definition: cpluff.h:670
 
char * provider_name
An optional provider name. 
Definition: cpluff.h:432
 
int(* cp_run_func_t)(void *plugin_data)
A run function registered by a plug-in to perform work. 
Definition: cpluff.h:384
 
CP_IMPORT void cp_set_fatal_error_handler(cp_fatal_error_func_t error_handler)
Sets the fatal error handler called on non-recoverable errors. 
 
CP_IMPORT void cp_destroy(void)
Destroys the plug-in framework and releases the resources used by it. 
 
CP_IMPORT void cp_unregister_pcollection(cp_context_t *ctx, const char *dir)
Unregisters a previously registered plug-in collection from a plug-in context. 
 
Plug-in or symbol conflicts with another plug-in or symbol. 
Definition: cpluff.h:154
 
void(* cp_logger_func_t)(cp_log_severity_t severity, const char *msg, const char *apid, void *user_data)
A logger function called to log selected plug-in framework messages. 
Definition: cpluff.h:361
 
char * identifier
The obligatory unique identifier of the plugin. 
Definition: cpluff.h:408
 
CP_IMPORT cp_context_t * cp_create_context(cp_status_t *status)
Creates a new plug-in context which can be used as a container for plug-ins. 
 
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. 
 
CP_IMPORT cp_plugin_info_t * cp_load_plugin_descriptor(cp_context_t *ctx, const char *path, cp_status_t *status)
Loads a plug-in descriptor from the specified plug-in installation path and returns information about...
 
cp_log_severity_t
An enumeration of possible message severities for framework logging. 
Definition: cpluff.h:241
 
char * plugin_id
The identifier of the imported plug-in. 
Definition: cpluff.h:539
 
Used for informational messages such as plug-in state changes. 
Definition: cpluff.h:247
 
cp_plugin_info_t * plugin
A pointer to plug-in information containing this extension. 
Definition: cpluff.h:621
 
Information about plug-in import. 
Definition: cpluff.h:533
 
#define CP_GCC_NONNULL(...)
Specifies that some pointer arguments to a function should have non-NULL values. 
Definition: cpluffdef.h:195
 
Plug-in is stopping. 
Definition: cpluff.h:224
 
char * runtime_lib_name
The base name of the plug-in runtime library, or NULL if none. 
Definition: cpluff.h:496
 
char * runtime_funcs_symbol
The symbol pointing to the plug-in runtime function information or NULL if none. 
Definition: cpluff.h:504
 
cp_plugin_import_t * imports
An array of num_imports import entries. 
Definition: cpluff.h:487