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 NOP_INTEGRATED_STREAM_HANDLER_H 00025 #define NOP_INTEGRATED_STREAM_HANDLER_H 00026 00027 #include <sys/types.h> 00028 #include <sys/time.h> 00029 00030 #include "SH.h" 00031 #include "SHEndpoint.h" 00032 #include "SHEndpointSpec.h" 00033 #include "NopSourceSH.h" 00034 #include "NopSinkSH.h" 00035 #include "MNTimer.h" 00036 #include "MNTimerCall.h" 00037 #include "var_type.h" 00038 00039 namespace SH 00040 { 00041 00042 class NopIntegratedSH; 00043 00048 /**********************************************************************/ 00049 /* NopIntegratedSH */ 00050 /**********************************************************************/ 00051 00052 class NopIntegratedSH 00053 : public Base 00054 { 00058 MNTimer _timer; 00059 00062 SA_ACTIVE_DELAY _delay; 00063 00064 TimerCall<NopIntegratedSH> _timer_cb; 00065 00070 struct timeval _construction_time; 00071 00072 NopSourceSH* _src; 00073 NopSinkSH* _snk; 00074 00075 public: 00076 NopIntegratedSH( SHGraphManager* mgr, 00077 u_int32_t runtimeId, 00078 MNSelector& sel ); 00079 00080 virtual ~NopIntegratedSH(); 00081 00082 private: 00083 00088 NopIntegratedSH( const NopIntegratedSH& ); 00089 00094 NopIntegratedSH& operator=( const NopIntegratedSH& ); 00095 00096 public: 00099 virtual SH_RC initSH(); 00102 virtual SH_RC uninitSH(); 00103 00106 virtual SH_RC startStreaming(); 00109 virtual SH_RC stopStreaming(); 00110 00111 virtual void timer_callback( void* timer, TimerCallBase* ptr ); 00112 00113 // Attributes of the set function have been moved to SH.h 00114 00115 public: 00116 virtual SinkEndpoint** getSinkSpecs(); 00117 virtual SourceEndpoint** getSourceSpecs(); 00118 00128 virtual bool isConnected() const; 00129 }; 00130 00132 00133 }; // namespace SH 00134 00135 #endif /* NOP_INTEGRATED_STREAM_HANDLER_H */ 00136