upravy
This commit is contained in:
60
include/licenceReader.h
Normal file
60
include/licenceReader.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#ifndef LICENCE_READER_H_
|
||||
#define LICENCE_READER_H_
|
||||
|
||||
#include "utils.h"
|
||||
// #include "licenceCommon.h"
|
||||
#include "licenceELC11.h"
|
||||
#include "licenceELC21.h"
|
||||
#include "licenceELC31.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
struct InitStructure
|
||||
{
|
||||
int licenceType = 0;
|
||||
int licenceVersion = 0;
|
||||
int licenceIndex = 0;
|
||||
int compatibility = 0;
|
||||
string licenceFilePath = "";
|
||||
string cid_csd_filePath = "";
|
||||
};
|
||||
|
||||
class LicenceReader
|
||||
{
|
||||
|
||||
public:
|
||||
int elcSwitchType;
|
||||
string operationErrors = "";
|
||||
bool argumentsCorrect = false;
|
||||
ErrorMessage error;
|
||||
LicenceELC11 *licence11;
|
||||
LicenceELC21 *licence21;
|
||||
LicenceELC31 *licence31;
|
||||
|
||||
LicenceReader();
|
||||
~LicenceReader();
|
||||
bool init(int elcType, int licenceType, int licenceVersion, int licenceIndex, int compatibility);
|
||||
bool init(int elcType, InitStructure &initStructure);
|
||||
bool initread(int elcType, int licenceType, int licenceVersion, int licenceIndex, int compatibility);
|
||||
bool initread(int elcType, InitStructure &initStructure);
|
||||
|
||||
void readLicenceFile();
|
||||
|
||||
bool getLicenceInfo(void *returnStructure);
|
||||
bool getLicenceItemInfo(int protocolId, void *returnItemStructure);
|
||||
|
||||
LicenceInfoGeneral licenceInfo;
|
||||
|
||||
private:
|
||||
LicenceIdentification licIdentification;
|
||||
LicData licData;
|
||||
string configFileName = "";
|
||||
|
||||
void *licence = nullptr;
|
||||
|
||||
void readLicenceELC1();
|
||||
void readLicenceELC2();
|
||||
void readLicenceELC3();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user