#pragma once #include "ServerImgDownloadDispatcher.h" #include #include "feeder.h" class CRescanFromServerFeeder:public IFeeder { public: CRescanFromServerFeeder(void); ~CRescanFromServerFeeder(void); virtual ServiceState OnStarting( void ); virtual ServiceState OnRunning( void ); virtual ServiceState OnStoping( void ); enum MODE{ MODE_BATCH, MODE_EXAMINNE, }; public: void SetImageDownloadDir(CString dir){m_imgDownloadDir= dir;} virtual bool GetNext(BOOL wait,IplImage* & img, feeder_param& param); void SetBatch( CString batch ); void SetParam(long examId,long examCourseId,CString batch,CString examinneId){ this->examId = examId; this->examCourseId = examCourseId; this->m_batch = batch; this->m_examineeId = examinneId; m_mode = MODE_EXAMINNE; } void SetParam(long examId,long examCourseId,CString batch){ this->examId = examId; this->examCourseId = examCourseId; this->m_batch = batch; m_mode = MODE_BATCH; } private: long examId; long examCourseId; CString m_batch; CString m_examineeId; Json::Value m_imginfos; CServerImgDownloadDispatcher sidd; CString m_imgDownloadDir; IplImage* m_img; int m_count; MODE m_mode; //״̬ͬ²½Ëø RTL_CRITICAL_SECTION m_img_lock; feeder_param m_param; };