MythTV  0.28pre
Plugin Architecture

This line is filler that is ignored by Doxygen. More...

This line is filler that is ignored by Doxygen.

MythPlugins are shared object files (i.e. libraries) which are loaded from a specific directory (e.g. /usr/local/lib/mythtv/plugins). Currently, all plugins are written in the C++ language, but there is nothing preventing other languages being used (the functions are in the C name space).

int mythplugin_init(const char *libversion); is invoked whenever mythfrontend is started. This typically handles upgrading any database records - it will be the first method called after a new version of the plugin has been installed.

int mythplugin_run(); is invoked when the action attribute of a menu item requests it via the PLUGIN directive. This is when the user chooses to enter the plugin from the main menu or the appropriate submenu.

int mythplugin_config(); is invoked when the action attribute of a menu item requests it via the CONFIGPLUGIN directive. This should be when the users wishes to change the plugin's settings (in the main Setup menu).

Other plugin functions are listed in the file mythpluginapi.h (see also the MythPlugin and MythPluginManager classes.)