Package flumotion :: Package wizard :: Module interfaces
[hide private]

Source Code for Module flumotion.wizard.interfaces

  1  # -*- Mode: Python -*- 
  2  # vi:si:et:sw=4:sts=4:ts=4 
  3  # 
  4  # Flumotion - a streaming media server 
  5  # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). 
  6  # All rights reserved. 
  7   
  8  # This file may be distributed and/or modified under the terms of 
  9  # the GNU General Public License version 2 as published by 
 10  # the Free Software Foundation. 
 11  # This file is distributed without any warranty; without even the implied 
 12  # warranty of merchantability or fitness for a particular purpose. 
 13  # See "LICENSE.GPL" in the source distribution for more information. 
 14   
 15  # Licensees having purchased or holding a valid Flumotion Advanced 
 16  # Streaming Server license may use this file in accordance with the 
 17  # Flumotion Advanced Streaming Server Commercial License Agreement. 
 18  # See "LICENSE.Flumotion" in the source distribution for more information. 
 19   
 20  # Headers in this file shall remain intact. 
 21   
 22  """Flumotion interfaces used by the wizard 
 23  """ 
 24   
 25  from zope.interface import Interface 
 26   
 27  __version__ = "$Rev: 6700 $" 
 28   
 29   
30 -class IProducerPlugin(Interface):
31 """A producer plugin is how you extend the production wizard page. 32 The main purpose of the plugin is to get a wizard step specific 33 to the plugin. 34 This entry point should be defined in the xml for the component 35 under the entry type "wizard". 36 """
37 - def __call__(wizard):
38 """Creates producer plugins 39 @param wizard: the wizard 40 @type wizard: L{ConfigurationWizard} 41 """
42
43 - def getProductionStep(type):
44 """Asks the plugin for a step. 45 type is the kind of plugin, it's useful for components such as 46 firewire for which you can point both audio and video to the 47 same plugin. 48 @param type: audio or video 49 @type type: string 50 @returns: the wizard step 51 @rtype: a L{WorkerWizardStep} subclass 52 """
53 54
55 -class IEncoderPlugin(Interface):
56 """An encoder plugin is how you extend the encoding wizard page. 57 The main purpose of the plugin is to get a wizard step specific 58 to the plugin. 59 This entry point should be defined in the xml for the component 60 under the entry type "wizard". 61 """
62 - def __call__(wizard):
63 """Creates encoder plugins 64 @param wizard: the wizard 65 @type wizard: L{ConfigurationWizard} 66 """
67
68 - def getConversionStep():
69 """Asks the plugin for a step. 70 @returns: the wizard step 71 @rtype: a L{WorkerWizardStep} subclass 72 """
73 74
75 -class IHTTPConsumerPlugin(Interface):
76 """A http consumer plugin is how you extend the HTTP consumer page. 77 The main purpose of the plugin is to get a consumer model (eg, a http server) 78 specific for this plugin. 79 This entry point should be defined in the xml for the component 80 under the entry type "wizard". 81 """
82 - def __call__(wizard):
83 """Creates http consumer plugins 84 @param wizard: the wizard 85 @type wizard: L{ConfigurationWizard} 86 """
87
88 - def workerChanged(worker):
89 """Called when the worker for the step changed. 90 @param worker: the worker 91 @type worker: L{WorkerComponentUIState} 92 """
93
94 - def getConsumer(streamer, audio_producer, video_producer):
95 """Asks the plugin for a consumer model 96 @param streamer: the http streamer 97 @type streamer: L{HTTPStreamer} subclass 98 @param audio_producer: audio producer for this stream 99 @type audio_producer: L{AudioProducer} subclass 100 @param video_producer: video producer for this stream 101 @type video_producer: L{VideoProducer} subclass 102 @returns: consumer 103 @rtype: a L{HTTPServer} subclass 104 """
105