C-Pluff C API
0.2.0
|
Typedefs for client supplied callback functions. More...
Typedefs | |
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) |
A listener function called synchronously after a plugin state change. More... | |
typedef 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. More... | |
typedef void(* | cp_fatal_error_func_t) (const char *msg) |
A fatal error handler for handling unrecoverable errors. More... | |
typedef int(* | cp_run_func_t) (void *plugin_data) |
A run function registered by a plug-in to perform work. More... | |
Typedefs for client supplied callback functions.
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) |
A listener function called synchronously after a plugin state change.
The function should return promptly. Library initialization, plug-in context management, plug-in management, listener registration (cp_register_plistener and cp_unregister_plistener) and dynamic symbol functions must not be called from within a plug-in listener invocation. Listener functions are registered using cp_register_plistener.
plugin_id | the plug-in identifier |
old_state | the old plug-in state |
new_state | the new plug-in state |
user_data | the user data pointer supplied at listener registration |
typedef 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.
The messages may be localized. Plug-in framework API functions must not be called from within a logger function invocation. In a multi-threaded environment logger function invocations are serialized by the framework. Logger functions are registered using cp_register_logger.
severity | the severity of the message |
msg | the message to be logged, possibly localized |
apid | the identifier of the activating plug-in or NULL for the main program |
user_data | the user data pointer given when the logger was registered |
typedef void(* cp_fatal_error_func_t) (const char *msg) |
A fatal error handler for handling unrecoverable errors.
If the error handler returns then the framework aborts the program. Plug-in framework API functions must not be called from within a fatal error handler invocation. The fatal error handler function is set using cp_set_fatal_error_handler.
msg | the possibly localized error message |
typedef int(* cp_run_func_t) (void *plugin_data) |
A run function registered by a plug-in to perform work.
The run function should perform a finite chunk of work and it should return a non-zero value if there is more work to be done. Run functions are registered using cp_run_function and the usage is discussed in more detail in the serial execution section.
plugin_data | the plug-in instance data pointer |
Generated on Fri May 1 2020 01:06:58 for C-Pluff C API by 1.8.13