How components are created

-> include/y2/Y2ComponentCreator.h

The Y2ComponentCreator class is the interface between
a component and the component broker (Y2ComponentBroker.cc).
It is used to find and intialize a component, it is not used
for communication with a component.

The component broker keeps a global list of all known components.

Y2ComponentCreator(Y2ComponentBroker::order_t order);
  enters the component to the broker's list in the given order.

Y2Component *create(const char *name) const
  create the component and return a handle for communication
  (see interface.txt)
  name is used to identify components based on the same code
  (e.g. stdio and stderr)

Y2Component *create(const char *name, int level, int current_level)
  same as above, but for external components which may reside
  in different directories. The level identifies the directory prefix
  from the list defined in pathsearch.cc

bool isServerCreator() const
  return true for servers, false for clients.

bool isClientCreator()
  return false for servers, true for clients.


Catalog of component creators
=============================
(mvidner@suse.cz: I want to implement a simple system of path searching)

 Y2CCScript:

(in all levels)
try Y2PathSearch::findy2 ("clients/" + name + ".ycp")
try Y2PathSearch::completeFilename (name)
  if it ends with .ycp, take it
  if we can stat it and it is not executable, take it
  if we can't stat it and its 1st line matches
     ^#![[:space:]]*/bin/y2gf[[:space:]]\+$, take it

 Y2CCWFM:

"wfm", in current level only

 Y2CCProgram:

(in all levels)

[ "chroot=" root ":" ] [ path "/" ] base

if there's no slash
  try Y2PathSearch::findy2exe (root, name, creates_servers,
  creates_non_y2, level)
else if creates_servers then fail

if can stat it and is executable, create it

 Y2CCStdio:

"stdio"
"stderr"
"testsuite"

 Y2CCPlugin:

also acts as proxy for the stdio (stderr), serial and remote plugins:

 Y2CCSerial:

serial(bps):/device

 Y2CCRemote:

protocol://user:password@host/component		(telnet, .sh, rlogin)
protocol://user@host/component			(telnet, .sh, rlogin)
protocol://user/component			(su, sudo)
