Remove torrent-based synchronization

This commit is contained in:
Alexander Bock
2019-07-18 12:10:49 +02:00
parent 66cd0413dd
commit 2fca9a2a2c
9 changed files with 1 additions and 761 deletions

View File

@@ -25,7 +25,6 @@
#include <modules/sync/syncmodule.h>
#include <modules/sync/syncs/httpsynchronization.h>
#include <modules/sync/syncs/torrentsynchronization.h>
#include <modules/sync/syncs/urlsynchronization.h>
#include <modules/sync/tasks/syncassettask.h>
#include <openspace/documentation/documentation.h>
@@ -87,19 +86,6 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) {
}
);
#ifdef SYNC_USE_LIBTORRENT
fSynchronization->registerClass(
"TorrentSynchronization",
[this](bool, const ghoul::Dictionary& dictionary) {
return new TorrentSynchronization(
dictionary,
_synchronizationRoot,
_torrentClient
);
}
);
#endif // SYNC_USE_LIBTORRENT
fSynchronization->registerClass(
"UrlSynchronization",
[this](bool, const ghoul::Dictionary& dictionary) {
@@ -113,17 +99,6 @@ void SyncModule::internalInitialize(const ghoul::Dictionary& configuration) {
auto fTask = FactoryManager::ref().factory<Task>();
ghoul_assert(fTask, "No task factory existed");
fTask->registerClass<SyncAssetTask>("SyncAssetTask");
#ifdef SYNC_USE_LIBTORRENT
_torrentClient.initialize();
global::callback::deinitialize.emplace_back([&]() { _torrentClient.deinitialize(); });
#endif // SYNC_USE_LIBTORRENT
}
void SyncModule::internalDeinitialize() {
#ifdef SYNC_USE_LIBTORRENT
_torrentClient.deinitialize();
#endif // SYNC_USE_LIBTORRENT
}
std::string SyncModule::synchronizationRoot() const {
@@ -140,10 +115,7 @@ std::vector<std::string> SyncModule::httpSynchronizationRepositories() const {
std::vector<documentation::Documentation> SyncModule::documentations() const {
return {
HttpSynchronization::Documentation(),
#ifdef SYNC_USE_LIBTORRENT
TorrentSynchronization::Documentation()
#endif // SYNC_USE_LIBTORRENT
HttpSynchronization::Documentation()
};
}