00001 // UpdateHandler.h: interface for the UpdateHandler class. 00004 00005 00006 #if !defined(AFX_UPDATEHANDLER_H__39CF56A7_9BB9_4D07_B4B2_B875EED3D2CF__INCLUDED_) 00007 #define AFX_UPDATEHANDLER_H__39CF56A7_9BB9_4D07_B4B2_B875EED3D2CF__INCLUDED_ 00008 00009 #if _MSC_VER > 1000 00010 #pragma once 00011 #endif // _MSC_VER > 1000 00012 00013 #include "BitmapScreen.h" 00014 #include "ScreenPipe.h" 00015 00024 class UpdateHandler 00025 { 00026 public: 00027 bool setCapture(const TString&, const TString&, const int, const int); 00028 bool setCaptureName(const TString&); 00029 bool setCaptureDir(const TString&); 00030 bool setCaptureLimit(const int); 00031 bool setCaptureFrequency(const int); 00032 void disableCapture(); 00033 bool enableCapture(); 00034 00036 const TString getCaptureName() const { return captureName; } 00038 const TString getCaptureDir() const { return captureDir; } 00040 int getCaptureLimit() const { return captureLimit; } 00042 int getCaptureFrequency() const { return captureEvery; } 00043 00044 void stop(const bool = true); 00045 bool run(); 00046 00047 UpdateHandler(ScreenPipe&, BitmapScreen&, HWND); 00048 virtual ~UpdateHandler(); 00049 private: 00050 HANDLE hUpdateThread; 00051 static DWORD WINAPI update(LPVOID); 00052 00053 volatile bool exit; 00054 00055 BitmapScreen *screen; 00056 ScreenPipe *pipe; 00057 const HWND hWnd; 00058 00059 HANDLE captureMutex; 00060 TString captureName; 00061 TString captureDir; 00062 int captureEvery; 00063 int captureLimit; 00064 volatile bool capture; 00065 }; 00066 00067 #endif // !defined(AFX_UPDATEHANDLER_H__39CF56A7_9BB9_4D07_B4B2_B875EED3D2CF__INCLUDED_)