You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.8 KiB
93 lines
2.8 KiB
8 years ago
|
/*
|
||
|
* Copyright © 2015 Matthieu DUVAL, Rudy DUCHE
|
||
|
*
|
||
|
* This file is part of RizzleHash.
|
||
|
*
|
||
|
* RizzleHash is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation, either version 3 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* RizzleHash is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with RizzleHash. If not, see <http://www.gnu.org/licenses/>
|
||
|
*/
|
||
|
|
||
|
#ifndef RH_CONSTANTS_H
|
||
|
#define RH_CONSTANTS_H
|
||
|
|
||
|
#include <string>
|
||
|
#include <list>
|
||
|
#include "CPUID.h"
|
||
|
//#include <w32api.h>
|
||
|
using namespace std;
|
||
|
class RH_Constants
|
||
|
{
|
||
|
private:
|
||
|
RH_Constants();
|
||
|
static list<char> trimProcName(int32_t * value, int taille);
|
||
|
|
||
|
public:
|
||
|
static string getOSName();
|
||
|
static string getOSFamily();
|
||
|
static int getNumberOfCore();
|
||
|
static string getProcessorVendor();
|
||
|
static string getProcessorName();
|
||
|
};
|
||
|
|
||
|
namespace PARAMS_CONSTANTS
|
||
|
{
|
||
|
|
||
|
namespace LONG_PARAMS
|
||
|
{
|
||
|
const string VERBOSE = "--verbose";
|
||
|
const string HELP = "--help";
|
||
|
const string MODE = "--mode";
|
||
|
const string HASH = "--hash";
|
||
|
const string ENCRYPTION_KEY = "--key";
|
||
|
const string PORT = "--port";
|
||
|
const string SERVER_IP = "--ip";
|
||
|
const string ROLE = "--role";
|
||
|
const string SECRET_PARAM = "--cd";
|
||
|
const string CORE = "--core";
|
||
|
const string MAX_LENGTH = "--length";
|
||
|
}
|
||
|
|
||
|
namespace SHORT_PARAMS
|
||
|
{
|
||
|
const string VERBOSE = "-v";
|
||
|
const string HELP = "-h";
|
||
|
const string MODE = "-m";
|
||
|
const string ENCRYPTION_KEY = "-k";
|
||
|
const string PORT = "-p";
|
||
|
const string SERVER_IP = "-s";
|
||
|
const string ROLE = "-r";
|
||
|
const string CORE = "-c";
|
||
|
const string MAX_LENGTH = "-l";
|
||
|
}
|
||
|
|
||
|
namespace PARAMS_VALUE
|
||
|
{
|
||
|
const string MODE_LOCAL = "local";
|
||
|
const string MODE_LAN = "lan";
|
||
|
const string ROLE_CLIENT = "client";
|
||
|
const string ROLE_SERVER = "server";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
static const string APPLICATION_NAME("RizzleHash V0.8 - rc1");
|
||
|
static const string APPLICATION_YEAR("2015");
|
||
|
static const string APPLICATION_AUTHORS("Matthieu DUVAL,Rudy DUCHE");
|
||
|
static const string OS(RH_Constants::getOSName());
|
||
|
static const int NB_CORE(RH_Constants::getNumberOfCore());
|
||
|
static const string PROCESSOR_VENDOR(RH_Constants::getProcessorVendor());
|
||
|
static const string PROCESSOR_NAME(RH_Constants::getProcessorName());
|
||
|
|
||
|
|
||
|
|
||
|
#endif // RH_CONSTANTS_H
|