54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#ifndef LICENCE_READER_H_
|
|
#define LICENCE_READER_H_
|
|
|
|
#include "utils.h"
|
|
#include "licenceELC11.h"
|
|
#include "licenceELC31.h"
|
|
|
|
#include "licReaderELC1.h"
|
|
#include "licReaderELC2.h"
|
|
#include "licReaderELC3.h"
|
|
|
|
using namespace std;
|
|
using namespace Reader;
|
|
|
|
|
|
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;
|
|
LicenceELC31 *licence31;
|
|
Licence2 *licence2;
|
|
|
|
LicenceReader();
|
|
~LicenceReader();
|
|
bool init(int elcType, InitStructure &initStructure);
|
|
bool initread(int elcType, InitStructure &initStructure);
|
|
bool getLicenceInfo(void *returnStructure);
|
|
bool getLicenceItemInfo(int protocolId, void *returnItemStructure);
|
|
|
|
LicenceInfoGeneral licenceInfo;
|
|
|
|
private:
|
|
LicenceIdentification licIdentification;
|
|
string configFileName = "";
|
|
void *licence = nullptr;
|
|
|
|
};
|
|
|
|
#endif |