sources as different names, explicit targets
This commit is contained in:
parent
cc4d8d1fc3
commit
1d9a6ec3f8
10 changed files with 252 additions and 62 deletions
|
@ -14,12 +14,13 @@
|
|||
#include "component.h"
|
||||
#include "download.h"
|
||||
#include "taskmanager.h"
|
||||
#include "source.h"
|
||||
|
||||
class Collection : protected Loggable {
|
||||
using Sources = std::set<std::string>;
|
||||
using SourcesQueue = std::queue<std::string>;
|
||||
using Downloads = std::map<std::string, std::unique_ptr<Download>>;
|
||||
using Components = std::map<std::string, std::unique_ptr<Component>>;
|
||||
using Sources = std::set<Source>;
|
||||
using SourcesQueue = std::queue<Source>;
|
||||
using Downloads = std::map<Source, std::unique_ptr<Download>>;
|
||||
using Components = std::map<Source, std::unique_ptr<Component>>;
|
||||
|
||||
public:
|
||||
Collection(
|
||||
|
@ -37,22 +38,22 @@ public:
|
|||
unsigned int sourcesError() const;
|
||||
unsigned int sourcesSuccess() const;
|
||||
|
||||
bool hasSource(const std::string& source) const;
|
||||
void addSource(const std::string& source);
|
||||
bool hasSource(const Source& source) const;
|
||||
void addSource(const Source& source);
|
||||
|
||||
private:
|
||||
void sourceDownaloded(const std::string& source, TaskManager::Error err);
|
||||
void sourceRead(const std::string& source, TaskManager::Error err);
|
||||
void sourceBuilt(const std::string& source, TaskManager::Error err);
|
||||
void sourceDownaloded(const Source& source, TaskManager::Error err);
|
||||
void sourceRead(const Source& source, TaskManager::Error err);
|
||||
void sourceBuilt(const Source& source, TaskManager::Error err);
|
||||
void rootBuilt(TaskManager::Error err);
|
||||
|
||||
static bool isRemote(const std::string& source);
|
||||
|
||||
void processSource(const std::string& source);
|
||||
void queueDownload(const std::string& source);
|
||||
void queueRead(const std::string& source, const std::filesystem::path& location);
|
||||
void processSource(const Source& source);
|
||||
void queueDownload(const Source& source);
|
||||
void queueRead(const Source& source, const std::filesystem::path& location);
|
||||
|
||||
bool _hasSource(const std::string& source) const;
|
||||
bool _hasSource(const Source& source) const;
|
||||
unsigned int _sourcesTotal() const;
|
||||
unsigned int _sourcesPending() const;
|
||||
unsigned int _sourcesError() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue