A scenario sits between wizard and its wizard steps
It takes care of fetching the state of the steps and doing something
useful to it, eg present next step in case of wizards.

Current Basic scenario
======================

Notes:
 -> Name of page
 ui widget >> element property

Welcome
  -> Source

Source
  if has_video
     get step from combobox_video
   else if has_audio
     get step from combobox_audio

VideoSource (for Webcam, TVCard, FireWire, TestVideoSource)
  -> Overlay

Webcam
  -> inherited from VideoSource
  device	>> device
  width		>> width
  height	>> height
  framerate	>> framerate

TVCard
  -> inherited from VideoSource
  device	>> device
  video source	>> channel
  norm		>> signal
  width		>> width
  height	>> height
  framerate	>> framerate

Firewire
  -> inherited from VideoSource
  width		>> width
  height	>> height
  framerate	>> framerate

TestVideoSource
  -> inherited from VideoSource
  width		>> width
  height	>> height
  framerate	>> framerate
  format 	>> format

Soundcard
  -> inherited from VideoSource
  sound system	>> source-element
  device	>> device
  input		>> unused?
  channels	>> channels
  bit depth	>> depth
  sample rate	>> rate

XXX: Add properties for the rest of the components

Overlay
  if Source option has_video is true
    get Source option audio
    if Soundcard is selected
      -> Soundcard
    else
      -> Test Audio Source
  Component properties:
    show text
    text
    show logo

Soundcard
  -> Encoding

Encoding
  # video "algorithm"
  if Source option has_video is true
    if combobox_video is theora
      -> Theora
    else if it is smoke
      -> Smoke
    else if it is JPEG
      -> JPEG
  # audio "algorithm"
  else if Source option has_audio is true
    if combobox_audio is vorbis
      -> Vorbis
    else if it is Speex
      -> Speex
    else if it is Mulaw
      -> Consumption
  else
    -> Consumption

VideoEncoding (for Theora, Smoke, JPEG)
  -> Use audio algorithm from Encoding

AudioEncoder (for Vorbis, Speex)
  -> Consumption

Consumption (for all HTTP and Disk)
  Complex algorithm, see flumotion/wizard/steps.py
  ends up with:
  -> License

License
  -> Summary


API Requirements
================

  Add pages
  Activate pages
  Fetch a property from pages

Properties
==========

Some steps have some widgets which maps to component properties
In most cases, they'll map directly so

  Component.property = WizardStep.property

However, not all "state widgets" does map to a property of a component,
and sometimes a conversion (eg, float, int) needs to be performed.

  Component.property = filter_function(WizardStep.property)

and for the different name case

  Component.some_name = WizardStep.property


Element checking
================

A step might require a certain element to be present at a worker
to be able to function properly. Proposed implementation is to specify this
in the wizard step, but not have the wizar step actually performing the
logic to do the check, it should probably be done in the wizard.
Since checking an element is not really tied to a scenario.

Saving to disk
==============
To save the state to disk it need to link different components together.
The current code (flumotion/wizard/save.py) can partly be reused.
However, there should be no mention of any component names in it, it needs
to be completely generic.

For example, feeds and eaters needs to be introspected properly.
Maybe it should be up to the scenary to actually link the components together.
