mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-25 05:28:37 -05:00
Cleanup and better configuration of resource syncs
This commit is contained in:
@@ -34,6 +34,11 @@
|
||||
|
||||
namespace openspace {
|
||||
|
||||
struct ResourceSynchronizationOptions {
|
||||
std::vector<std::string> httpSynchronizationRepositories;
|
||||
std::string synchronizationRoot;
|
||||
};
|
||||
|
||||
class ResourceSynchronization;
|
||||
|
||||
struct SynchronizationProduct {
|
||||
@@ -58,10 +63,11 @@ public:
|
||||
const ghoul::Dictionary& dictionary);
|
||||
|
||||
ResourceSynchronization();
|
||||
virtual ~ResourceSynchronization();
|
||||
virtual void synchronize() = 0;
|
||||
virtual std::string directory() = 0;
|
||||
|
||||
void setSyncRoot(std::string path);
|
||||
void setSynchronizationOptions(ResourceSynchronizationOptions opt);
|
||||
void wait();
|
||||
bool isResolved();
|
||||
void resolve();
|
||||
@@ -69,7 +75,7 @@ public:
|
||||
void updateProgress(float t);
|
||||
std::shared_ptr<SynchronizationJob> job();
|
||||
protected:
|
||||
std::string _syncRoot;
|
||||
ResourceSynchronizationOptions _synchronizationOptions;
|
||||
private:
|
||||
std::shared_ptr<SynchronizationJob> _job;
|
||||
std::atomic<bool> _started;
|
||||
|
||||
Reference in New Issue
Block a user