From 23d0bd8edde6aadfaa282215b5f143ad16210438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 5 Sep 2015 18:46:57 +0200 Subject: NOISSUE make shared logic library ... shared --- logic/updater/DownloadTask.h | 4 +++- logic/updater/GoUpdate.h | 16 +++++++++------- logic/updater/UpdateChecker.h | 4 +++- 3 files changed, 15 insertions(+), 9 deletions(-) (limited to 'logic/updater') 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 #include +#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 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 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 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 ¤tVersion, 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 -class UpdateChecker : public QObject +#include "multimc_logic_export.h" + +class MULTIMC_LOGIC_EXPORT UpdateChecker : public QObject { Q_OBJECT -- cgit v1.2.3