summaryrefslogtreecommitdiffstats
path: root/logic/updater
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-09-05 18:46:57 +0200
committerPetr Mrázek <peterix@gmail.com>2015-09-05 18:46:57 +0200
commit23d0bd8edde6aadfaa282215b5f143ad16210438 (patch)
treea14d3f47b51716fb784cb426eedd0a2e2d756b4f /logic/updater
parentcd108fd02975eac3a3fed2fde26c58de5cbdaf1c (diff)
downloadMultiMC-23d0bd8edde6aadfaa282215b5f143ad16210438.tar
MultiMC-23d0bd8edde6aadfaa282215b5f143ad16210438.tar.gz
MultiMC-23d0bd8edde6aadfaa282215b5f143ad16210438.tar.lz
MultiMC-23d0bd8edde6aadfaa282215b5f143ad16210438.tar.xz
MultiMC-23d0bd8edde6aadfaa282215b5f143ad16210438.zip
NOISSUE make shared logic library ... shared
Diffstat (limited to 'logic/updater')
-rw-r--r--logic/updater/DownloadTask.h4
-rw-r--r--logic/updater/GoUpdate.h16
-rw-r--r--logic/updater/UpdateChecker.h4
3 files changed, 15 insertions, 9 deletions
diff --git a/logic/updater/DownloadTask.h b/logic/updater/DownloadTask.h
index d77c2b2c..83b4a142 100644
--- a/logic/updater/DownloadTask.h
+++ b/logic/updater/DownloadTask.h
@@ -19,13 +19,15 @@
#include "net/NetJob.h"
#include "GoUpdate.h"
+#include "multimc_logic_export.h"
+
namespace GoUpdate
{
/*!
* The DownloadTask is a task that takes a given version ID and repository URL,
* downloads that version's files from the repository, and prepares to install them.
*/
-class DownloadTask : public Task
+class MULTIMC_LOGIC_EXPORT DownloadTask : public Task
{
Q_OBJECT
diff --git a/logic/updater/GoUpdate.h b/logic/updater/GoUpdate.h
index 479f1eeb..b8a534de 100644
--- a/logic/updater/GoUpdate.h
+++ b/logic/updater/GoUpdate.h
@@ -2,13 +2,15 @@
#include <QByteArray>
#include <net/NetJob.h>
+#include "multimc_logic_export.h"
+
namespace GoUpdate
{
/**
* A temporary object exchanged between updated checker and the actual update task
*/
-struct Status
+struct MULTIMC_LOGIC_EXPORT Status
{
bool updateAvailable = false;
@@ -25,7 +27,7 @@ struct Status
/**
* Struct that describes an entry in a VersionFileEntry's `Sources` list.
*/
-struct FileSource
+struct MULTIMC_LOGIC_EXPORT FileSource
{
FileSource(QString type, QString url, QString compression="")
{
@@ -48,7 +50,7 @@ typedef QList<FileSource> FileSourceList;
/**
* Structure that describes an entry in a GoUpdate version's `Files` list.
*/
-struct VersionFileEntry
+struct MULTIMC_LOGIC_EXPORT VersionFileEntry
{
QString path;
int mode;
@@ -64,7 +66,7 @@ typedef QList<VersionFileEntry> VersionFileList;
/**
* Structure that describes an operation to perform when installing updates.
*/
-struct Operation
+struct MULTIMC_LOGIC_EXPORT Operation
{
static Operation CopyOp(QString fsource, QString fdest, int fmode=0644)
{
@@ -102,13 +104,13 @@ typedef QList<Operation> OperationList;
/**
* Loads the file list from the given version info JSON object into the given list.
*/
-bool parseVersionInfo(const QByteArray &data, VersionFileList& list, QString &error);
+bool MULTIMC_LOGIC_EXPORT parseVersionInfo(const QByteArray &data, VersionFileList& list, QString &error);
/*!
* Takes a list of file entries for the current version's files and the new version's files
* and populates the downloadList and operationList with information about how to download and install the update.
*/
-bool processFileLists
+bool MULTIMC_LOGIC_EXPORT processFileLists
(
const VersionFileList &currentVersion,
const VersionFileList &newVersion,
@@ -125,7 +127,7 @@ bool processFileLists
*
* @return false if the path couldn't be fixed (is invalid)
*/
-bool fixPathForOSX(QString &path);
+bool MULTIMC_LOGIC_EXPORT fixPathForOSX(QString &path);
}
Q_DECLARE_METATYPE(GoUpdate::Status); \ No newline at end of file
diff --git a/logic/updater/UpdateChecker.h b/logic/updater/UpdateChecker.h
index 39ccd138..c7fad10e 100644
--- a/logic/updater/UpdateChecker.h
+++ b/logic/updater/UpdateChecker.h
@@ -20,7 +20,9 @@
#include <QUrl>
-class UpdateChecker : public QObject
+#include "multimc_logic_export.h"
+
+class MULTIMC_LOGIC_EXPORT UpdateChecker : public QObject
{
Q_OBJECT