From 47e37635f50c09b4f9a9ee7699e3120bab3e4088 Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 10 Apr 2016 04:29:29 +0200 Subject: NOISSUE split GUI stuff from logic library --- logic/Env.h | 66 ------------------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 logic/Env.h (limited to 'logic/Env.h') diff --git a/logic/Env.h b/logic/Env.h deleted file mode 100644 index 2b29acaa..00000000 --- a/logic/Env.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "multimc_logic_export.h" - -class IconList; -class QNetworkAccessManager; -class HttpMetaCache; -class BaseVersionList; -class BaseVersion; -class WonkoIndex; - -#if defined(ENV) - #undef ENV -#endif -#define ENV (Env::getInstance()) - -class MULTIMC_LOGIC_EXPORT Env -{ - friend class MultiMC; -private: - Env(); -public: - static Env& getInstance(); - - // call when Qt stuff is being torn down - void destroy(); - - std::shared_ptr qnam(); - - std::shared_ptr metacache(); - - std::shared_ptr icons(); - - bool hasIcons(); - - /// init the cache. FIXME: possible future hook point - void initHttpMetaCache(); - - /// Updates the application proxy settings from the settings object. - void updateProxySettings(QString proxyTypeStr, QString addr, int port, QString user, QString password); - - /// get a version list by name - std::shared_ptr getVersionList(QString component); - - /// get a version by list name and version name - std::shared_ptr getVersion(QString component, QString version); - - void registerVersionList(QString name, std::shared_ptr vlist); - - std::shared_ptr wonkoIndex(); - - QString wonkoRootUrl() const { return m_wonkoRootUrl; } - void setWonkoRootUrl(const QString &url) { m_wonkoRootUrl = url; } - -protected: - std::shared_ptr m_qnam; - std::shared_ptr m_metacache; - std::shared_ptr m_icons; - QMap> m_versionLists; - std::shared_ptr m_wonkoIndex; - QString m_wonkoRootUrl; -}; -- cgit