Callback Manager

Many of the modules needs a provision to signal other modules via callback mechanism. RAPIDSEA provides a callback manager to achieve the same.

Typically the module (“source module”) that wants to implement the callback functionality can initialize the manager with rs_callback_mgr_init function with the memory needed for storing the functions and the maximum number of callbacks that can be registered. Any other module that wants to register for an notification, can call the rs_callback_mgr_register function to register along with optional argument. When the source module wants to send the notification, it can invoke all the call back functions via RS_CALLBACK_MGR_FOR_ALL_CALL_ARG1 or RS_CALLBACK_MGR_FOR_ALL_CALL_ARG2 macros. The modules can deregister themselves using the rs_callback_mgr_unregister function.

Callback Manager Header

Documentation from the relevant header as follows:

Warning

doxygenfile: Cannot find file “rs_callback_mgr.h