Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SHActiveSH.h

Go to the documentation of this file.
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 SH_ACTIVE_STREAM_HANDLER_H 00025 #define SH_ACTIVE_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 "MNTimer.h" 00034 #include "MNTimerCall.h" 00035 #include "var_type.h" 00036 00037 namespace SH 00038 { 00039 00040 class ActiveSH; 00041 class ActiveSinkEndpointSpec; 00042 class ActiveSourceEndpointSpec; 00043 class ActiveSinkEndpoint; 00044 class ActiveSourceEndpoint; 00045 00050 /**********************************************************************/ 00051 /* ActiveSinkEndpoint */ 00052 /**********************************************************************/ 00053 00057 class ActiveSinkEndpoint 00058 : public SinkEndpoint 00059 { 00060 public: 00061 ActiveSinkEndpoint( ActiveSH* mySH ); 00062 virtual ~ActiveSinkEndpoint( ); 00063 }; 00064 00065 /**********************************************************************/ 00066 /* ActiveSourceEndpoint */ 00067 /**********************************************************************/ 00068 00072 class ActiveSourceEndpoint 00073 : public SourceEndpoint 00074 { 00075 public: 00076 ActiveSourceEndpoint( ActiveSH* mySH ); 00077 virtual ~ActiveSourceEndpoint( ); 00078 }; 00079 00080 /**********************************************************************/ 00081 /* ActiveSH */ 00082 /**********************************************************************/ 00083 00084 class ActiveSH 00085 : public Base 00086 { 00090 MNTimer _timer; 00091 00094 SA_ACTIVE_DELAY _delay; 00095 00096 TimerCall<ActiveSH> _timer_cb; 00097 00102 struct timeval _construction_time; 00103 00104 public: 00105 ActiveSH( SHGraphManager* mgr, 00106 u_int32_t runtimeId, 00107 MNSelector& sel ); 00108 00109 virtual ~ActiveSH(); 00110 00111 private: 00112 00117 ActiveSH( const ActiveSH& ); 00118 00123 ActiveSH& operator=( const ActiveSH& ); 00124 00125 public: 00128 virtual SH_RC initSH(); 00131 virtual SH_RC uninitSH(); 00132 00135 virtual SH_RC startStreaming(); 00138 virtual SH_RC stopStreaming(); 00139 00140 virtual void timer_callback( void* timer, TimerCallBase* ptr ); 00141 00142 // Attributes of the set function have been moved to SH.h 00143 00144 /******************************************************************/ 00145 /* functions required for SHStatus */ 00146 /******************************************************************/ 00147 protected: 00148 friend class ActiveSinkEndpoint; 00149 friend class ActiveSourceEndpoint; 00150 00151 SinkEndpoint* _in_ep_a[1]; 00152 SourceEndpoint* _out_ep_a[1]; 00153 ActiveSinkEndpoint _inEP; 00154 ActiveSourceEndpoint _outEP; 00155 00156 void pushReport( ReportPtr report, Direction d ); 00157 00158 public: 00159 virtual SinkEndpoint** getSinkSpecs(); 00160 virtual SourceEndpoint** getSourceSpecs(); 00161 00171 virtual bool isConnected() const; 00172 }; 00173 00175 00176 }; // namespace SH 00177 00178 #endif /* SH_ACTIVE_STREAM_HANDLER_H */ 00179

Generated on Sun Mar 6 13:35:50 2005 for Komssys by doxygen 1.3.8