00001 #ifndef CharonWatcherH 00002 #define CharonWatcherH 00003 00004 /******************************************************************************* 00005 Copyright 2002 Petr Kulhanek 00006 00007 This file is part of Core plugin. 00008 00009 Core plugin is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 Core plugin is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with Core plugin; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 *******************************************************************************/ 00023 /******************************************************************************* 00024 ** PROJECT: Project NEMESIS 00025 ** FILE: CharonWatcher 00026 ** FUNCTION: backward communication chanel from CHARON 00027 ** VERSION: 1.0 00028 ** LANGUAGE: CBuilder C++ 00029 ** TARGET COMPUTER: IBM PC 00030 ** PROGRAMMER: Petr Kulhánek 00031 ** HISTORY: 00032 VERSION DATE NOTE 00033 1.0 2002-07-29 00034 *******************************************************************************/ 00035 00039 /* HEADER FILES ***************************************************************/ 00040 00041 #include <Classes.hpp> 00042 #include "CharonClientInformation.h" 00043 #include <scktcomp.hpp> 00044 #include "XMLNetFile.h" 00045 00046 /* HEADER FILES END ***********************************************************/ 00047 00048 class CJob; 00049 class CCharonClient; 00050 00051 //--------------------------------------------------------------------------- 00052 00054 00057 class CCharonWatcher : public TThread { 00058 public: 00059 __fastcall CCharonWatcher(CCharonClient* p_client); 00060 00061 void __fastcall StopWatcher(void); 00062 00063 private: 00064 TClientSocket* ClientSocket; 00065 TEvent* StopEvent; 00066 CXMLNetFile XMLNetFile; 00067 void __fastcall OpenConnection(void); 00068 void __fastcall CloseConnection(void); 00069 void __fastcall RegisterAllOpenedJobs(void); 00070 void __fastcall Execute(void); 00071 void __fastcall ClientError(System::TObject* Sender, TCustomWinSocket* Socket, TErrorEvent ErrorEvent, int &ErrorCode); 00072 void __fastcall ServerDisconnect(TObject* Sender, TCustomWinSocket* Socket); 00073 void __fastcall SendEvent(void); 00074 }; 00075 00076 //--------------------------------------------------------------------------- 00077 #endif