summaryrefslogtreecommitdiffstats
path: root/api/logic/Env.h
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2019-09-19 00:41:48 -0700
committerThomas Groman <tgroman@nuegia.net>2019-09-19 00:41:48 -0700
commit32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 (patch)
tree7be7a2f602e6a5af7bc2db86bef9cf2a659c3d3d /api/logic/Env.h
parent5fb2c6334e7d5237db11695b4c0ec0f2d1e47c88 (diff)
downloadMultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.gz
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.lz
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.tar.xz
MultiMC-32b3ed0a1362a4b0798ad71fac3450fb77cb7e41.zip
merged from 0.6.7 codebase
Diffstat (limited to 'api/logic/Env.h')
-rw-r--r--api/logic/Env.h44
1 files changed, 25 insertions, 19 deletions
diff --git a/api/logic/Env.h b/api/logic/Env.h
index 276d762d..8b9b827e 100644
--- a/api/logic/Env.h
+++ b/api/logic/Env.h
@@ -20,40 +20,46 @@ class Index;
}
#if defined(ENV)
- #undef ENV
+ #undef ENV
#endif
#define ENV (Env::getInstance())
class MULTIMC_LOGIC_EXPORT Env
{
- friend class MultiMC;
+ friend class MultiMC;
private:
- struct Private;
- Env();
- ~Env();
- static void dispose();
+ struct Private;
+ Env();
+ ~Env();
+ static void dispose();
public:
- static Env& getInstance();
+ static Env& getInstance();
- QNetworkAccessManager &qnam() const;
+ QNetworkAccessManager &qnam() const;
- shared_qobject_ptr<HttpMetaCache> metacache();
+ shared_qobject_ptr<HttpMetaCache> metacache();
- std::shared_ptr<IIconList> icons();
+ std::shared_ptr<IIconList> icons();
- /// init the cache. FIXME: possible future hook point
- void initHttpMetaCache();
+ /// 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);
+ /// Updates the application proxy settings from the settings object.
+ void updateProxySettings(QString proxyTypeStr, QString addr, int port, QString user, QString password);
- void registerIconList(std::shared_ptr<IIconList> iconlist);
+ void registerIconList(std::shared_ptr<IIconList> iconlist);
- shared_qobject_ptr<Meta::Index> metadataIndex();
+ shared_qobject_ptr<Meta::Index> metadataIndex();
+
+ QString getJarsPath();
+ void setJarsPath(const QString & path);
+
+ bool isFeatureEnabled(const QString & featureName) const;
+ void enableFeature(const QString & featureName, bool state = true);
+ void getEnabledFeatures(QSet<QString> & features) const;
+ void setEnabledFeatures(const QSet<QString> & features) const;
- QString getJarsPath();
- void setJarsPath(const QString & path);
protected:
- Private * d;
+ Private * d;
};