testování filip
This commit is contained in:
31
zdenda/include/reader/licReaderELC1.h
Normal file
31
zdenda/include/reader/licReaderELC1.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef ELC1_READER__H
|
||||
#define ELC1_READER__H
|
||||
|
||||
#include "utils.h"
|
||||
#include "licenceCommon.h"
|
||||
#include "licenceELC1.h"
|
||||
#include "SDCard.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
class Licence1 : public LicenceELC1
|
||||
{
|
||||
public:
|
||||
|
||||
LicenceELC1Info licenceInfo;
|
||||
|
||||
Licence1();
|
||||
~Licence1();
|
||||
Licence1(LicenceIdentification &licIdentification);
|
||||
|
||||
bool readLicence(LicenceInfoGeneral *licences);
|
||||
bool getLicenceInfo(void *ptr);
|
||||
bool getLicenceItemInfo(int protocolId, void *returnItemStructure);
|
||||
void getLicenceItems();
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
30
zdenda/include/reader/licReaderELC2.h
Normal file
30
zdenda/include/reader/licReaderELC2.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef ELC2_READER_H
|
||||
#define ELC2_READER_H
|
||||
|
||||
#include "utils.h"
|
||||
#include "licenceCommon.h"
|
||||
#include "licenceELC2.h"
|
||||
#include "SDCard.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
class Licence2 : public LicenceELC2
|
||||
{
|
||||
public:
|
||||
LicenceELC2Info licenceInfo;
|
||||
|
||||
Licence2();
|
||||
~Licence2();
|
||||
Licence2(LicenceIdentification &licIdentification);
|
||||
|
||||
bool readLicence(LicenceInfoGeneral *licences);
|
||||
bool getLicenceInfo(void *ptr);
|
||||
bool getLicenceItemInfo(int protocolId, void *returnItemStructure);
|
||||
void getLicenceItems();
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
9
zdenda/include/reader/licReaderELC3.h
Normal file
9
zdenda/include/reader/licReaderELC3.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef ELC3_READER__H
|
||||
#define ELC3_READER__H
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
51
zdenda/include/reader/licenceReader.h
Normal file
51
zdenda/include/reader/licenceReader.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef LICENCE_READER_H_
|
||||
#define LICENCE_READER_H_
|
||||
|
||||
#include "utils.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;
|
||||
Licence2 *licence2;
|
||||
Licence1 *licence1;
|
||||
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user