diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-29 20:32:31 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-30 23:46:08 +0200 |
commit | cc429b68fadc502b981fd0acd64a5ff6e2ae1d15 (patch) | |
tree | 3fb23fc4db15dbdd08af4c7ea20134b9d82e58fd /xmrstak/jconf.hpp | |
parent | e5b0319d5a9f58762fa934ad700113908940cb31 (diff) | |
download | xmr-stak-cc429b68fadc502b981fd0acd64a5ff6e2ae1d15.zip xmr-stak-cc429b68fadc502b981fd0acd64a5ff6e2ae1d15.tar.gz |
group files
- move source code to `src`
- categorize files and move to group folder
- change upper case class files to lower case
- change C++ header to `*.hpp`
Diffstat (limited to 'xmrstak/jconf.hpp')
-rw-r--r-- | xmrstak/jconf.hpp | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/xmrstak/jconf.hpp b/xmrstak/jconf.hpp new file mode 100644 index 0000000..934d6f8 --- /dev/null +++ b/xmrstak/jconf.hpp @@ -0,0 +1,74 @@ +#pragma once +#include <stdlib.h> +#include <string> +#include "Environment.hpp" +#include "Params.hpp" + +class jconf +{ +public: + static jconf* inst() + { + auto& env = xmrstak::Environment::inst(); + if(env.pJconfConfig == nullptr) + env.pJconfConfig = new jconf; + return env.pJconfConfig; + }; + + bool parse_config(const char* sFilename = xmrstak::Params::inst().configFile.c_str()); + + struct thd_cfg { + bool bDoubleMode; + bool bNoPrefetch; + long long iCpuAff; + }; + + enum slow_mem_cfg { + always_use, + no_mlck, + print_warning, + never_use, + unknown_value + }; + + bool GetTlsSetting(); + bool TlsSecureAlgos(); + const char* GetTlsFingerprint(); + + const char* GetPoolAddress(); + const char* GetPoolPwd(); + const char* GetWalletAddress(); + + uint64_t GetVerboseLevel(); + uint64_t GetAutohashTime(); + + const char* GetOutputFile(); + + uint64_t GetCallTimeout(); + uint64_t GetNetRetry(); + uint64_t GetGiveUpLimit(); + + uint16_t GetHttpdPort(); + + bool DaemonMode(); + + bool PreferIpv4(); + + + bool NiceHashMode(); + + inline bool HaveHardwareAes() { return bHaveAes; } + + static void cpuid(uint32_t eax, int32_t ecx, int32_t val[4]); + + slow_mem_cfg GetSlowMemSetting(); + +private: + jconf(); + + bool check_cpu_features(); + struct opaque_private; + opaque_private* prv; + + bool bHaveAes; +}; |