2 #include <lib/base/init.h>
3 #include <lib/base/eerror.h>
6 std::list<std::pair<int,eAutoInit*> > *eInit::cl;
8 void eInit::add(int trl, eAutoInit *c)
11 cl=new std::list<std::pair<int,eAutoInit*> >;
12 cl->push_back(std::pair<int,eAutoInit*>(trl, c));
17 void eInit::remove(int trl, eAutoInit *c)
21 cl->remove(std::pair<int,eAutoInit*>(trl, c));
37 void eInit::setRunlevel(int nrl)
43 for (std::list<std::pair<int,eAutoInit*> >::iterator i(cl->begin()); i!=cl->end(); ++i)
47 eDebug("+ (%d) %s", rl, (*i).second->getDescription());
48 (*i).second->initNow();
55 for (std::list<std::pair<int,eAutoInit*> >::iterator i(cl->begin()); i!=cl->end(); ++i)
58 eDebug("- (%d) %s", rl, (*i).second->getDescription());
59 (*i).second->closeNow();
63 eDebug("reached rl %d", rl);
66 eAutoInit::~eAutoInit()