Files
sd_gen/include/reader/licenceReader.h

61 lines
1.5 KiB
C++

#ifndef EZ_APPLICATION_LICENCE_DISABLE
#ifndef LICENCE_READER_H_
#define LICENCE_READER_H_
#include "utils.h"
#include "SDCard.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 = "";
};
/// @brief struktura pro informaci o licenci
struct LicenceInfo
{
string licenceFileName = "";
string licenceFilePath = "";
};
class LicenceReader
{
public:
int elcSwitchType;
string operationErrors = "";
bool argumentsCorrect = false;
ErrorMessage error;
SDCardInfo sdCardInfo {};
LicenceInfo licInfo {};
LicenceReader();
~LicenceReader();
bool init(int elcType, InitStructure &initStructure);
bool initread(int elcType, InitStructure &initStructure);
bool getLicenceInfo(void *returnStructure); //vrací informace o všech licenčních bodech základě předané návratové struktury
bool getLicenceItemInfo(int protocolId, void *returnItemStructure); //vrací informace o licenčím bodu na základě id protocolu a předané návratové struktury
private:
Licence2 *licence2 {}; //interní struktura pro zpracování licence ELC2
Licence1 *licence1 {}; //interní struktura pro zpracování licence ELC1
LicenceIdentification licIdentification {};
string configFileName = "";
LicenceInfoGeneral licencesInfo {}; //pole licencí
};
#endif
#endif