Code cleanup.

This commit is contained in:
XMRig 2020-01-07 10:13:01 +07:00
parent 706f588b36
commit c6530e352f
No known key found for this signature in database
GPG key ID: 446A53638BE94409
18 changed files with 341 additions and 212 deletions

View file

@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -30,12 +30,14 @@
namespace xmrig {
static const char *kEnabled = "enabled";
static const char *kHost = "host";
static const char *kLocalhost = "127.0.0.1";
static const char *kPort = "port";
static const char *kRestricted = "restricted";
static const char *kToken = "access-token";
const char *Http::kEnabled = "enabled";
const char *Http::kHost = "host";
const char *Http::kLocalhost = "127.0.0.1";
const char *Http::kPort = "port";
const char *Http::kRestricted = "restricted";
const char *Http::kToken = "access-token";
}

View file

@ -5,8 +5,8 @@
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2019 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2019 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -36,6 +36,13 @@ namespace xmrig {
class Http
{
public:
static const char *kEnabled;
static const char *kHost;
static const char *kLocalhost;
static const char *kPort;
static const char *kRestricted;
static const char *kToken;
Http();
inline bool isAuthRequired() const { return !m_restricted || !m_token.isNull(); }