GrpcPrint/PrintS/Registration/Registration.h

44 lines
779 B
C
Raw Normal View History

2024-05-15 17:59:04 +08:00
#pragma once
2024-03-19 17:45:12 +08:00
#include "key.h"
#include <string>
#include <GL/mesa_gl.h>
#include <GL/glu.h>
#include <GL/khronos_glext.h>
2024-05-15 17:59:04 +08:00
#include "../DataManage/RWData.h"
#include "../protobuf/stream.pb.h"
enum REGFUNC {
CHECKREG = 0,
GETSN,
CHECKREGKEY,
};
2024-03-19 17:45:12 +08:00
class Registration
{
public:
typedef enum {
REG_SUCCESS,
REG_TRIAL,
REG_FAIL,
} RegType;
public:
Registration();
~Registration();
void Init();
RegType CheckReg(time_t time);
GLuint GetSN(char* strcode);
RegType CheckRegKey(std::string reg_file);
2024-05-15 17:59:04 +08:00
void CallFunc(const ReadData& rd, ::stream::ResponseAny** response);
2024-03-19 17:45:12 +08:00
private:
unsigned int m_TrailYear;
unsigned int m_TrailMonth;
unsigned int m_TrailDay;
const unsigned long DATE_OFFSET = 0x1000;
key m_key;
const std::string TRAIL_FILE = "libhbd.dll";
};