summaryrefslogtreecommitdiffstats
path: root/xmrstak/params.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/params.hpp')
-rw-r--r--xmrstak/params.hpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/xmrstak/params.hpp b/xmrstak/params.hpp
new file mode 100644
index 0000000..92d0da0
--- /dev/null
+++ b/xmrstak/params.hpp
@@ -0,0 +1,45 @@
+#pragma once
+#include <string>
+#include "Environment.hpp"
+
+namespace xmrstak
+{
+
+struct Params
+{
+
+ static inline Params& inst()
+ {
+ auto& env = Environment::inst();
+ if(env.pParams == nullptr)
+ env.pParams = new Params;
+ return *env.pParams;
+ }
+
+ std::string executablePrefix;
+ bool useAMD;
+ bool useNVIDIA;
+ bool useCPU;
+
+ std::string poolURL;
+ std::string poolPasswd;
+ std::string poolUsername;
+
+ std::string configFile;
+ std::string configFileAMD;
+ std::string configFileNVIDIA;
+ std::string configFileCPU;
+
+ Params() :
+ useAMD(true),
+ useNVIDIA(true),
+ useCPU(true),
+ configFile("config.txt"),
+ configFileAMD("amd.txt"),
+ configFileCPU("cpu.txt"),
+ configFileNVIDIA("nvidia.txt")
+ {}
+
+};
+
+} // namepsace xmrstak
OpenPOWER on IntegriCloud