00001 /* Copyright (C) 2000 KOM/Darmstadt University of Technology 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 #ifndef TEST_FILE_COPY_GM_H 00025 #define TEST_FILE_COPY_GM_H 00026 00027 #include <config.h> 00028 #include <sys/types.h> 00029 00030 #include "SH.h" 00031 #include "SHGraphManager.h" 00032 #include "MNSelector.h" 00033 #include "MNSem.h" 00034 #include "MNMutex.h" 00035 00036 class FileCopyGM : public SHGraphManager 00037 { 00038 char* _filename; 00039 struct timeval* _tv; 00040 00041 SH::Base* _fsh; 00042 SH::Base* _ash; 00043 SH::Base* _ssh; 00044 00045 MNSem _eof_sig; 00046 MNMutex _eof_lock; 00047 00048 public: 00049 FileCopyGM( MNSelector& sel, const char* filename ); 00050 00051 virtual ~FileCopyGM(); 00052 00053 virtual void init(); 00054 virtual void uninit(); 00055 00056 virtual void start(); 00057 00058 virtual bool graphManNotify( SH::Base* caller, SH::Notification attribute, void* msg ); 00059 }; 00060 00061 #endif /* TEST_FILE_COPY_GM_H */ 00062