some work in the new api:

- log_level and save_each_line moved from Log to FileLog
- other fixes in loggers
- DirContainer from Dirs and LoadAvg had no dependencies set




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1148 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-11-21 22:53:24 +00:00
parent 89d303f375
commit 491dd27ebf
18 changed files with 116 additions and 81 deletions

View File

@@ -83,9 +83,20 @@ void System::SetSessionManager(SessionManager * sm)
void System::set_dependency(WinixModel * winix_model)
{
WinixModel::set_dependency(winix_model);
dirs.set_dependency(this);
mounts.set_dependency(this);
users.set_dependency(this);
groups.set_dependency(this);
rebus.set_dependency(this);
load_avg.set_dependency(this);
notify.set_dependency(this);
image.set_dependency(this);
crypt.set_dependency(this);
thread_manager.set_dependency(this);
job.set_dependency(winix_model);
time_zones.set_dependency(winix_model);
WinixModel::set_dependency(winix_model);
}
@@ -115,16 +126,13 @@ void System::ReadTimeZones()
void System::Init()
{
//thread_manager.SetSynchro(synchro);
thread_manager.set_dependency(this);
thread_manager.Init();
dirs.set_dependency(this);
dirs.SetDb(db);
dirs.SetCur(cur); // only one method is using cur, can be passed as a parameter to the method
dirs.SetNotify(&notify);
dirs.ReadDirs();
mounts.set_dependency(this);
mounts.SkipStaticDirs(config->dont_use_static_dirs);
mounts.SetDirs(&dirs);
mounts.SetDb(db);
@@ -132,19 +140,16 @@ void System::Init()
mounts.CreateMounts();
mounts.ReadMounts();
users.set_dependency(this);
users.SetCur(cur);
users.SetSessionManager(session_manager);
users.ReadUsers(db);
groups.set_dependency(this);
groups.ReadGroups(db); // !! chwilowe przekazanie argumentu, db bedzie zmienione
rebus.set_dependency(this);
rebus.SetCur(cur);
rebus.Init();
notify.set_dependency(this);
notify.SetCur(cur);
//notify.SetConfig(config);
notify.SetUsers(&users);
@@ -157,7 +162,8 @@ void System::Init()
image.SetSystem(this);
thread_manager.Add(&image, L"image");
crypt.set_dependency(this);
// SetSynchro will be called by ThreadManager itself
// job.ReadFromFile();