21#ifndef PCM_TASK_MANAGER_H_
22#define PCM_TASK_MANAGER_H_
29#include <condition_variable>
33#include <nlohmann/json-schema.hpp>
71 const wxString& aRepositoryId,
const bool isUpdate );
120 int downloadFile(
const wxString& aFilePath,
const wxString& aUrl );
132 const wxString& aRepositoryId,
const wxFileName& aFilePath,
133 const bool isUpdate );
143 bool extract(
const wxString& aFilePath,
const wxString& aPackageId,
bool isMultiThreaded );
152 const std::forward_list<wxRegEx>& aKeep = {} );
157 std::shared_ptr<PLUGIN_CONTENT_MANAGER>
m_pcm;
Helper class that handles package (un)installation.
std::atomic_bool m_color_themes_changed
void deletePackageDirectories(const wxString &aPackageId, const std::forward_list< wxRegEx > &aKeep={})
Delete all package files.
void InstallFromFile(wxWindow *aParent, const wxString &aFilePath)
Installs package from an archive file on disk.
SYNC_QUEUE< PCM_TASK > m_install_queue
std::shared_ptr< PLUGIN_CONTENT_MANAGER > m_pcm
void Uninstall(const PCM_PACKAGE &aPackage)
Enqueue package uninstallation.
SYNC_QUEUE< PCM_TASK > m_download_queue
void DownloadAndInstall(const PCM_PACKAGE &aPackage, const wxString &aVersion, const wxString &aRepositoryId, const bool isUpdate)
Enqueue package download and installation.
int downloadFile(const wxString &aFilePath, const wxString &aUrl)
Download URL to a file.
void installDownloadedPackage(const PCM_PACKAGE &aPackage, const wxString &aVersion, const wxString &aRepositoryId, const wxFileName &aFilePath, const bool isUpdate)
Installs downloaded package archive.
bool extract(const wxString &aFilePath, const wxString &aPackageId, bool isMultiThreaded)
Extract package archive.
void RunQueue(wxWindow *aParent)
Run queue of pending actions.
PCM_TASK_MANAGER(std::shared_ptr< PLUGIN_CONTENT_MANAGER > pcm)
std::unique_ptr< DIALOG_PCM_PROGRESS > m_reporter
bool ColorSettingsChanged() const
std::function< void()> PCM_TASK
Repository reference to a resource.