r6218 -
flumotion/branches/wizard-pluggable-http-consumers/flumotion/component/consumers/httpstreamer
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Wed Feb 13 18:12:43 CET 2008
Author: jdahlin
Date: Wed Feb 13 18:12:42 2008
New Revision: 6218
Log:
Update doc strings
Modified:
flumotion/branches/wizard-pluggable-http-consumers/flumotion/component/consumers/httpstreamer/http_wizard.py
Modified: flumotion/branches/wizard-pluggable-http-consumers/flumotion/component/consumers/httpstreamer/http_wizard.py
==============================================================================
--- flumotion/branches/wizard-pluggable-http-consumers/flumotion/component/consumers/httpstreamer/http_wizard.py (original)
+++ flumotion/branches/wizard-pluggable-http-consumers/flumotion/component/consumers/httpstreamer/http_wizard.py Wed Feb 13 18:12:42 2008
@@ -138,13 +138,21 @@
class PlugPluginLine(gtk.VBox):
- """XXX
+ """I am a line in the plug plugin area representing a single plugin.
+ Rendered, I am visible as a checkbutton containing a label with the
+ description of the plugin.
+ Signals::
+ - enable-changed: emitted when I am enabled/disabled
+ @ivar plugin: plugin instance
"""
gsignal('enable-changed')
def __init__(self, plugin, description):
+ """
+ @param plugin: plugin instance
+ @param description: description of the plugin
+ """
gtk.VBox.__init__(self)
self.plugin = plugin
- self.description = description
self.checkbutton = gtk.CheckButton(description)
self.checkbutton.connect('toggled',
self._on_checkbutton__toggled)
@@ -152,6 +160,10 @@
self.checkbutton.show()
def isEnabled(self):
+ """Find out if the plugin is going to be enabled or not
+ @returns: enabled
+ @rtype: bool
+ """
return self.checkbutton.get_active()
def _on_checkbutton__toggled(self, checkbutton):
@@ -160,36 +172,43 @@
class PlugPluginArea(gtk.VBox):
- """XXX
+ """I am plugin area representing all available plugins. I keep track
+ of the plugins and their internal state. You can ask me to add new plugins
+ or get the internal models of the plugins.
"""
def __init__(self, streamer):
self.streamer = streamer
gtk.VBox.__init__(self, spacing=6)
- #self.set_border_width(6)
- self.lines = []
+ self._lines = []
# Public
def addPlug(self, plugin, description):
"""Add a plug, eg a checkbutton with a description such as
'Cortado Java applet'.
- @param plugin:
+ @param plugin: plugin instance
@param description: label description
"""
line = PlugPluginLine(plugin, description)
line.connect('enable-changed', self._on_plugline__enable_changed)
- self.lines.append(line)
+ self._lines.append(line)
self.pack_start(line, False, False)
line.show()
def getPorters(self):
- """XXX
+ """Fetch a list of porters which are going to be used by all
+ available plugins.
+ @returns: porters
+ @rtype: a sequence of L{HTTPPorters}
"""
for plugin in self._getEnabledPlugins():
yield HTTPPorter(self.streamer)
def getServerConsumers(self, audio_producer, video_producer):
- """XXX
+ """Fetch a list of server consumers which are going to be used by all
+ available plugins.
+ @returns: consumers
+ @rtype: a sequence of L{HTTPServer} subclasses
"""
for plugin in self._getEnabledPlugins():
yield plugin.getConsumer(self.streamer, audio_producer,
@@ -198,13 +217,13 @@
# Private
def _hasEnabledPlugins(self):
- for line in self.lines:
+ for line in self._lines:
if line.isEnabled():
return True
return False
def _getEnabledPlugins(self):
- for line in self.lines:
+ for line in self._lines:
if line.isEnabled():
yield line.plugin
More information about the flumotion-commit
mailing list