author | Sebastian Harl <sh@tokkee.org> | |
Fri, 17 Jun 2011 08:53:24 +0000 (10:53 +0200) | ||
committer | Sebastian Harl <sh@teamix.net> | |
Mon, 19 Sep 2011 07:47:12 +0000 (09:47 +0200) | ||
commit | 2139f51939cc70f5668ab68a16fefdb3d52bd663 | |
tree | d126477e5b12ab34d8e70674f65bdccbe87fda48 | tree | snapshot |
parent | 30d9db08c7608d1a9edf00c72d8728212a39bb82 | commit | diff |
core: Changed internal API to allow for per-plugin intervals.
This is the basic support for configuring custom intervals on a per-plugin
basis. The following API changes have been introduced:
- Each plugin's 'module_register()' function is now required to accept and
respect an argument passing the custom interval (if configured). This is
done by passing a pointer to a struct 'plugin_loaddata_t' which (currently)
contains a single cdtime_t member storing the custom interval (0 if none
has been configured).
- A new plugin-global variable, 'plugin_interval', has been introduced. It is
defined in 'plugin.h', and, thus, defined and available in all plugins.
- A new macro, 'PLUGIN_INIT_INTERVAL', has been introduced to initialize
'plugin_interval' in 'module_register'. It requires the passed loaddata
object as argument. In order for this mechanism to work, this macro has to
be used in all plugins.
- The macro 'VALUE_LIST_INIT' now requires the default interval as an
argument. In most cases 'plugin_interval' should be used.
- 'plugin_register_read' now requires a third argument specifying the
interval. Usually, 'plugin_interval' should be passed.
- The <LoadPlugin> block now accepts an option 'Interval' to configure the
custom interval.
This is the basic support for configuring custom intervals on a per-plugin
basis. The following API changes have been introduced:
- Each plugin's 'module_register()' function is now required to accept and
respect an argument passing the custom interval (if configured). This is
done by passing a pointer to a struct 'plugin_loaddata_t' which (currently)
contains a single cdtime_t member storing the custom interval (0 if none
has been configured).
- A new plugin-global variable, 'plugin_interval', has been introduced. It is
defined in 'plugin.h', and, thus, defined and available in all plugins.
- A new macro, 'PLUGIN_INIT_INTERVAL', has been introduced to initialize
'plugin_interval' in 'module_register'. It requires the passed loaddata
object as argument. In order for this mechanism to work, this macro has to
be used in all plugins.
- The macro 'VALUE_LIST_INIT' now requires the default interval as an
argument. In most cases 'plugin_interval' should be used.
- 'plugin_register_read' now requires a third argument specifying the
interval. Usually, 'plugin_interval' should be passed.
- The <LoadPlugin> block now accepts an option 'Interval' to configure the
custom interval.
117 files changed: