2024-05-15 17:59:04 +08:00

44 lines
779 B
C++

#pragma once
#include "key.h"
#include <string>
#include <GL/mesa_gl.h>
#include <GL/glu.h>
#include <GL/khronos_glext.h>
#include "../DataManage/RWData.h"
#include "../protobuf/stream.pb.h"
enum REGFUNC {
CHECKREG = 0,
GETSN,
CHECKREGKEY,
};
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);
void CallFunc(const ReadData& rd, ::stream::ResponseAny** response);
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";
};