Class e.c.p.PluginRegistry(Loggable):

Part of elisa.core.plugin_registry View In Hierarchy

Known subclasses: elisa.core.tests.test_plugin_registry.PluginRegistryMock

No class docstring
Line # Kind Name Docs
79 Method __init__ Undocumented
185 Method load_plugins Load plugins from self.plugin_dirs.
288 Method enable_plugin Enable a plugin.
330 Method disable_plugin Disable a plugin.
367 Method get_plugins Get the list of available plugins.
379 Method get_enabled_plugins Get the list of enabled plugins.
392 Method get_plugin_names Get the names of the installed plugins.
403 Method create_component Create a component given its path.
89 Method _deactivate_dist Undocumented
150 Method _is_uninstalled_plugin Undocumented
154 Method _fix_uninstalled_plugin Undocumented
182 Method _add_gstreamer_path Undocumented
440 Method _call_hook Undocumented
def __init__(self, plugin_dirs=None):
Undocumented
def _deactivate_dist(self, working_set, name='elisa'):
Undocumented
def _is_uninstalled_plugin(self, dist):
Undocumented
def _fix_uninstalled_plugin(self, dist, action):
Undocumented
def _add_gstreamer_path(self, path):
Undocumented
def load_plugins(self, disabled_plugins=):
Load plugins from self.plugin_dirs.
Parametersdisabled_pluginsa list of plugins that should be disabled (type: list of str )
NotesThis function runs without returning to the reactor for as long as it takes. There is no point in making it return before it is done as the plugin environment needs to be set up before any other part of elisa can run correctly.
By default, all the available plugins are enabled.
Unknown Field: attentionThis function should be called as early as possible at startup, before using any plugin.
def enable_plugin(self, plugin_name):
Enable a plugin.
Parametersplugin_namethe name of the plugin to enable (type: str )
def disable_plugin(self, plugin_name):
Disable a plugin.
Parametersplugin_namethe name of the plugin to disable (type: str )
def get_plugins(self):

Get the list of available plugins.

This call returns (plugin_name, status) tuples, where status is True if the plugin is enabled, False otherwise.
Returnsa generator yielding (plugin_name, status) tuples (type: generator )
def get_enabled_plugins(self):
Get the list of enabled plugins.
Returnsgenerator yielding plugin names (type: generator )
def get_plugin_names(self, path='elisa.plugins'):
Get the names of the installed plugins.
Parameterspathplugin path, defaults to 'elisa.plugins' (type: str )
Returnsa generator object yielding plugin names (type: generator )
def create_component(self, path, config=None, **kwargs):

Create a component given its path.

The path is in module:Component syntax, eg elisa.plugins.my_plugin:MyComponent.
Parameterspaththe component path (type: str )
configthe configuration to set for the component (type: elisa.core.config.Config )
Returnsan instance of the component identified by path (type: elisa.core.component.Component or a subclass )
def _call_hook(self, plugin_name, hook_name):
Undocumented
API Documentation for Elisa Media Center, generated by pydoctor at 2008-11-19 19:51:49.