Go to the SVN repository for this file.
1 #ifndef GUI_UTILS__DOWNLOAD_JOB__HPP 2 #define GUI_UTILS__DOWNLOAD_JOB__HPP 59memset(&m_Cb, 0,
sizeof(m_Cb));
64 size_t GetSize(
void)
const{
returnm_Size; }
68 void Cancel() { m_Cancelled.Add(1); }
70 void SetPos(
size_tpos)
const{ m_Pos.Set((
int)pos); }
71 size_t GetPos()
const{
returnm_Pos.Get(); }
84 const string& base_dir,
85 const string& download_url,
86 boolextract_archive =
true);
89 const string& base_dir,
90 const string& download_url,
91 constvector<string>& files_to_load,
92 boolextract_archive =
true);
109 EJobStatex_DownloadAndExtract(
const string& url);
110 stringx_FormatSize(
size_tbytes);
CAtomicCounter_WithAutoInit â.
SCONN_Callback * CB(void)
void SetPos(size_t pos) const
const SCONN_Callback & CB(void) const
size_t GetTotalSize(void) const
CDownloadCallbackData(size_t size)
CAtomicCounter::TValue GetCancel() const
CAtomicCounter_WithAutoInit m_Cancelled
void AddTotalSize(size_t add)
size_t GetSize(void) const
Job to download list of files By default it extracts the downloaded tarball archives.
string m_TaskName
Name of the task.
string m_URL
URL to download.
bool m_ExtractArchives
Flag, indicating whether to extract archives on download.
CFastMutex m_Mutex
Mutex for guarding state access.
string m_BaseDir
Base directory to download and optionally unpack.
CRef< CAppJobError > m_Error
CDownloadCallbackData * m_DlcbData
vector< string > m_FilesToLoad
List of files to load.
TNCBIAtomicValue TValue
Alias TValue for TNCBIAtomicValue.
virtual CConstIRef< IAppJobProgress > GetProgress()=0
return progress object, the function shall be synchronized internally.
virtual bool IsCanceled() const =0
virtual CConstIRef< IAppJobError > GetError()=0
Returns IAppJobError object describing internal error that caused the Job to fail.
virtual void RequestCancel()=0
RequestCancel() is called to notify the Job that it shall exit Run() function ASAP.
virtual CRef< CObject > GetResult()=0
Returns the Job Result.
EJobState
Job states (describe FSM)
virtual string GetDescr() const =0
Returns a human readable description of the Job (optional)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
void Run(void)
Enter the main loop.
#define NCBI_GUIUTILS_EXPORT
Defines to provide correct exporting from DLLs in Windows.
const struct ncbi::grid::netcache::search::fields::SIZE size
Multi-threading â mutexes; rw-locks; semaphore.
The NCBI C++/STL use hints.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4