123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619 |
- #pragma once
- #include "stdafx.h"
- #include "SpFSM.h"
- #define JUS_A_TEST 0
- #include "FileInfo.h"
- #include <iostream>
- #include <iomanip>
- #include <fstream>
- #include <ws2tcpip.h>
- #include <tchar.h>
- #include <stdarg.h>
- #include <string>
- #include <vector>
- #include <assert.h>
- #include <time.h>
- #include <map>
- #include <atlbase.h>
- #include <conio.h>
- #include "mbnapi.h"
- #include <comdef.h>
- using namespace std;
- #pragma comment(lib, "ws2_32.lib")
- #pragma comment(lib, "mbnapi_uuid.lib")
- #include "../mod_cardswiper/CardSwiper_client_g.h"
- #include "../mod_cardswiper/CardSwiper_msg_g.h"
- #include "../mod_cardswiper/CardSwiper_def_g.h"
- #include "../EventCode.h"
- #include "FileSimpleComp.h"
- #define DEFAULT_INTERVAL 1000
- #define SYSVAR_DISKSTATEUS_FOR_VIDEO "VideoSpaceStatus" //录像磁盘空间状态系统变量
- #define VIDEO_SPACE_UNKNOWN "U" // 未知:未初始化或其他原因
- #define VIDEO_SPACE_SUFFICIENT "S" // 空间充足
- #define VIDEO_SPACE_INSUFF_LITTLE "W" // 低级警告:磁盘空间不足以支持七天以上录像
- #define VIDEO_SPACE_INSUFF_LESS "E" // 高级警告:磁盘空间不足以支持三天以上录像
- #define VIDEO_SPACE_INSUFF_FATAL "F" // 严重错误:磁盘空间不足以支持一天以上录像
- #define OPT_FILE_CMD_SPREAD 0
- #define OPT_FILE_CMD_EXECUTE 1
- #define OPT_FILE_CMD_DELETE 2
- #define OPT_FILE_CMD_CLEAR 3
- #define OPT_FILE_CMD_CREATE 4
- #define OPT_FILE_CMD_APPEND 5
- #define OPT_FILE_CMD_RENAME 6
- #define OPT_FILE_RES_SUCCESS 1
- #define OPT_FILE_RES_INVALID -1
- #define OPT_FILE_RES_FAILED -2
- #define SYSVAR_FRAMEWORK_FIRST_BOOT "FirstLaunchSinceSysBoot" //框架开机后首次启动标识
- #define SYSVAR_FRAMEWORK_FIRST_BOOT_YES "Y"
- #define SYSVAR_FRAMEWORK_FIRST_BOOT_NO "N"
- //Black sheet access attribute
- #define BS_DENY_READ 0x00000001
- #define BS_DENY_MODIFY 0x00000002 //Actually Append action.
- #define BS_DENY_EXECUTE 0x00000004
- #define BS_DENY_DELETE 0x00000008
- #define BS_DENY_CREATE 0x00000010
- #define BS_DENY_INHERITED 0x10000000
- #define BS_ACCESS_ALL ((DWORD)-1)
- #define LIMITED_SYS_COUNT 3
- static const char* limited_sys_paths[LIMITED_SYS_COUNT] =
- {
- "Program Files",
- "ProgramData",
- "Program Files (x86)"
- };
- #define LIMITED_SYS_PATH(x) \
- limited_sys_paths[x]
- class CustomSignalEvents;
- enum EvtType {
- USER_EVT_FETCH = EVT_USER + 1,
- USER_EVT_RUN,
- USER_EVT_GET_CARDSWIPER_STATUS,
- USER_EVT_GET_CARDSWIPER_STATUS_FINISHED,
- USER_EVT_CLEAR_UPLOADEDVIDEOFILES,
- USER_EVT_CLEAR_UPLOADEDVIDEOFILES_FINISHED,
- USER_EVT_CLEAR_VIDEOFILE_ENHANCE,
- USER_EVT_CLEAR_VIDEOFILE_ENHANCE_FINISHED,
- USER_EVT_VERSION_CLEAR,
- USER_EVT_VERSION_CLEAR_FINISHED,
-
- USER_EVT_FILE_OPERAT,
- USER_EVT_FILE_OPERAT_FINISHED,
-
- USER_EVT_GET_EVENTLOG,
- USER_EVT_GET_EVENTLOG_FINISHED
- };
- enum DealFileType {
- DFT_CenterSetting,
- DFT_Ad0
- };
- #include "ResourceWatcher_server_g.h"
- #include "ResourceWatcher_msg_g.h"
- using namespace ResourceWatcher;
- using namespace CardSwiper;
- #define WIDE_CONDITION
- #ifdef WIDE_CONDITION
- #include "EventLogW.h"
- typedef CEventLogW CEventLog;
- typedef EVENTLOGPARAM_W EVENTLOGPARAM;
- typedef LPEVENTLOGPARAM_W LPEVENTLOGPARAM;
- #else
- #include "EventLog.h"
- #endif //WIDE_CONDITION
- class CardSwiperClient;
- struct CInstallInfoEx : public CInstallInfo
- {
- CInstallInfoEx(const CInstallInfo& info)
- :CInstallInfo(info){/* empty */}
- bool operator < (const CInstallInfoEx &rhs) const
- {
- CVersion l_version(this->InstallVersion);
- DWORD l_timeTick = (DWORD)this->tmSwithOverDate;
-
- CVersion r_version(rhs.InstallVersion);
- DWORD r_timeTick = (DWORD)rhs.tmSwithOverDate;
- if(l_version == r_version)
- return l_timeTick <= r_timeTick;
- return l_version > r_version;
- }
- };
- class FetchEvent: public FSMEvent
- {
- public:
- FetchEvent() : FSMEvent(USER_EVT_FETCH) {}
- virtual ~FetchEvent() {}
- SpReqAnsContext<ResourceWatcherService_Fetch_Req, ResourceWatcherService_Fetch_Ans>::Pointer ctx;
- virtual void OnUnhandled()
- {
- if(ctx != NULL)
- {
- ctx->Answer(Error_InvalidState);
- }
- }
- };
- struct CPUInforStruct {
- bool bInitialed;
- int level;
- CSimpleStringA csBrand;
- };
- class ResourceWatcherFSM : public FSMImpl<ResourceWatcherFSM>
- {
- public:
- ResourceWatcherFSM(void);
- ~ResourceWatcherFSM(void);
- enum {s0, s1, s2, s3};
- BEGIN_FSM_STATE(ResourceWatcherFSM)
- FSM_STATE_ENTRY(s0, "Idle", s0_on_entry, s0_on_exit, s0_on_event)
- FSM_STATE_ENTRY(s1, "Running", s1_on_entry, s1_on_exit, s1_on_event)
- FSM_STATE_ENTRY(s2, "Failed", s2_on_entry, s2_on_exit, s2_on_event)
- FSM_STATE_ENTRY(s3, "Listerning", s3_on_entry, s3_on_exit, s3_on_event)
- END_FSM_STATE()
- BEGIN_FSM_RULE(ResourceWatcherFSM, s0)
- FSM_RULE_ENTRY(s0, s1, USER_EVT_RUN, 0)
- FSM_RULE_ENTRY(s1, s3, USER_EVT_VERSION_CLEAR_FINISHED, 0)
- END_FSM_RULE()
- virtual ErrorCodeEnum OnInit();
- virtual ErrorCodeEnum OnExit();
- virtual void s0_on_entry();
- virtual void s0_on_exit();
- virtual unsigned int s0_on_event(FSMEvent* e);
- virtual void s1_on_entry();
- virtual void s1_on_exit();
- virtual unsigned int s1_on_event(FSMEvent* e);
- virtual void s2_on_entry();
- virtual void s2_on_exit();
- virtual unsigned int s2_on_event(FSMEvent* e);
- virtual void s3_on_entry();
- virtual void s3_on_exit();
- virtual unsigned int s3_on_event(FSMEvent* e);
- void SelfTest(EntityTestEnum eTestType, CSmartPointer<ITransactionContext> pTransactionContext);
- int GetCardSwiperVal()
- {
- return m_cardswiperStatus;
- }
- private:
- BOOL m_IsPadDevice;
- //Cardswiper Component
- BOOL m_bGetStatusRotate;
-
- //Video Component
- CSimpleStringA m_csUploadVideoPath;
- CSimpleStringA m_csDelFileSuffix;
- int m_nDayOfBackward;
- int m_failDelCnt;
- bool m_bReadyFlag;
- FILETIME m_ftRemoveTime;
- //Video Component2
- priority_queue<TmpFileInfo*, vector<TmpFileInfo*>, Comparetor> m_VideoFiles;
- ULARGE_INTEGER uiAllVideoFileSizeCal;
- char szMaxSizeFilePath[MAX_PATH];
- ULARGE_INTEGER uiMaxFileSize;
- ULARGE_INTEGER mUiCalibration;
- ULARGE_INTEGER mUiRequireBytes;
- //日期,数量
- map<UINT, UINT> VideoDailyRecord;
- typedef map<UINT, UINT>::const_iterator const_map_cu_iter;
- DiskInfo diskInfo;
- bool m_bVideoClearReady;
- int m_nMinSavedDay;
- //CPU Component
- int m_highPart, m_lowPart;
- CSystemStaticInfo m_RvcSysinfo;
- typedef std::string bs_key;
- typedef unsigned long bs_value;
- typedef map<bs_key, bs_value> BlackSheet;
- typedef BlackSheet::const_iterator const_bs_iter;
- typedef BlackSheet::iterator bs_iter;
- typedef std::pair<bs_key, bs_value> BlackSheetPair;
- BlackSheet m_blacksheet;
- CSimpleStringA m_strTerminalNo;
- FILETIME m_ftAd0RemoveTime;
- public:
- int GetCardSwiperStatus();
- int m_cardswiperStatus;
- //Start Video Component [Josephus in 9:12:26 2016/4/14]
- int ClearVideoFiles(int& newDeletedFilesNum, int initFlag = 1);
- void CalculateBackTime(PFILETIME ftResultTime, int days);
- BOOL CalCulateUploadFileAddition(ULARGE_INTEGER& uiBytesCal);
- /*
- *-1, First file time is earlier than second file time.
- * 0, First file time is equal to second file time
- * 1, First file time is later than second file time.
- */
- LONG CompareVideoFileTime(PFILETIME ftCurTime, PFILETIME fileTime)
- {
- return CompareFileTime(ftCurTime, fileTime);
- }
- void GetTimeString(LPTSTR lpszString, DWORD dwSize, FILETIME *ftWrite);
- int ProcessVideoFile(LPCTSTR dirName, int& deletedFileCnt, int& deleteFailedCnt, const int nFlag);
- ErrorCodeEnum ExpandDir(LPCTSTR macorStr, CSimpleStringA &outDir);
- // End Video Component
- // Start CPU Componet --Josephus at 9:05:24 2016121
- void InitialCPUMarkInfor();
- int SelectMarkLevel(int nValue)
- {
- //if(m_highPart == m_lowPart && m_lowPart + m_highPart == 0)
- // InitialCPUMarkInfor();
- if(m_highPart == m_lowPart && m_highPart == 0)
- return 0;
- if(m_lowPart == 0)
- {//no low config
- if(nValue >= m_highPart)
- return 1;
- else
- return 2;
- }
- else if(m_highPart == 0)
- {
- if(nValue > m_lowPart)
- return 2;
- else
- return 3;
- }
- else if(m_lowPart >= m_highPart)
- {//low standard.
- if(nValue > m_lowPart)
- return 2;
- else
- return 3;
- }
- if(nValue <= m_lowPart)
- return 3;
- if(nValue < m_highPart)
- return 2;
- return 1;
- //if(m_highPart < m_lowPart)
- // return 0;
- //if(nValue >= m_highPart)
- // return 1;
- //if(nValue <= m_lowPart)
- // return 3;
- //return 2;
- }
- BOOL GetCPUBrand(CSimpleStringA& csCpuBrand);
- ErrorCodeEnum GetCpuType(
- SpReqAnsContext<ResourceWatcherService_GetCpuType_Req,
- ResourceWatcherService_GetCpuType_Ans>::Pointer ctx);
- //End CPU Component
- // Start CenterSetting Clear Job --Josephus at 15:57:58 20161210
- BOOL ExecuteClearTask();
- int ClearSpecifieFile(DealFileType fileType, LPCTSTR dirName, int& deletedFileCnt, int& deleteFailedCnt);
- int DoSomethingWith(DealFileType fileType, LPCTSTR szFilePath, LPCTSTR szFileName);
- // End CenterSetting clear Job
- // Start Video Component2 --Josephus at 16:19:56 201755
- void ClearVideoQueue()
- {
- while(!m_VideoFiles.empty())
- {
- TmpFileInfo* pNodeInfo = m_VideoFiles.top();
- m_VideoFiles.pop();
- if(pNodeInfo != NULL)
- {
- delete pNodeInfo;
- }
- }
- memset(szMaxSizeFilePath, 0, sizeof(szMaxSizeFilePath));
- uiAllVideoFileSizeCal.QuadPart = 0ui64;
- uiMaxFileSize.QuadPart = 0ui64;
- mUiRequireBytes.QuadPart = 0ui64;
- VideoDailyRecord.clear();
- }
- void CalCulateFileInfo(LPCTSTR lpFilePath, PWIN32_FIND_DATA pWfdata);
- // Has been purified --Josephus at 10:42:55 201759
- void PrintResult()
- {
- char szResult[DEFAULT_OUTPUT_FORMAT_SIZE];
- ByteSprintf(szResult, (double)uiMaxFileSize.QuadPart);
- Dbg("Max Video file: %s size: %s", szMaxSizeFilePath, szResult);
- ByteSprintf(szResult, (double)uiAllVideoFileSizeCal.QuadPart);
- Dbg("uiAllVideoFileSizeCal.QuadPart : %I64u Bytes", uiAllVideoFileSizeCal.QuadPart);
- Dbg("Totally(size()#%d) directory size: %s", m_VideoFiles.size(), szResult);
- }
- void ClearMoreVideoFiles();
- bool IsNeedToFirstClear();
- void SetSysValAndBroadcast(DWORD dwVal, LPCTSTR lpszMessage);
- // End --Josephus at 16:20:02 201755
- BOOL DeleteVersionPackage();
- BOOL CombineVersionPath(CVersion version);
- int ProcessFileDelete(LPCTSTR lpszPath, int& nDelSucCnt, int& nDelFailedCnt);
- int ProcessFileSpaceCalculation(LPCTSTR lpszPath, PULARGE_INTEGER puliSpaceBytes);
- FILE_LAYOUT_ENTRY m_FileEntry;
- DWORD InitialVolumes();
- BOOL InitialFileEntity(LPCTSTR lpszPath, DWORD& dwFileCnt, const DWORD dwFilterAttributes = 0UL);
- //DWORD GetSubFileInfors(PFILE_LAYOUT_ENTRY entry, DWORD& dwDirCount, DWORD& dwFileCount);
- DWORD ProcessFileOperation(const SpReqAnsContext<ResourceWatcherService_OperateFile_Req,
- ResourceWatcherService_OperateFile_Ans>::Pointer& ctx);
- DWORD ExecuteFile(LPCTSTR lpszFilePath, LPCTSTR lpParam);
- BOOL ConveyFileEntityToContext(const SpReqAnsContext<ResourceWatcherService_OperateFile_Req,
- ResourceWatcherService_OperateFile_Ans>::Pointer& ctx, BOOL bRefleshHeader = FALSE
- , DWORD dwFilterAttributes = 0);
- int MonitorRSAMachineKeysDir();
- /*
- option: 0::scan, 2::delete
- */
- int FilterFilePathAhead(LPCTSTR lpszPath, const int option);
- void InitBlackSheet();
- BOOL InBlackSheet(LPCTSTR lpszPath, const int option);
- BOOL ClearDirRecursiveEx(LPCSTR lpDirPat);
- // Add -Josephus@2017713 16:04:18
- DWORD CalSpecifiedSecondsFrom1970(const WORD wDuration,
- DWORD* dwStartTime
- ,DWORD* dwEndTime
- ,const PULONGLONG pStartTime
- ,const PULONGLONG pEndTime);
- DWORD CombineTheEvtxFileName(LPCTSTR lpszTerminalNo, CHAR szEvtxFileName[]);
- DWORD GetEventLog(SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,
- ResourceWatcherService_ExtractEventLog_Ans>::Pointer ctx);
- BOOL RetrieveSpecificedEventLogs(const LPEVENTLOGPARAM pEvtLogFilter,
- LPCTSTR lpszEvtFileName, DWORD& dwEntries);
- // Add Ad0 folder job [4/2/2018 10:53 @Gifur]
- BOOL ClearAd0Folder();
- BOOL IsTodayDone(int nRecordTime);
- BOOL GetSystemBootTime(CSmallDateTime& systemBootTime);
- HRESULT SetDefaultAudioPlaybackDevice(LPCWSTR devID);
- BOOL SetDefaultAudioDevice();
- };
- class RunEvent : public FSMEvent
- {
- public:
- RunEvent() : FSMEvent(USER_EVT_RUN) {}
- virtual ~RunEvent() {}
- };
- class OperateFileEvent : public FSMEvent
- {
- public:
- OperateFileEvent()
- : FSMEvent(USER_EVT_FILE_OPERAT)
- , m_ctx(NULL){}
- ~OperateFileEvent(){}
- SpReqAnsContext<ResourceWatcherService_OperateFile_Req,
- ResourceWatcherService_OperateFile_Ans>::Pointer m_ctx;
- virtual void OnUnhandled()
- {
- if (m_ctx != NULL)
- {
- Dbg("Operate file event unhandled");
- m_ctx->Ans.result = OPT_FILE_RES_FAILED;
- m_ctx->Answer(Error_Succeed);
- }
- }
- };
- class GetEventLogEvent : public FSMEvent
- {
- public:
- GetEventLogEvent(SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,
- ResourceWatcherService_ExtractEventLog_Ans>::Pointer ctx)
- : FSMEvent(USER_EVT_GET_EVENTLOG)
- , m_ctx(ctx){}
- ~GetEventLogEvent(){}
- SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,
- ResourceWatcherService_ExtractEventLog_Ans>::Pointer m_ctx;
- virtual void OnUnhandled()
- {
- if (m_ctx != NULL)
- {
- Dbg("get event log event unhandled");
- }
- }
- };
- struct GetCardSwiperTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- GetCardSwiperTask(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM) {}
- void Process()
- {
- FSMEvent* fsmEvent = new FSMEvent(USER_EVT_GET_CARDSWIPER_STATUS_FINISHED);
- fsmEvent->param1 = m_pFSM->GetCardSwiperStatus();
- m_pFSM->PostEventFIFO(fsmEvent);
- }
- };
- struct ClearVideoFilesTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- ClearVideoFilesTask(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM), m_nInitFlag(1) {}
- int m_nInitFlag;
- void SetFlag(int nFlag) { m_nInitFlag = nFlag; }
- void Process()
- {
- FSMEvent* fsmEvent = new FSMEvent(USER_EVT_CLEAR_UPLOADEDVIDEOFILES_FINISHED);
- fsmEvent->param2 = m_pFSM->ClearVideoFiles(fsmEvent->param1, m_nInitFlag);
- m_pFSM->PostEventFIFO(fsmEvent);
- }
- };
- struct ClearVideoFilesEnhanceTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- ClearVideoFilesEnhanceTask(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM) {}
- void Process()
- {
- FSMEvent* fsmEvent = new FSMEvent(USER_EVT_CLEAR_VIDEOFILE_ENHANCE_FINISHED);
- m_pFSM->ClearMoreVideoFiles();
- m_pFSM->PostEventFIFO(fsmEvent);
- }
- };
- struct ClearCenterSettingFilesTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- ClearCenterSettingFilesTask(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM) {}
- void Process()
- {
- m_pFSM->ExecuteClearTask();
- }
- };
- struct ClearVersionTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- ClearVersionTask(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM) {}
- void Process()
- {
- FSMEvent* fsmEvent = new FSMEvent(USER_EVT_VERSION_CLEAR_FINISHED);
- m_pFSM->DeleteVersionPackage();
- m_pFSM->PostEventFIFO(fsmEvent);
- }
- };
- struct ClearAd0Task : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- ClearAd0Task(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM), m_nInitFlag(1) {}
- int m_nInitFlag;
- void SetFlag(int nFlag) { m_nInitFlag = nFlag; }
- void Process()
- {
- m_pFSM->ClearAd0Folder();
- }
- };
- struct RSAMachineKeyLostMonitorTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- RSAMachineKeyLostMonitorTask(ResourceWatcherFSM* pFSM) : m_pFSM(pFSM) {}
- void Process()
- {
- int nRes = m_pFSM->MonitorRSAMachineKeysDir();
- if(nRes < 0)
- {
- LogError(Severity_Middle, Error_Unexpect, LOG_ERR_RSAKEY_MINOTOR_FAILED
- ,CSimpleStringA::Format("MonitorRSAMachineKeysDir failed returned: %d", nRes));
- }
- }
- };
- struct OperateFileTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- OperateFileTask(ResourceWatcherFSM* pFSM,
- SpReqAnsContext<ResourceWatcherService_OperateFile_Req,
- ResourceWatcherService_OperateFile_Ans>::Pointer ctx)
- : m_pFSM(pFSM)
- , m_ctx(ctx)
- {}
- SpReqAnsContext<ResourceWatcherService_OperateFile_Req,
- ResourceWatcherService_OperateFile_Ans>::Pointer m_ctx;
- void Process()
- {
- FSMEvent* fsmEvent = new FSMEvent(USER_EVT_FILE_OPERAT_FINISHED);
- m_pFSM->ProcessFileOperation(m_ctx);
- m_pFSM->PostEventFIFO(fsmEvent);
- }
- };
- struct GetEventLogTask : public ITaskSp
- {
- ResourceWatcherFSM* m_pFSM;
- GetEventLogTask(ResourceWatcherFSM* pFSM,
- SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,
- ResourceWatcherService_ExtractEventLog_Ans>::Pointer ctx)
- : m_pFSM(pFSM)
- , m_ctx(ctx)
- {}
- SpReqAnsContext<ResourceWatcherService_ExtractEventLog_Req,
- ResourceWatcherService_ExtractEventLog_Ans>::Pointer m_ctx;
- void Process()
- {
- LOG_FUNCTION();
- FSMEvent* fsmEvent = new FSMEvent(USER_EVT_GET_EVENTLOG_FINISHED);
- m_pFSM->GetEventLog(m_ctx);
- fsmEvent->param1 = fsmEvent->param2 = 0;
- m_pFSM->PostEventFIFO(fsmEvent);
- }
- };
- class CardSwiperClient : public CardSwiperService_ClientBase
- {
- public:
- CardSwiperClient(CEntityBase* base): CardSwiperService_ClientBase(base)
- {
- }
- };
|