1 #pragma once 2 3 #include <string> 4 5 using namespace std; 6 #define DEFAULT_SPD_MAXRETRYCOUNT (3) 7 8 class SpdHelper 9 { 10 public: 11 static bool isPatchBad(UINT8* prm, UINT32 len); 12 static void setPatchAsBad(); 13 static void incErrorCount(); 14 static bool isSpdDebug(); 15 16 private: 17 SpdHelper(); 18 static SpdHelper& getInstance(); 19 20 bool isPatchBadImpl(UINT8* prm, UINT32 len); 21 void setPatchAsBadImpl(); 22 void incErrorCountImpl(); isSpdDebugImpl()23 bool isSpdDebugImpl() {return mSpdDebug;} 24 string mPatchId; 25 int mErrorCount; 26 int mMaxErrorCount; 27 bool mIsPatchBad; 28 bool mSpdDebug; 29 }; 30