WIP: remove the old database abstraction layer

remove such classes:
- DbBase
- DbConn
- DbTextStream
- Db

while here:
- remove: TextStream, SLog, TexTextStream
This commit is contained in:
2024-06-22 18:03:54 +02:00
parent 5d457f3d4b
commit 6aa100f12c
138 changed files with 6658 additions and 12402 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2011-2021, Tomasz Sowa
* Copyright (c) 2011-2024, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -72,12 +72,6 @@ void ExportInfo::SetEDb(EDb * pdb)
}
void ExportInfo::SetDb(Db * pdb)
{
db = pdb;
}
void ExportInfo::SetExportThread(ExportThread * pexport_thread)
{
export_thread = pexport_thread;
@@ -87,7 +81,7 @@ void ExportInfo::SetExportThread(ExportThread * pexport_thread)
void ExportInfo::ReadExportDirs()
{
edb->GetExportDirs(export_dirs);
edb->GetExportDirs(model_connector, export_dirs);
}
@@ -114,7 +108,7 @@ return 0;
bool ExportInfo::DecodePass(Export & exp)
{
if( exp.ftp_pass_type == 0 )
if( exp.export_ftp.pass_type == 0 )
{
}
@@ -210,13 +204,15 @@ void ExportInfo::SendFile(const Item & item, bool thumb, bool put_to_recurrence_
msg.errors = 0;
if( SkipDir(exp_dir->dir_id, msg.path) && edb->GetExport(exp_dir->id, exp) )
if( SkipDir(exp_dir->dir_id, msg.path) )
{
if( DecodePass(exp) )
edb->GetExport(model_connector, exp_dir->id, exp);
if( exp.found() && DecodePass(exp) )
{
msg.ftp_login = exp.ftp_login;
msg.ftp_pass = exp.ftp_pass;
msg.ftp_server = exp.ftp_server;
msg.ftp_login = exp.export_ftp.login;
msg.ftp_pass = exp.export_ftp.pass;
msg.ftp_server = exp.export_ftp.server;
msg.http_server = exp.http_server;
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);
@@ -262,13 +258,15 @@ void ExportInfo::SendDir(const Item & item)
msg.errors = 0;
if( SkipDir(exp_dir->dir_id, msg.path) && edb->GetExport(exp_dir->id, exp) )
if( SkipDir(exp_dir->dir_id, msg.path) )
{
if( DecodePass(exp) )
edb->GetExport(model_connector, exp_dir->id, exp);
if( exp.found() && DecodePass(exp) )
{
msg.ftp_login = exp.ftp_login;
msg.ftp_pass = exp.ftp_pass;
msg.ftp_server = exp.ftp_server;
msg.ftp_login = exp.export_ftp.login;
msg.ftp_pass = exp.export_ftp.pass;
msg.ftp_server = exp.export_ftp.server;
msg.http_server = exp.http_server;
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);