Package flumotion :: Package admin :: Package gtk :: Module basesteps
[hide private]

Source Code for Module flumotion.admin.gtk.basesteps

  1  # -*- Mode: Python -*- 
  2  # vi:si:et:sw=4:sts=4:ts=4 
  3   
  4  # Flumotion - a streaming media server 
  5  # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. 
  6  # Copyright (C) 2010,2011 Flumotion Services, S.A. 
  7  # All rights reserved. 
  8  # 
  9  # This file may be distributed and/or modified under the terms of 
 10  # the GNU Lesser General Public License version 2.1 as published by 
 11  # the Free Software Foundation. 
 12  # This file is distributed without any warranty; without even the implied 
 13  # warranty of merchantability or fitness for a particular purpose. 
 14  # See "LICENSE.LGPL" in the source distribution for more information. 
 15  # 
 16  # Headers in this file shall remain intact. 
 17   
 18  import gettext 
 19   
 20  from flumotion.admin.gtk.workerstep import WorkerWizardStep 
 21  from flumotion.common import messages 
 22   
 23  __version__ = "$Rev$" 
 24  _ = gettext.gettext 
 25   
 26   
27 -class AudioProducerStep(WorkerWizardStep):
28 section = _('Production') 29
30 - def __init__(self, wizard, model):
31 self.model = model 32 WorkerWizardStep.__init__(self, wizard)
33 34
35 -class VideoProducerStep(WorkerWizardStep):
36 section = _('Production') 37 icon = 'widget_doc.png' 38
39 - def __init__(self, wizard, model):
40 self.model = model 41 WorkerWizardStep.__init__(self, wizard)
42 43 # WizardStep 44
45 - def getNext(self):
46 from flumotion.admin.gtk.overlaystep import OverlayStep 47 return OverlayStep(self.wizard, self.model)
48 49
50 -class VideoEncoderStep(WorkerWizardStep):
51 section = _('Conversion') 52
53 - def __init__(self, wizard, model):
54 self.model = model 55 WorkerWizardStep.__init__(self, wizard)
56
57 - def getNext(self):
58 return self.wizard.getStep('Encoding').getAudioPage()
59 60
61 -class AudioEncoderStep(WorkerWizardStep):
62 gladeFile = 'audio-encoder-wizard.glade' 63 section = _('Conversion') 64
65 - def __init__(self, wizard, model):
66 self.model = model 67 WorkerWizardStep.__init__(self, wizard)
68 69 # WizardStep 70
71 - def getNext(self):
72 return None
73 74
75 -class ConsumerStep(WorkerWizardStep):
76 section = _('Consumption') 77
78 - def getConsumerModel(self):
79 raise NotImplementedError(self)
80
81 - def getComponentType(self):
82 raise NotImplementedError(self)
83
84 - def getServerConsumers(self):
85 """Returns the http-server consumer model or None 86 if there will only a stream served. 87 @returns: the server consumer or None 88 """ 89 return []
90
91 - def getPorters(self):
92 """Returns the porter model or None if there will only a stream served. 93 @returns: the porter or None 94 """ 95 return []
96 97 # WizardStep 98
99 - def getNext(self):
100 if not self.wizard.hasStep('Consumption'): 101 return None 102 return self.wizard.getStep('Consumption').getNext(self)
103