#include <DownloadLogger.hpp>
|
void | addLog (std::string_view logTitle, std::string_view logMessage, eDownloadLogState logState) override |
| Add a child log to the download logger.
|
|
std::shared_ptr< IDownloadLogger > | addSubLog (std::string_view logTitle, std::string_view logMessage, eDownloadLogState logState) override |
| Add a child log to the download logger.
|
|
std::shared_ptr< AbstractProgress > | addSubLogProgress (const std::string &title) |
|
void | start () override |
| Start the download logger dialog. It opens a dialog with a tree to show the download progress.
|
|
void | end () override |
| End the download logger dialog.
|
|
void | close () |
| Close the download logger dialog.
|
|
bool | isCancelled () const override |
| Check if the user cancelled the download.
|
|
void | exportLogs () const |
| Export the logs to a json file.
|
|
◆ DownloadLogger()
iv::logs::DownloadLogger::DownloadLogger |
( |
std::string_view | dialogTitle, |
|
|
CDialog * | dlgFatherRef ) |
|
private |
◆ addLog()
void iv::logs::DownloadLogger::addLog |
( |
std::string_view | logTitle, |
|
|
std::string_view | logMessage, |
|
|
eDownloadLogState | logState ) |
|
overridevirtual |
Add a child log to the download logger.
- Parameters
-
logTitle | Title of the log |
logMessage | Message of the log |
logState | State of the log |
- Note
- The log will be added as a child of context log.
Implements iv::logs::IDownloadLogger.
◆ addSubLog()
Add a child log to the download logger.
- Parameters
-
logTitle | Title of the log |
logMessage | Message of the log |
logState | State of the log |
- Returns
- A shared pointer of the IDownloadLogger with the new log context.
- Note
- The log will be added as a child of context log.
-
The returned IDownloadLogger must be used to add sub logs to this child log.
Implements iv::logs::IDownloadLogger.
◆ addSubLogProgress()
std::shared_ptr< AbstractProgress > iv::logs::DownloadLogger::addSubLogProgress |
( |
const std::string & | title | ) |
|
◆ close()
void iv::logs::DownloadLogger::close |
( |
| ) |
|
Close the download logger dialog.
◆ createLogger()
std::shared_ptr< DownloadLogger > iv::logs::DownloadLogger::createLogger |
( |
std::string_view | operationTitle, |
|
|
CDialog * | dlgFatherRef ) |
|
static |
◆ end()
void iv::logs::DownloadLogger::end |
( |
| ) |
|
|
overridevirtual |
◆ exportLogs()
void iv::logs::DownloadLogger::exportLogs |
( |
| ) |
const |
Export the logs to a json file.
◆ isCancelled()
bool iv::logs::DownloadLogger::isCancelled |
( |
| ) |
const |
|
nodiscardoverridevirtual |
Check if the user cancelled the download.
- Returns
- True if the download has been cancelled, false otherwise.
Implements iv::logs::IDownloadLogger.
◆ prvCheckFailedDownload()
void iv::logs::DownloadLogger::prvCheckFailedDownload |
( |
| ) |
const |
|
private |
◆ prvHasFailedDownload()
bool iv::logs::DownloadLogger::prvHasFailedDownload |
( |
| ) |
const |
|
nodiscardprivate |
◆ prvShowEndedPanel()
void iv::logs::DownloadLogger::prvShowEndedPanel |
( |
| ) |
|
|
private |
Show the ended panel.
- Warning
- This function must be called in the main thread or a listener.
◆ prvShowLogsTree()
void iv::logs::DownloadLogger::prvShowLogsTree |
( |
| ) |
|
|
private |
Show the logs tree.
- Warning
- This function must be called in the main thread or a listener.
◆ prvUpdateProgress()
void iv::logs::DownloadLogger::prvUpdateProgress |
( |
| ) |
|
|
private |
◆ start()
void iv::logs::DownloadLogger::start |
( |
| ) |
|
|
overridevirtual |
Start the download logger dialog. It opens a dialog with a tree to show the download progress.
- Note
- The dialog has a cancel button to cancel the download, which must be checked with isCancelled() function.
-
The download logger must be finished with end() function and closed with close() function.
- Warning
- This function must be called in the main thread.
Implements iv::logs::IDownloadLogger.
◆ m_dialogComponents
◆ m_dlgFatherRef
CDialog* iv::logs::DownloadLogger::m_dlgFatherRef {nullptr} |
|
private |
◆ m_dlgModeless
std::shared_ptr<CDialog> iv::logs::DownloadLogger::m_dlgModeless {nullptr} |
|
private |
◆ m_instance
std::shared_ptr< DownloadLogger > iv::logs::DownloadLogger::m_instance = nullptr |
|
staticprivate |
◆ m_isCancelled
std::shared_ptr<std::atomic_bool> iv::logs::DownloadLogger::m_isCancelled |
|
private |
◆ m_isEnded
std::shared_ptr<std::atomic_bool> iv::logs::DownloadLogger::m_isEnded |
|
private |
◆ m_mutex
std::shared_ptr<std::mutex> iv::logs::DownloadLogger::m_mutex |
|
private |
◆ m_operationTitle
std::string iv::logs::DownloadLogger::m_operationTitle |
|
private |
◆ m_requiresProgressReconstruction
std::shared_ptr<std::atomic_bool> iv::logs::DownloadLogger::m_requiresProgressReconstruction |
|
private |
◆ m_requiresUpdate
std::shared_ptr<std::atomic_bool> iv::logs::DownloadLogger::m_requiresUpdate |
|
private |
◆ m_subLoggersInfos
std::shared_ptr<std::vector<std::shared_ptr<DownloadLoggerInfo> > > iv::logs::DownloadLogger::m_subLoggersInfos |
|
private |
◆ m_subLoggersProgress
std::shared_ptr<std::vector<SubLoggerComponent> > iv::logs::DownloadLogger::m_subLoggersProgress |
|
private |
The documentation for this class was generated from the following files: