中航光电的中间件仓库

SoftAuther.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma once
  2. #include "stdafx.h"
  3. #include <string>
  4. #include <map>
  5. #include <iostream>
  6. #include <array>
  7. #include <intrin.h>
  8. #include <vector>
  9. #include <cstring>
  10. #include "../Public/GlobalDef/TemplateTimer.h"
  11. using std::cout;
  12. using namespace std;
  13. class SoftAuther
  14. {
  15. SINGLETON_DECLARE(SoftAuther)
  16. public:
  17. SoftAuther(void);
  18. ~SoftAuther(void);
  19. public:
  20. void WritessFile(char* fileName,char ch[50]);
  21. void ReadssFile(char* fileName,char ch[50]);
  22. char* GetKeyByNumber(string CpuNumber);
  23. char GetCharByChar(char c);
  24. char GetCharByChar2(char c);
  25. char* GetCpuID();
  26. bool ComareData(char* id,char* psw);
  27. int TransCodeToDate(string code);
  28. char GetCharbyChar3(char c);
  29. bool CompareDate(int current,int readdate);
  30. void ReadssDateFile(char* fileName,char ch[50]);
  31. CString GetCpuCodeAuth() {return CpuCodeAuth;}
  32. int GetAgentCount() {return m_AgentCount;}
  33. int GetIvrFlowCount() {return m_IvrFlowCount;}
  34. int GetDateCode() {return m_Date;}
  35. void InitAutherData(char* FileName);
  36. void __onTimerPostProcessing(void); // »°ºó´¦Àíʱ³¤´¦Àí
  37. void __setTimer(UINT Elapse);
  38. void __killTimer();
  39. private:
  40. map<char,char> keyValue;
  41. map<char,char> keyValue2;
  42. map<char,char> keyValue3;
  43. CString CpuCodeAuth;
  44. int m_Date;
  45. int m_AgentCount;
  46. int m_IvrFlowCount;
  47. TTimer<SoftAuther> m_AuthTimer;
  48. };