summaryrefslogtreecommitdiffstats
path: root/logic/OneSixUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-26 19:55:48 +0200
committerPetr Mrázek <peterix@gmail.com>2013-10-26 19:55:48 +0200
commit923347729557eed76e4f7e9f6f5f1a79216de0a4 (patch)
treea54a29be846e76b2b57fed03e74eb6fa5ddcf978 /logic/OneSixUpdate.cpp
parentc467ebf1327d6266fc51443edfac6f0b536b6602 (diff)
downloadMultiMC-923347729557eed76e4f7e9f6f5f1a79216de0a4.tar
MultiMC-923347729557eed76e4f7e9f6f5f1a79216de0a4.tar.gz
MultiMC-923347729557eed76e4f7e9f6f5f1a79216de0a4.tar.lz
MultiMC-923347729557eed76e4f7e9f6f5f1a79216de0a4.tar.xz
MultiMC-923347729557eed76e4f7e9f6f5f1a79216de0a4.zip
S3 bucket listing support and network code refactors.
* Adds support for listing all objects in an S3 bucket. * Renames a bunch of network related classes (Download->Action) * Net actions now have static constructors
Diffstat (limited to 'logic/OneSixUpdate.cpp')
-rw-r--r--logic/OneSixUpdate.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/logic/OneSixUpdate.cpp b/logic/OneSixUpdate.cpp
index b5f1d78b..5c421fbf 100644
--- a/logic/OneSixUpdate.cpp
+++ b/logic/OneSixUpdate.cpp
@@ -72,8 +72,8 @@ void OneSixUpdate::versionFileStart()
QString urlstr("http://s3.amazonaws.com/Minecraft.Download/versions/");
urlstr += targetVersion->descriptor() + "/" + targetVersion->descriptor() + ".json";
- auto job = new DownloadJob("Version index");
- job->addByteArrayDownload(QUrl(urlstr));
+ auto job = new NetJob("Version index");
+ job->addNetAction(ByteArrayDownload::make(QUrl(urlstr)));
specificVersionDownloadJob.reset(job);
connect(specificVersionDownloadJob.get(), SIGNAL(succeeded()), SLOT(versionFileFinished()));
connect(specificVersionDownloadJob.get(), SIGNAL(failed()), SLOT(versionFileFailed()));
@@ -84,7 +84,7 @@ void OneSixUpdate::versionFileStart()
void OneSixUpdate::versionFileFinished()
{
- DownloadPtr DlJob = specificVersionDownloadJob->first();
+ NetActionPtr DlJob = specificVersionDownloadJob->first();
OneSixInstance *inst = (OneSixInstance *)m_inst;
QString version_id = targetVersion->descriptor();
@@ -154,8 +154,8 @@ void OneSixUpdate::jarlibStart()
QString targetstr("versions/");
targetstr += version->id + "/" + version->id + ".jar";
- auto job = new DownloadJob("Libraries for instance " + inst->name());
- job->addFileDownload(QUrl(urlstr), targetstr);
+ auto job = new NetJob("Libraries for instance " + inst->name());
+ job->addNetAction(FileDownload::make(QUrl(urlstr), targetstr));
jarlibDownloadJob.reset(job);
auto libs = version->getActiveNativeLibs();
@@ -171,9 +171,9 @@ void OneSixUpdate::jarlibStart()
if (entry->stale)
{
if (lib->hint() == "forge-pack-xz")
- jarlibDownloadJob->addForgeXzDownload(download_path, entry);
+ jarlibDownloadJob->addNetAction(ForgeXzDownload::make(download_path, entry));
else
- jarlibDownloadJob->addCacheDownload(download_path, entry);
+ jarlibDownloadJob->addNetAction(CacheDownload::make(download_path, entry));
}
}
connect(jarlibDownloadJob.get(), SIGNAL(succeeded()), SLOT(jarlibFinished()));