start working on 0.7.x branch

- added FileLog which stores content to the file log
- now Log is only a wrapper - it puts messages to the local buffer and when logsave is used then the buffer is put to FileLog
- new base classes:
  WinixBase (Log, Config*, Synchro*)
  WinixModel : public WinixBase (morm::ModelConnector*, Plugin*)
  WinixSystem : public WinixModel (System*)
  WinixRequest : public WinixSystem (SLog, Cur*)
- singletons: log, slog, plugin are depracated - now references to them are in base classses (WinixBase, WinixModel)
- DbBase,  DbConn and Db are depracated - now we are using Morm project (in WinixModel there is a model_connector pointer)
  each thread will have its own ModelConnector





git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1146 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2018-11-21 11:03:53 +00:00
parent a7c47140ae
commit a2ffc1e81c
121 changed files with 7832 additions and 6662 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* Copyright (c) 2008-2018, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,6 @@
#include <errno.h>
#include "mv.h"
#include "functions.h"
#include "core/plugin.h"
@@ -299,7 +298,7 @@ void Mv::MoveFilesPrepareTreeGo(const Item & src_dir)
db->GetItems(files_item_tab, files_iq);
for(size_t i=0 ; i<files_item_tab.size() ; ++i)
plugin.Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
}
@@ -309,7 +308,7 @@ void Mv::MoveFilesPrepareTree(const Item & src_dir)
// we only calling plugins here
// so if there is no WINIX_FILE_PREPARE_TO_MOVE message
// we can immediately return and the database will not be bothered
if( plugin.HasMessage(WINIX_FILE_PREPARE_TO_MOVE) )
if( plugin->HasMessage(WINIX_FILE_PREPARE_TO_MOVE) )
{
MoveFilesPrepareTreeGo(src_dir);
}
@@ -332,9 +331,9 @@ void Mv::MoveFilesTree(const Item & dir)
{
if( files_item_tab[i].file_type != WINIX_ITEM_FILETYPE_NONE )
{
plugin.Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &files_item_tab[i]);
MoveStaticFile(files_item_tab[i]);
plugin.Call(WINIX_FILE_MOVED, &files_item_tab[i]);
plugin->Call(WINIX_FILE_MOVED, &files_item_tab[i]);
}
}
}
@@ -489,7 +488,7 @@ bool Mv::MoveDir2(Item & src_dir, const std::wstring & dst_path, bool check_acce
// private
bool Mv::MoveFileOrSymlink(Item & src_file, std::vector<Item*> & dst_dir_tab, const std::wstring & new_url)
{
plugin.Call(WINIX_FILE_PREPARE_TO_MOVE, &src_file);
plugin->Call(WINIX_FILE_PREPARE_TO_MOVE, &src_file);
old_url = src_file.url;
@@ -516,7 +515,7 @@ bool Mv::MoveFileOrSymlink(Item & src_file, std::vector<Item*> & dst_dir_tab, co
if( src_file.file_type != WINIX_ITEM_FILETYPE_NONE )
MoveStaticFile(src_file);
plugin.Call(WINIX_FILE_MOVED, &src_file);
plugin->Call(WINIX_FILE_MOVED, &src_file);
return true;
}