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 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  import gettext 
 23   
 24  from flumotion.admin.gtk.workerstep import WorkerWizardStep 
 25  from flumotion.common import messages 
 26   
 27  __version__ = "$Rev$" 
 28  _ = gettext.gettext 
 29   
 30   
31 -class AudioProducerStep(WorkerWizardStep):
32 section = _('Production') 33
34 - def __init__(self, wizard, model):
35 self.model = model 36 WorkerWizardStep.__init__(self, wizard)
37 38
39 -class VideoProducerStep(WorkerWizardStep):
40 section = _('Production') 41 icon = 'widget_doc.png' 42
43 - def __init__(self, wizard, model):
44 self.model = model 45 WorkerWizardStep.__init__(self, wizard)
46 47 # WizardStep 48
49 - def getNext(self):
50 from flumotion.admin.gtk.overlaystep import OverlayStep 51 return OverlayStep(self.wizard, self.model)
52 53
54 -class VideoEncoderStep(WorkerWizardStep):
55 section = _('Conversion') 56
57 - def __init__(self, wizard, model):
58 self.model = model 59 WorkerWizardStep.__init__(self, wizard)
60
61 - def getNext(self):
62 return self.wizard.getStep('Encoding').getAudioPage()
63 64
65 -class AudioEncoderStep(WorkerWizardStep):
66 gladeFile = 'audio-encoder-wizard.glade' 67 section = _('Conversion') 68
69 - def __init__(self, wizard, model):
70 self.model = model 71 WorkerWizardStep.__init__(self, wizard)
72 73 # WizardStep 74
75 - def getNext(self):
76 return None
77 78
79 -class ConsumerStep(WorkerWizardStep):
80 section = _('Consumption') 81
82 - def getConsumerModel(self):
83 raise NotImplementedError(self)
84
85 - def getComponentType(self):
86 raise NotImplementedError(self)
87
88 - def getServerConsumers(self):
89 """Returns the http-server consumer model or None 90 if there will only a stream served. 91 @returns: the server consumer or None 92 """ 93 return []
94
95 - def getPorters(self):
96 """Returns the porter model or None if there will only a stream served. 97 @returns: the porter or None 98 """ 99 return []
100 101 # WizardStep 102
103 - def getNext(self):
104 if not self.wizard.hasStep('Consumption'): 105 return None 106 return self.wizard.getStep('Consumption').getNext(self)
107