Typedef PntosMediator
Defined in File common.h
Typedef Documentation
-
typedef struct PntosMediator PntosMediator
A set of callbacks which are handed to a pntOS plugin upon initialization.
When a plugin is first initialized into pntOS, it is guaranteed that the plugin will be passed an instance of this struct via an invocation of PntosCommonPlugin.init_plugin (see PntosCommonPlugin for more information). The plugin may then use the set of function calls in this struct to make requests of the controller.
All of the functions on this struct (and any returned values from those functions) are guaranteed to be thread-safe for use by all plugins. Thus, after a pntOS plugin has received a copy of a PntosMediator it can freely call the functions contained therein without doing any explicit locking. This thread safety is implemented by the controller when it creates the mediator before passing them to other plugins.
Callers must still take care to only call functions in PntosMediator which they are not themselves responsible for implementing. The details of which plugins are used in the implementation of any particular function on this struct is decided by the PntosControllerPlugin, and thus is implementation specific to the controller used.