#include "ListThread.h" #include #include #include "../../../cpp11addition.h" #include "async/TransferThreadAsync.h" void ListThread::pause() { ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); if(putInPause) { ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already in pause!"); return; } putInPause=true; int index=0; int loop_sub_size_transfer_thread_search=transferThreadList.size(); while(indexpause(); index++; } emit isInPause(true); } void ListThread::resume() { ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); if(!putInPause) { ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Seam already resumed!"); return; } putInPause=false; startGeneralTransfer(); doNewActions_start_transfer(); int index=0; int loop_sub_size_transfer_thread_search=transferThreadList.size(); while(indexresume(); index++; } emit isInPause(false); } void ListThread::skip(const uint64_t &id) { skipInternal(id); } bool ListThread::skipInternal(const uint64_t &id) { int index=0; int loop_sub_size_transfer_thread_search=transferThreadList.size(); while(indextransferId==id) { ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"skip one transfer: "+std::to_string(id)); transferThreadList.at(index)->skip(); return true; } index++; } int int_for_internal_loop=0; const int &loop_size=actionToDoListTransfer.size(); while(int_for_internal_loopstop(); transferThreadList.at(index)->transferId=0; index++; } index=0; loop_size=scanFileOrFolderThreadsPool.size(); while(indexstop(); delete scanFileOrFolderThreadsPool.at(index);//->deleteLayer(); scanFileOrFolderThreadsPool[index]=NULL; index++; } scanFileOrFolderThreadsPool.clear(); #ifdef ULTRACOPIER_PLUGIN_SPEED_SUPPORT if(clockForTheCopySpeed!=NULL) { clockForTheCopySpeed->stop(); delete clockForTheCopySpeed; clockForTheCopySpeed=NULL; } #endif checkIfReadyToCancel(); }