changed: plugin messages:
WINIX_FILE_REMOVED and WINIX_DIR_PREPARE_TO_REMOVE now as a parameter we have a pointer to the Item struct changed: export plugin now exports all files from a directory (in the future there'll be an option how the plugin should behave) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@772 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -35,6 +35,12 @@ void ExportInfo::SetConfig(Config * pconfig)
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::SetEDb(EDb * pdb)
|
||||
{
|
||||
edb = pdb;
|
||||
}
|
||||
|
||||
|
||||
void ExportInfo::SetDb(Db * pdb)
|
||||
{
|
||||
db = pdb;
|
||||
@@ -50,7 +56,7 @@ void ExportInfo::SetExportThread(ExportThread * pexport_thread)
|
||||
|
||||
void ExportInfo::ReadExportDirs()
|
||||
{
|
||||
db->GetExportDirs(export_dirs);
|
||||
edb->GetExportDirs(export_dirs);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +157,7 @@ void ExportInfo::SendFile(const Item & item, bool thumb)
|
||||
|
||||
msg.errors = 0;
|
||||
|
||||
if( SkipDir(exp_dir->dir_id, msg.path) && db->GetExport(exp_dir->id, exp) )
|
||||
if( SkipDir(exp_dir->dir_id, msg.path) && edb->GetExport(exp_dir->id, exp) )
|
||||
{
|
||||
if( DecodePass(exp) )
|
||||
{
|
||||
@@ -195,7 +201,7 @@ void ExportInfo::SendDir(const Item & item)
|
||||
|
||||
msg.errors = 0;
|
||||
|
||||
if( SkipDir(exp_dir->dir_id, msg.path) && db->GetExport(exp_dir->id, exp) )
|
||||
if( SkipDir(exp_dir->dir_id, msg.path) && edb->GetExport(exp_dir->id, exp) )
|
||||
{
|
||||
if( DecodePass(exp) )
|
||||
{
|
||||
@@ -228,6 +234,25 @@ void ExportInfo::SendDir(long dir_id)
|
||||
}
|
||||
|
||||
|
||||
// send all non-static files from a directory
|
||||
void ExportInfo::SendAllFilesFromDir(long dir_id)
|
||||
{
|
||||
iq_dir.SetAll(false, false);
|
||||
iq_dir.sel_parent_id = true;
|
||||
iq_dir.sel_url = true;
|
||||
iq_dir.sel_file = true;
|
||||
iq_dir.WhereParentId(dir_id);
|
||||
iq_dir.WhereType(Item::file);
|
||||
iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
|
||||
|
||||
db->GetItems(dir_items, iq_dir);
|
||||
|
||||
for(size_t i=0 ; i<dir_items.size() ; ++i)
|
||||
{
|
||||
SendFile(dir_items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user